Summary: | inefficient clipping | ||
---|---|---|---|
Product: | MuPDF | Reporter: | zeniko |
Component: | fitz | Assignee: | Tor Andersson <tor.andersson> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | robin.watts |
Priority: | P4 | ||
Version: | unspecified | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
URL: | http://code.google.com/p/sumatrapdf/issues/detail?id=1502 | ||
Customer: | Word Size: | --- |
Description
zeniko
2011-06-17 10:54:32 UTC
We have made some changes with clipping handling in light of this bug. Without the changes @100dpi, this file takes 64seconds to render. With them, less than 5. These will be committed after testing is complete. Fixed. commit 2c4bbbfdc7413a68cad395c3c61ff8e62dceb18b Author: Robin Watts <Robin.Watts@artifex.com> Date: Wed Jul 6 16:32:33 2011 +0100 Clip area optimisations for displaylist case: First, we add clipping rects to clipping functions. Various functions (the ones that handle clipping) are now additionally passed a rectangle that represents an additional bound for this clip in device space (i.e. it has already been mapped through the current ctm). Next, when constructing the displaylist, keep track of the bounding box for the contents of each clip. While writing the list, on every node we add, we add the bbox for that node to the enclosing clips content bbox (if there is an enclosing clip). When we pop a clip, write back to the corresponding push to update the bbox. This means if we get large clip regions, with only small areas used within them, we will only do the slow blending for those small areas. Finally, we fix a calculation in fz_bound_path which was incorrectly accounting for mitrelimits. This was showing up in testing on page 630 of the PDF reference v1.7. |