Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Issue 26110004: Defer the real work in updateCompositingLayers until it's really needed. (Closed)

Created:
7 years, 2 months ago by shawnsingh
Modified:
7 years, 2 months ago
CC:
blink-reviews, blink-layers+watch_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering
Visibility:
Public.

Description

Defer the real work in updateCompositingLayers until it's really needed. Many types of change on a web page end up requiring that compositing state gets updated. Currently this work is performed immediately after layout, recalcStyle, and other entry points. However, this work may happen surprisingly many times per actual rendered frame, which is absolutely wasteful - nothing except the most recent compositing state will matter when the frame finally gets drawn. So, instead we can defer all compositing update work until the compositor is ready to ask for updated compositing state. BUG=229679, 302726 R=jamesr@chromium.org, vollick@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=159961

Patch Set 1 #

Total comments: 8

Patch Set 2 : work in progress, still need to debug and fix a few more things #

Patch Set 3 : rebased to tip of tree #

Patch Set 4 : almost there #

Total comments: 1

Patch Set 5 : few more fixes #

Total comments: 5

Patch Set 6 : Passes layout tests locally on linux, except one test fix is questionable #

Patch Set 7 : Passes layout tests locally on linux, except one test fix is questionable #

Patch Set 8 : try to fix chunk mismatch error #

Total comments: 1

Patch Set 9 : inspector needs fixing, otherwise good to go #

Total comments: 4

Patch Set 10 : This version works now, passes all tests locally, one minor caveat please see comments for details #

Patch Set 11 : rebased #

Total comments: 1

Patch Set 12 : Addressed reviewer feedback about inspector error check #

Total comments: 6

Patch Set 13 : addressed reviewer feedback round 2 #

Total comments: 1

