RESOLVED FIXED Bug 90324
[chromium] Merge updates and idle updates into one pass
https://bugs.webkit.org/show_bug.cgi?id=90324
Summary [chromium] Merge updates and idle updates into one pass
Eric Penner
Reported 2012-06-29 16:47:14 PDT
[chromium] Merge painting and idle painting into one pass
Attachments
Patch (21.47 KB, patch)
2012-06-29 16:49 PDT, Eric Penner
no flags
Archive of layout-test-results from gce-cr-linux-01 (942.26 KB, application/zip)
2012-06-29 22:49 PDT, WebKit Review Bot
no flags
fix_tests (23.67 KB, patch)
2012-07-03 17:37 PDT, Eric Penner
no flags
rebase_just_in_case (23.93 KB, patch)
2012-07-03 17:46 PDT, Eric Penner
no flags
Patch (29.19 KB, patch)
2012-07-09 16:56 PDT, Eric Penner
no flags
rebase_onto_master (28.94 KB, patch)
2012-07-09 17:20 PDT, Eric Penner
no flags
rename_layerRect (33.27 KB, patch)
2012-07-09 17:40 PDT, Eric Penner
no flags
Eric Penner
Comment 1 2012-06-29 16:49:05 PDT
WebKit Review Bot
Comment 2 2012-06-29 22:49:27 PDT
Comment on attachment 150273 [details] Patch Attachment 150273 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13106659 New failing tests: TiledLayerChromiumTest.tilesNotPaintedWithoutInvalidation TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
WebKit Review Bot
Comment 3 2012-06-29 22:49:30 PDT
Created attachment 150306 [details] Archive of layout-test-results from gce-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-12.04-precise
Eric Penner
Comment 4 2012-07-03 17:37:32 PDT
Created attachment 150695 [details] fix_tests
Eric Penner
Comment 5 2012-07-03 17:38:22 PDT
Comment on attachment 150695 [details] fix_tests Fixed tests. Finally down to one paint pass!
Eric Penner
Comment 6 2012-07-03 17:46:24 PDT
Created attachment 150697 [details] rebase_just_in_case
Dana Jansens
Comment 7 2012-07-04 07:02:05 PDT
Comment on attachment 150697 [details] rebase_just_in_case View in context: https://bugs.webkit.org/attachment.cgi?id=150697&action=review > Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:633 > IntRect idlePaintLayerRect = idlePaintRect(layerRect); While we're here, can we rename layerRect in this method to contentRect (since this rect is in content space)? > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp:495 > + m_needMoreIdleUpdates = false; This new member var is only read here, and written inside paintLayerContents. How about making paintLayerContents (and paintMasksForRenderSurface) return a bool instead? Then we can avoid adding a member variable to CCLTH. > Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:-607 > - // Non-visible layers don't idle paint. > - layer->idleUpdateLayerRect(updater, contentRect, 0); > - I'm not so sure about the TLC test changes such as this. Isn't just removing all these calls just avoiding what these are trying to test? Should we instead be calling updateLayerRect() in all these cases, since idleUpdate has been mereged into it? Or can we restructure these tests in some way that they are still verifying the things they used to be? > Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:-1442 > - // No metrics are recorded in prepaint, so the values should not change from above. Do you intend to make painting metrics recorded during prepaint now? This will change the meaning of the metrics. I think we shouldn't do that, and if we want to record metrics, it should record them separately from non-prepainting.
Adrienne Walker
Comment 8 2012-07-04 09:45:54 PDT
Comment on attachment 150697 [details] rebase_just_in_case View in context: https://bugs.webkit.org/attachment.cgi?id=150697&action=review This patch is super exciting to see. > Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h:91 > + // After preparing an update, returns true if more painting is needed. > bool needsIdlePaint(const IntRect& layerRect); Also while we're here, is there a reason needsIdlePaint takes a parameter? If it always takes the visibleRect, maybe it should just do that itself, internally?
Eric Penner
Comment 9 2012-07-04 13:05:46 PDT
Comment on attachment 150697 [details] rebase_just_in_case View in context: https://bugs.webkit.org/attachment.cgi?id=150697&action=review >> Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:633 >> IntRect idlePaintLayerRect = idlePaintRect(layerRect); > > While we're here, can we rename layerRect in this method to contentRect (since this rect is in content space)? SG >> Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h:91 >> bool needsIdlePaint(const IntRect& layerRect); > > Also while we're here, is there a reason needsIdlePaint takes a parameter? If it always takes the visibleRect, maybe it should just do that itself, internally? I think that will break tests because the tests often don't set the visible layer rect. All other methods take an extra parameter (like a utility function). I'm kind of inclined to agree with you and remove the parameter from all functions that just use the visible rect... But some test cleanup will need to go with it. >> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp:495 >> + m_needMoreIdleUpdates = false; > > This new member var is only read here, and written inside paintLayerContents. > > How about making paintLayerContents (and paintMasksForRenderSurface) return a bool instead? Then we can avoid adding a member variable to CCLTH. SG >> Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:-607 >> - > > I'm not so sure about the TLC test changes such as this. Isn't just removing all these calls just avoiding what these are trying to test? Should we instead be calling updateLayerRect() in all these cases, since idleUpdate has been mereged into it? Or can we restructure these tests in some way that they are still verifying the things they used to be? Keep in mind that before only one of updateLayerRect and idleUpdateLayerRect would actually do something. Now the next updateLayerRect will take the place of the previous idleUpdateLayerRect. I checked each case to insure that this makes sense. >> Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:-1442 >> - // No metrics are recorded in prepaint, so the values should not change from above. > > Do you intend to make painting metrics recorded during prepaint now? This will change the meaning of the metrics. I think we shouldn't do that, and if we want to record metrics, it should record them separately from non-prepainting. Hmm. I'll need to look closer at how the metrics are segmented. I didn't intend it to now records pre-paint as part of paint, but rather than this code didn't make sense to me in light of merging the two passes.
Dana Jansens
Comment 10 2012-07-04 13:11:17 PDT
Comment on attachment 150697 [details] rebase_just_in_case View in context: https://bugs.webkit.org/attachment.cgi?id=150697&action=review >>> Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:-607 >>> - >> >> I'm not so sure about the TLC test changes such as this. Isn't just removing all these calls just avoiding what these are trying to test? Should we instead be calling updateLayerRect() in all these cases, since idleUpdate has been mereged into it? Or can we restructure these tests in some way that they are still verifying the things they used to be? > > Keep in mind that before only one of updateLayerRect and idleUpdateLayerRect would actually do something. Now the next updateLayerRect will take the place of the previous idleUpdateLayerRect. I checked each case to insure that this makes sense. Ok, well I commented on this one in particular because it looks odd atm. We check numPaintedTiles() after this call to ensure it's 0. If we're not making this call, that check isn't needed, nor anything that follows in this test. Other tests look similar to me also, so I think there's a bit more cleanup to be done at least.
Eric Penner
Comment 11 2012-07-09 11:49:00 PDT
Comment on attachment 150697 [details] rebase_just_in_case View in context: https://bugs.webkit.org/attachment.cgi?id=150697&action=review >>>> Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:-607 >>>> - >>> >>> I'm not so sure about the TLC test changes such as this. Isn't just removing all these calls just avoiding what these are trying to test? Should we instead be calling updateLayerRect() in all these cases, since idleUpdate has been mereged into it? Or can we restructure these tests in some way that they are still verifying the things they used to be? >> >> Keep in mind that before only one of updateLayerRect and idleUpdateLayerRect would actually do something. Now the next updateLayerRect will take the place of the previous idleUpdateLayerRect. I checked each case to insure that this makes sense. > > Ok, well I commented on this one in particular because it looks odd atm. We check numPaintedTiles() after this call to ensure it's 0. If we're not making this call, that check isn't needed, nor anything that follows in this test. Other tests look similar to me also, so I think there's a bit more cleanup to be done at least. Ahh I see! In most cases they were always grouped together with updateLayerRect being first. I'll make sure there is always at least one call in each case. >>> Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:-1442 >>> - // No metrics are recorded in prepaint, so the values should not change from above. >> >> Do you intend to make painting metrics recorded during prepaint now? This will change the meaning of the metrics. I think we shouldn't do that, and if we want to record metrics, it should record them separately from non-prepainting. > > Hmm. I'll need to look closer at how the metrics are segmented. I didn't intend it to now records pre-paint as part of paint, but rather than this code didn't make sense to me in light of merging the two passes. I'll double check that we aren't corrupting our metrics and verify that here (rather than just removing this).
Eric Penner
Comment 12 2012-07-09 12:09:02 PDT
*** Bug 83628 has been marked as a duplicate of this bug. ***
Eric Penner
Comment 13 2012-07-09 16:56:36 PDT
Eric Penner
Comment 14 2012-07-09 17:20:53 PDT
Created attachment 151365 [details] rebase_onto_master
Eric Penner
Comment 15 2012-07-09 17:40:20 PDT
Created attachment 151368 [details] rename_layerRect
Adrienne Walker
Comment 16 2012-07-09 17:49:28 PDT
(In reply to comment #11) > (From update of attachment 150697 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=150697&action=review > > > Hmm. I'll need to look closer at how the metrics are segmented. I didn't intend it to now records pre-paint as part of paint, but rather than this code didn't make sense to me in light of merging the two passes. > > I'll double check that we aren't corrupting our metrics and verify that here (rather than just removing this). What was the result of this investigation? (In reply to comment #9) > (From update of attachment 150697 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=150697&action=review > > >> Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h:91 > >> bool needsIdlePaint(const IntRect& layerRect); > > > > Also while we're here, is there a reason needsIdlePaint takes a parameter? If it always takes the visibleRect, maybe it should just do that itself, internally? > > I think that will break tests because the tests often don't set the visible layer rect. All other methods take an extra parameter (like a utility function). I'm kind of inclined to agree with you and remove the parameter from all functions that just use the visible rect... But some test cleanup will need to go with it. I think there may have been some historical reason that all the TiledLayerChromium functions take the visible layer rect. I think they should just be removed all in one go in a follow-up patch, and this should just get landed first.
Eric Penner
Comment 17 2012-07-09 17:54:27 PDT
(In reply to comment #16) > What was the result of this investigation? The metrics are controlled by passing the CCOcclusionTracker to TiledLayerChromium::updateTiles. Since the painting and idle painting steps are merged into one functions now (not easy to test the occlusion tracking results independently), I added an ASSERT in TiledLayerChromium::updateTiles to insure we never track metrics for idle painting. > I think there may have been some historical reason that all the TiledLayerChromium functions take the visible layer rect. I think they should just be removed all in one go in a follow-up patch, and this should just get landed first. I think it would be a bigger change now yeah. I did change the layerRect name in this CL though (as per Dana's suggestion), as that wasn't as big of a change.
Adrienne Walker
Comment 18 2012-07-09 18:09:58 PDT
Comment on attachment 151368 [details] rename_layerRect R=me.
Dana Jansens
Comment 19 2012-07-09 18:11:17 PDT
Comment on attachment 151368 [details] rename_layerRect lgtm nice job
WebKit Review Bot
Comment 20 2012-07-09 19:29:33 PDT
Comment on attachment 151368 [details] rename_layerRect Clearing flags on attachment: 151368 Committed r122185: <http://trac.webkit.org/changeset/122185>
WebKit Review Bot
Comment 21 2012-07-09 19:29:38 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.