Bug 118217 - Avoid calling RenderLayerBacking::resetContentsRect() if possible
Summary: Avoid calling RenderLayerBacking::resetContentsRect() if possible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-29 12:35 PDT by Simon Fraser (smfr)
Modified: 2013-07-22 12:33 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.53 KB, patch)
2013-07-01 06:13 PDT, Noam Rosenthal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.