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

Issue 508373002: cc: Single-threaded impl-side painting for unit tests (Closed)

Created:
6 years, 3 months ago by enne (OOO)
Modified:
6 years, 2 months ago
Reviewers:
danakj
CC:
cc-bugs_chromium.org, chromium-reviews, reveman, vmpstr
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

cc: Single-threaded impl-side painting for unit tests This adds methods to SingleThreadProxy to support impl-side painting when using the scheduler. This allows most unit tests to test impl-side painting classes through both the single and threaded paths. The biggest caveat to this approach is the "commit waits for activation" logic that mailboxes want to use. Because there is no easy way to block the only thread there is while activation happens, activation always happens immediately during commit, even if the tree is not ready. To cause the tree to wait to draw until it is ready, drawing is prevented via SetRequiresHighResToDraw. This prepares the way for the future where the SingleThreadProxy will likely commit directly to the active tree. The synchronous CompositeImmediately function does not support impl-side painting yet. This is the path used by everything but unit tests at this point. R=danakj@chromium.org BUG=329553 Committed: https://crrev.com/98f3a6c5c30f1ecfc934838688ce265455a35ec9 Cr-Commit-Position: refs/heads/master@{#298960}

Patch Set 1 #

Total comments: 27

Patch Set 2 : Rebase #

Patch Set 3 : danakj review #

Total comments: 8

Patch Set 4 : more danakj review #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Patch Set 7 : Support failing PrepareToDraw in STP and tests #

Patch Set 8 : Do BeginFrame stuff in BeginFrame, not lazily in commit #

Total comments: 1

Patch Set 9 : Fix aborted swap promises in synchronous composite case #

Patch Set 10 : Also abort remaining swap promises for synchronous composite #

Total comments: 1

Patch Set 11 : Rebase #

Patch Set 12 : Swap promise unit test #

Total comments: 3

Patch Set 13 : Add comments #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+337 lines, -124 lines) Patch
M cc/test/layer_tree_test.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +55 lines, -27 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +13 lines, -13 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +96 lines, -9 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +14 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_context.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -2 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 20 chunks +139 lines, -60 lines 0 comments Download

Messages