Patch Set 14 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -74 lines) Patch
M LayoutTests/compositing/gestures/gesture-tapHighlight-on-promoted-overflow-div-scrolled.html View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-after-sibling-display-change.html View 1 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-after-sibling-z-index-change.html View 1 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M LayoutTests/compositing/overflow/dynamic-composited-scrolling-status.html View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M LayoutTests/compositing/overflow/opt-into-composited-scrolling-positioned-ancestor.html View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/compositing/overflow/resources/automatically-opt-into-composited-scrolling.js View 1 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html View 1 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/compositing/repaint/fixed-pos-with-composited-child.html View 1 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/fast/events/touch/touch-rect-crash-on-unpromote-layer.html View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M LayoutTests/http/tests/inspector/inspector-test.js View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/inspector/InspectorLayerTreeAgent.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/page/Page.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/rendering/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderGeometryMap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +18 lines, -18 lines 0 comments Download
M Source/core/rendering/RenderLayer.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/rendering/RenderLayer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +14 lines, -17 lines 0 comments Download
M Source/core/rendering/RenderLayerCompositor.h View 1 2 3 4 5 6 7 8 9 5 chunks +13 lines, -6 lines 0 comments Download
M Source/core/rendering/RenderLayerCompositor.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 14 chunks +56 lines, -24 lines 0 comments Download
M Source/core/rendering/RenderLayerScrollableArea.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +20 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.idl View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/web/PageWidgetDelegate.cpp View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M Source/web/tests/ScrollingCoordinatorChromiumTest.cpp View 1 2 3 4 5 6 7 8 9 10 10 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
shawnsingh
Ian, if you have time, could you please help me figure out why this craps ...
7 years, 2 months ago (2013-10-08 11:18:15 UTC) #1
jamesr
https://codereview.chromium.org/26110004/diff/1/Source/web/PageWidgetDelegate.cpp File Source/web/PageWidgetDelegate.cpp (right): https://codereview.chromium.org/26110004/diff/1/Source/web/PageWidgetDelegate.cpp#newcode84 Source/web/PageWidgetDelegate.cpp:84: // FIXME: is this a reasonable place for this? ...
7 years, 2 months ago (2013-10-08 17:51:15 UTC) #2
Ian Vollick
https://codereview.chromium.org/26110004/diff/1/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/26110004/diff/1/Source/core/rendering/RenderLayerCompositor.cpp#newcode396 Source/core/rendering/RenderLayerCompositor.cpp:396: // This way we only need to compute all ...
7 years, 2 months ago (2013-10-08 18:32:21 UTC) #3
Vangelis Kokkevis
https://codereview.chromium.org/26110004/diff/1/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/26110004/diff/1/Source/core/rendering/RenderLayerCompositor.cpp#newcode1946 Source/core/rendering/RenderLayerCompositor.cpp:1946: // FIXME: this seems bogus. If we don't know ...
7 years, 2 months ago (2013-10-08 23:22:33 UTC) #4
shawnsingh
If it's OK with reviewers, I would prefer to leave those "bogus" flags in the ...
7 years, 2 months ago (2013-10-15 10:32:52 UTC) #5
shawnsingh
jamesr@ can you please take a look at the most recent patch? Aside from iframe ...
7 years, 2 months ago (2013-10-16 02:05:33 UTC) #6
shawnsingh
https://codereview.chromium.org/26110004/diff/17001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/26110004/diff/17001/Source/core/rendering/RenderLayerCompositor.cpp#newcode380 Source/core/rendering/RenderLayerCompositor.cpp:380: if (!isMainFrame() && frame && frame->contentRenderer() && frame->contentRenderer()->compositor()) checking ...
7 years, 2 months ago (2013-10-16 06:52:19 UTC) #7
Ian Vollick
I'm still mulling over the frame tree updates in RLC, but the patch seems quite ...
7 years, 2 months ago (2013-10-17 01:30:25 UTC) #8
shawnsingh
Dear Reviewers, PTAL. This patch is getting close to done, now. One issue in particular ...
7 years, 2 months ago (2013-10-17 01:33:21 UTC) #9
shawnsingh
Thanks for the review so far... https://codereview.chromium.org/26110004/diff/25001/Source/core/page/Page.cpp File Source/core/page/Page.cpp (right): https://codereview.chromium.org/26110004/diff/25001/Source/core/page/Page.cpp#newcode235 Source/core/page/Page.cpp:235: return scrollingCoordinator->mainThreadScrollingReasonsAsText(); On ...
7 years, 2 months ago (2013-10-17 01:44:04 UTC) #10
shawnsingh
I think it should be possible to migrate all usage of updateCompositingLayers() to simple setNeedsXXX ...
7 years, 2 months ago (2013-10-17 01:52:08 UTC) #11
shawnsingh
https://codereview.chromium.org/26110004/diff/42001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/26110004/diff/42001/Source/core/rendering/RenderLayerCompositor.cpp#newcode435 Source/core/rendering/RenderLayerCompositor.cpp:435: finishCompositingUpdateForFrameTree(&m_renderView->frameView()->frame()); I debugged some more and determined that this ...
7 years, 2 months ago (2013-10-17 03:29:55 UTC) #12
caseq
https://codereview.chromium.org/26110004/diff/50001/LayoutTests/http/tests/inspector/inspector-test.js File LayoutTests/http/tests/inspector/inspector-test.js (right): https://codereview.chromium.org/26110004/diff/50001/LayoutTests/http/tests/inspector/inspector-test.js#newcode483 LayoutTests/http/tests/inspector/inspector-test.js:483: testRunner.display(); Why is this necessary? We used to invoke ...
7 years, 2 months ago (2013-10-17 12:37:38 UTC) #13
Ian Vollick
On 2013/10/17 01:52:08, shawnsingh wrote: > I think it should be possible to migrate all ...
7 years, 2 months ago (2013-10-17 15:24:23 UTC) #14
shawnsingh
Replies inline below. Cheers! https://codereview.chromium.org/26110004/diff/50001/LayoutTests/http/tests/inspector/inspector-test.js File LayoutTests/http/tests/inspector/inspector-test.js (right): https://codereview.chromium.org/26110004/diff/50001/LayoutTests/http/tests/inspector/inspector-test.js#newcode483 LayoutTests/http/tests/inspector/inspector-test.js:483: testRunner.display(); On 2013/10/17 12:37:38, caseq ...
7 years, 2 months ago (2013-10-17 19:00:04 UTC) #15
shawnsingh
PTAL - This patch should be ready to go!!! Pending reviewer feedback, of course. It ...
7 years, 2 months ago (2013-10-17 22:14:08 UTC) #16
caseq
https://codereview.chromium.org/26110004/diff/62001/Source/core/inspector/InspectorLayerTreeAgent.cpp File Source/core/inspector/InspectorLayerTreeAgent.cpp (right): https://codereview.chromium.org/26110004/diff/62001/Source/core/inspector/InspectorLayerTreeAgent.cpp#newcode202 Source/core/inspector/InspectorLayerTreeAgent.cpp:202: if (!enclosingLayer->enclosingCompositingLayer() || !enclosingLayer->enclosingCompositingLayer()->compositedLayerMapping()) { I think this is ...
7 years, 2 months ago (2013-10-18 05:39:56 UTC) #17
shawnsingh
Looks like the trybots have gotten slow/hung again. The try runs on patch #11 were ...
7 years, 2 months ago (2013-10-18 12:05:58 UTC) #18
jamesr
https://codereview.chromium.org/26110004/diff/86001/Source/core/rendering/RenderGeometryMap.cpp File Source/core/rendering/RenderGeometryMap.cpp (right): https://codereview.chromium.org/26110004/diff/86001/Source/core/rendering/RenderGeometryMap.cpp#newcode124 Source/core/rendering/RenderGeometryMap.cpp:124: // if (roundedIntPoint(rendererMappedResult) != roundedIntPoint(result)) please remove before landing ...
7 years, 2 months ago (2013-10-18 15:56:42 UTC) #19
shawnsingh
New patch PTAL. Response to your question below, other feedback addressed in new patch. Thanks ...
7 years, 2 months ago (2013-10-18 18:37:29 UTC) #20
jamesr
Ah, I see. I think we'll have to rewrite all these isMainFrame() checks soon anyway ...
7 years, 2 months ago (2013-10-18 19:16:03 UTC) #21
Ian Vollick
This lgtm as well, but I'd love it if someone more familiar with the frame ...
7 years, 2 months ago (2013-10-18 19:23:26 UTC) #22
jamesr
https://codereview.chromium.org/26110004/diff/136001/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/26110004/diff/136001/Source/core/rendering/RenderLayerCompositor.cpp#newcode370 Source/core/rendering/RenderLayerCompositor.cpp:370: void RenderLayerCompositor::finishCompositingUpdateForFrameTree(Frame* frame) the tree walk here lgtm as ...
7 years, 2 months ago (2013-10-18 19:24:57 UTC) #23
shawnsingh
Thanks for everyone's help. Fixed the #include, and now I'm going to land manually and ...
7 years, 2 months ago (2013-10-18 19:36:47 UTC) #24
shawnsingh
7 years, 2 months ago (2013-10-18 19:38:22 UTC) #25
Message was sent while issue was closed.
Committed patchset #14 manually as r159961 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698