Bug 118217

Summary: Avoid calling RenderLayerBacking::resetContentsRect() if possible
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, commit-queue, esprehn+autocc, glenn, luiz, noam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2013-06-29 12:35:49 PDT
Calling RenderLayerBacking::resetContentsRect() every time from updateGraphicsLayerGeometry() shows up on profiles, because calling enderer())->contentBoxRect() involves a bunch of virtual function calls. And we only need to call resetContentsRect() when the image tiling stuff has changed it, so calling this every time is overkill.
Comment 1 Noam Rosenthal 2013-06-29 14:19:23 PDT
(In reply to comment #0)
> Calling RenderLayerBacking::resetContentsRect() every time from updateGraphicsLayerGeometry() shows up on profiles, because calling enderer())->contentBoxRect() involves a bunch of virtual function calls. And we only need to call resetContentsRect() when the image tiling stuff has changed it, so calling this every time is overkill.

We also need to call resetContentsRect when the contentsRect of the RenderObject has changed; Previously we were calling setContentsRect(renderer()->contentsBox()) in updateGraphicsLayerGeometry() so this behavior has not changed (though now it appears in profile since it's in its own function...).
Comment 2 Noam Rosenthal 2013-07-01 06:13:29 PDT
Created attachment 205804 [details]
Patch
Comment 3 WebKit Commit Bot 2013-07-01 09:32:48 PDT
Comment on attachment 205804 [details]
Patch

Clearing flags on attachment: 205804

Committed r152227: <http://trac.webkit.org/changeset/152227>
Comment 4 WebKit Commit Bot 2013-07-01 09:32:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Alexey Proskuryakov 2013-07-22 12:33:55 PDT
This caused bug 118951.