Total messages: 58 (18 generated)
enne (OOO)
https://codereview.chromium.org/508373002/diff/1/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/508373002/diff/1/cc/trees/layer_tree_host_unittest.cc#newcode532 cc/trees/layer_tree_host_unittest.cc:532: // This test does not make sense in the ...
6 years, 3 months ago (2014-08-27 23:53:39 UTC) #1
enne (OOO)
danakj: ping?
6 years, 3 months ago (2014-09-02 17:11:09 UTC) #2
danakj
https://codereview.chromium.org/508373002/diff/1/cc/test/layer_tree_test.h File cc/test/layer_tree_test.h (right): https://codereview.chromium.org/508373002/diff/1/cc/test/layer_tree_test.h#newcode221 cc/test/layer_tree_test.h:221: } Can you put "class SingleThreadDirectNoImplNeedsSemicolon##TEST_FIXTURE_NAME {}" here? https://codereview.chromium.org/508373002/diff/1/cc/test/layer_tree_test.h#newcode234 ...
6 years, 3 months ago (2014-09-03 17:01:32 UTC) #3
enne (OOO)
https://codereview.chromium.org/508373002/diff/1/cc/test/layer_tree_test.h File cc/test/layer_tree_test.h (right): https://codereview.chromium.org/508373002/diff/1/cc/test/layer_tree_test.h#newcode221 cc/test/layer_tree_test.h:221: } On 2014/09/03 17:01:31, danakj wrote: > Can you ...
6 years, 3 months ago (2014-09-03 19:41:29 UTC) #4
danakj
https://codereview.chromium.org/508373002/diff/1/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/508373002/diff/1/cc/trees/single_thread_proxy.cc#newcode424 cc/trees/single_thread_proxy.cc:424: layer_tree_host_impl_->active_tree()->SetRequiresHighResToDraw(); On 2014/09/03 19:41:28, enne wrote: > On 2014/09/03 ...
6 years, 3 months ago (2014-09-03 19:49:30 UTC) #5
enne (OOO)
+reveman,vmpstr for a question about raster on demand https://codereview.chromium.org/508373002/diff/1/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/508373002/diff/1/cc/trees/single_thread_proxy.cc#newcode424 cc/trees/single_thread_proxy.cc:424: layer_tree_host_impl_->active_tree()->SetRequiresHighResToDraw(); ...
6 years, 3 months ago (2014-09-03 20:02:48 UTC) #6
danakj
On 2014/09/03 20:02:48, enne wrote: > +reveman,vmpstr for a question about raster on demand > ...
6 years, 3 months ago (2014-09-03 21:01:24 UTC) #7
danakj
https://codereview.chromium.org/508373002/diff/40001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/508373002/diff/40001/cc/test/layer_tree_test.cc#newcode205 cc/test/layer_tree_test.cc:205: CHECK(settings().impl_side_painting); nit: DCHECKs would be sufficient (and be a ...
6 years, 3 months ago (2014-09-03 21:14:24 UTC) #8
enne (OOO)
https://codereview.chromium.org/508373002/diff/40001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/508373002/diff/40001/cc/test/layer_tree_test.cc#newcode205 cc/test/layer_tree_test.cc:205: CHECK(settings().impl_side_painting); On 2014/09/03 21:14:24, danakj wrote: > nit: DCHECKs ...
6 years, 3 months ago (2014-09-03 21:36:26 UTC) #9
danakj
LGTM
6 years, 3 months ago (2014-09-03 21:38:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/508373002/60001
6 years, 3 months ago (2014-09-03 21:41:01 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/12724)
6 years, 3 months ago (2014-09-04 04:59:54 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/508373002/60001
6 years, 3 months ago (2014-09-04 14:25:47 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/12913)
6 years, 3 months ago (2014-09-04 18:38:13 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/508373002/60001
6 years, 3 months ago (2014-09-05 18:23:47 UTC) #20
enne (OOO)
I ran these all locally and can't repro any of these failures or timeouts or ...
6 years, 3 months ago (2014-09-05 18:23:53 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/13490)
6 years, 3 months ago (2014-09-05 18:33:40 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/508373002/80001
6 years, 3 months ago (2014-09-05 19:55:30 UTC) #25
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 3 months ago (2014-09-06 01:56:47 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/508373002/80001
6 years, 3 months ago (2014-09-06 02:15:15 UTC) #29
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 3 months ago (2014-09-06 08:16:58 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/508373002/80001
6 years, 3 months ago (2014-09-06 19:28:27 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001) as 7eee8e03582772716b820001af75343f6341e6e8
6 years, 3 months ago (2014-09-06 19:29:30 UTC) #34
henrika (OOO until Aug 14)
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/550073002/ by henrika@chromium.org. ...
6 years, 3 months ago (2014-09-08 06:51:30 UTC) #35
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/41dbfb1a2668ebfc913cea247011f6e596c374f2 Cr-Commit-Position: refs/heads/master@{#293629}
6 years, 3 months ago (2014-09-10 03:43:09 UTC) #36
enne (OOO)
danakj: PTAL This fixes two bugs (separated out into two patches if you want to ...
6 years, 2 months ago (2014-10-01 22:30:33 UTC) #37
danakj
https://codereview.chromium.org/508373002/diff/140001/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/508373002/diff/140001/cc/trees/single_thread_proxy.cc#newcode538 cc/trees/single_thread_proxy.cc:538: draw_result = layer_tree_host_impl_->PrepareToDraw(frame); Question: Isn't sync composite supposed to ...
6 years, 2 months ago (2014-10-01 22:36:24 UTC) #38
danakj
LGTM we don't need to synchronously composite with implside (yet)
6 years, 2 months ago (2014-10-01 23:04:09 UTC) #39
enne (OOO)
CaptureScreenshot tests were failing because the previous patch had the synchronous path calling BeginMainFrame. This ...
6 years, 2 months ago (2014-10-02 16:55:05 UTC) #40
danakj
LGTM https://codereview.chromium.org/508373002/diff/180001/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/508373002/diff/180001/cc/trees/single_thread_proxy.cc#newcode467 cc/trees/single_thread_proxy.cc:467: ScopedAbortRemainingSwapPromises swap_promise_checker(layer_tree_host_); do you think we should unit ...
6 years, 2 months ago (2014-10-02 17:15:54 UTC) #41
enne (OOO)
On 2014/10/02 17:15:54, danakj wrote: > do you think we should unit test this? PTAL ...
6 years, 2 months ago (2014-10-08 00:34:49 UTC) #42
danakj
https://codereview.chromium.org/508373002/diff/220001/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/508373002/diff/220001/cc/trees/single_thread_proxy.cc#newcode487 cc/trees/single_thread_proxy.cc:487: SwapPromise::SWAP_FAILS); On 2014/10/08 00:34:49, enne wrote: > Here's the ...
6 years, 2 months ago (2014-10-08 19:40:31 UTC) #43
danakj
Thanks very LGTM https://codereview.chromium.org/508373002/diff/220001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/508373002/diff/220001/cc/trees/layer_tree_host_unittest.cc#newcode5109 cc/trees/layer_tree_host_unittest.cc:5109: // Fail to swap. add "(no ...
6 years, 2 months ago (2014-10-08 19:45:15 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/508373002/240001
6 years, 2 months ago (2014-10-08 20:03:32 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/16431)
6 years, 2 months ago (2014-10-08 20:58:45 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/508373002/240001
6 years, 2 months ago (2014-10-09 06:17:48 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/23175)
6 years, 2 months ago (2014-10-09 06:31:58 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/508373002/260001
6 years, 2 months ago (2014-10-09 19:03:19 UTC) #56
commit-bot: I haz the power
Committed patchset #14 (id:260001)
6 years, 2 months ago (2014-10-09 20:09:55 UTC) #57
commit-bot: I haz the power
6 years, 2 months ago (2014-10-09 20:10:52 UTC) #58
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/98f3a6c5c30f1ecfc934838688ce265455a35ec9
Cr-Commit-Position: refs/heads/master@{#298960}

Powered by Google App Engine
This is Rietveld 408576698