Bug 86792 - Possibly redundant calls to convertToLayerCoords() in layer painting
Summary: Possibly redundant calls to convertToLayerCoords() in layer painting
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-17 17:59 PDT by Simon Fraser (smfr)
Modified: 2012-05-17 17:59 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-05-17 17:59:57 PDT
We noticed that convertToLayerCoords() was taking some time in some rendering tests. It's bad to call this during painting (because it walks all the way up to the root, so O(N^2)), yet we do so in a least two places when painting layers:

* RenderLayer::paintLayerContents() calls calculateRects() which calls convertToLayerCoords() to compute layerBounds
* intersectsDamageRect() calls boundingBox() which uses convertToLayerCoords()
* performOverlapTests() calls boundingBox() which uses convertToLayerCoords()

There may be more.