Bug 38820

Summary: Further optimization for SVG's repaintRect calculation
Product: WebKit Reporter: Dirk Schulze <krit>
Component: SVGAssignee: Dirk Schulze <krit>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 36564    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Dirk Schulze 2010-05-09 13:26:59 PDT
Masking:
We don't have intelligent algorithms, to determin the smallest size of a masked objekt to get a smaller repaintRect in SVG.

ClipPath:
We calculate the union of all childs of a clipPath every time, the clipPath is used by a target. This union can be cached and transformed by the targets objectBoundingbox on calling resourceBoundingBox(). This is no lost if only one target takes the clipPath resource, but will speed up the calculation if more than one object use the same resource. This also avoids multiple transformations by localToParentTransform and the follwoing mapRect call.
The same algorithm can be used by masking too.
Comment 1 Dirk Schulze 2010-05-09 13:47:52 PDT
Created attachment 55508 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-05-09 13:52:01 PDT
Comment on attachment 55508 [details]
Patch

We're certain this changed no pixel tests, correct?
Comment 3 Dirk Schulze 2010-05-09 14:04:26 PDT
(In reply to comment #2)
> (From update of attachment 55508 [details])
> We're certain this changed no pixel tests, correct?

I allways test with pixel tests and a tolerance of 0. No pixel changes.
Comment 4 Nikolas Zimmermann 2010-05-10 01:51:38 PDT
Comment on attachment 55508 [details]
Patch

Dirk++, r=me.
Comment 5 Dirk Schulze 2010-05-10 08:59:27 PDT
Comment on attachment 55508 [details]
Patch

Clearing flags on attachment: 55508

Committed r59081: <http://trac.webkit.org/changeset/59081>
Comment 6 Dirk Schulze 2010-05-10 08:59:37 PDT
All reviewed patches have been landed.  Closing bug.