|
|
Created:
6 years, 10 months ago by Sami Modified:
6 years, 9 months ago CC:
chromium-reviews, cc-bugs_chromium.org, trchen Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionMake it possible to cancel commits following an animation
If we didn't invalidate anything when running main thread animations, there is
no need to continue with the commit.
BUG=345584, 347255, 348433
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254558
Patch Set 1 #Patch Set 2 : Fix failing test and add new test. #Patch Set 3 : Fix telemetry screenshot test. #Patch Set 4 : Add test for SetNextCommitForcesRedraw. #Patch Set 5 : Fix unit test flakiness in debug builds. #
Total comments: 2
Patch Set 6 : Fix cc_perftests failure. Make unit test limits stricter. #
Total comments: 1
Patch Set 7 : Swap EXPECT_EQ order #Patch Set 8 : Fix bug with calling SetNeedsAnimate after SetNeedsCommit. #
Total comments: 1
Patch Set 9 : Made test less strict. #
Messages
Total messages: 51 (0 generated)
This is a tentative patch and I'm hoping you could tell me why it's a non-starter. I noticed we haven't allowed animation commits to be canceled all the way from https://codereview.chromium.org/178123003/, but I'm not sure why.
I can't think of any reason why we shouldn't do this. Sounds good to me. Can you add an animation-only commit aborting unit test that tests that also sets animate during update (to test the other code block you moved?) There should be some LayerTreeHost aborting and animation unit tests to crib from.
Thanks for the encouraging words. Looks like this breaks LayerTreeHostAnimationTestContinuousAnimate so I'll figure out why first.
LayerTreeHostAnimationTestContinuousAnimate was failing because it wasn't actually painting any new content during Animate(), so the commit was correctly getting canceled. I've fixed that and added the test you asked for. PTAL, thanks!
This reminded me of https://codereview.chromium.org/133263004/ which I guess was reverted. If this can stick it might make that easier to land. The revert was here: https://codereview.chromium.org/141833002
lgtm. Thanks for noticing this, and thanks for the test. :)
The CQ bit was checked by enne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/60001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/60001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/60001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on mac_rel for step(s) telemetry_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&nu...
On 2014/02/24 23:52:06, I haz the power (commit-bot) wrote: > Retried try job too often on mac_rel for step(s) telemetry_unittests > http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&nu... Looks like the telemetry tab screenshot test failed for a similar reason as the other unit test earlier: it requests an animation but doesn't actually provide any new content. I've fixed this by making LayerTreeHost lie that there is new content when it wants to force a redraw. Dana, Enne, any issues with that?
I think that LGTM.
On 2014/02/25 16:36:59, danakj wrote: > I think that LGTM. A quick unit test that would fail without that would be nice. Much faster turnaround on noticing problems than breaking a telemetry perf test.
On 2014/02/25 16:38:11, danakj wrote: > A quick unit test that would fail without that would be nice. Much faster > turnaround on noticing problems than breaking a telemetry perf test. Agreed and added :)
The CQ bit was checked by skyostil@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/280001
On Tue, Feb 25, 2014 at 12:16 PM, <skyostil@chromium.org> wrote: > On 2014/02/25 16:38:11, danakj wrote: > >> A quick unit test that would fail without that would be nice. Much faster >> turnaround on noticing problems than breaking a telemetry perf test. >> > > Agreed and added :) > thanks! > > https://codereview.chromium.org/178123003/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/280001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/280001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/280001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/280001
The CQ bit was unchecked by phajdan.jr@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
The CQ bit was checked by phajdan.jr@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/280001
Message was sent while issue was closed.
Change committed as 253439
Message was sent while issue was closed.
CL reverted in https://codereview.chromium.org/181383005
The CQ bit was checked by skyostil@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/300001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_clang_dbg
https://codereview.chromium.org/178123003/diff/300001/cc/trees/layer_tree_hos... File cc/trees/layer_tree_host_unittest_animation.cc (right): https://codereview.chromium.org/178123003/diff/300001/cc/trees/layer_tree_hos... cc/trees/layer_tree_host_unittest_animation.cc:892: EXPECT_GT(num_draw_layers_, 0); The first commit will always draw. Do you want this to be >= 1? https://codereview.chromium.org/178123003/diff/300001/cc/trees/layer_tree_hos... cc/trees/layer_tree_host_unittest_animation.cc:892: EXPECT_GT(num_draw_layers_, 0); The first commit will always draw, maybe you want this to be > 1, and do the EndTest on the 2nd draw?
On 2014/02/26 19:09:04, danakj wrote: > https://codereview.chromium.org/178123003/diff/300001/cc/trees/layer_tree_hos... > cc/trees/layer_tree_host_unittest_animation.cc:892: EXPECT_GT(num_draw_layers_, > 0); > The first commit will always draw, maybe you want this to be > 1, and do the > EndTest on the 2nd draw? Thanks, I knew I missed something. I've now made it stop end the test after two draws and only animate twice, so I think I can check that num_draws == 2 here. (I also fixed the same animate-but-no-new-content bug in cc_perftests.) Could you do another sanity check please?
LGTM https://codereview.chromium.org/178123003/diff/320001/cc/trees/layer_tree_hos... File cc/trees/layer_tree_host_unittest_animation.cc (right): https://codereview.chromium.org/178123003/diff/320001/cc/trees/layer_tree_hos... cc/trees/layer_tree_host_unittest_animation.cc:893: EXPECT_EQ(num_draw_layers_, 2); order should be: expected, actual
The CQ bit was checked by skyostil@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/340001
lgtm
Message was sent while issue was closed.
Change committed as 253910
Message was sent while issue was closed.
Hey sami, this broke the rasterize_and_record_micro benchmark in telemetry: https://code.google.com/p/chromium/issues/detail?id=348433 Im going to revert it to see if it fixes things.
Third time's the charm :) The problem was that calling SetNeedsAnimate() after SetNeedsCommit() would reset the can_cancel_commit flag to true, causing the commit to possibly get canceled. I've fixed this by not touching that flag at all in SetNeedsAnimate() and instead relying on the commit to set it to true. There's a new test for this, and one of the original tests needed a tweak to not depend on this. Thanks for the reviews so far! One more look?
Thanks for the new test, LGTM https://codereview.chromium.org/178123003/diff/360001/cc/trees/layer_tree_hos... File cc/trees/layer_tree_host_unittest_animation.cc (right): https://codereview.chromium.org/178123003/diff/360001/cc/trees/layer_tree_hos... cc/trees/layer_tree_host_unittest_animation.cc:930: EXPECT_EQ(3, num_animate_); Can you test >= 2 instead of == 3 here? If the test ended and didn't do a 3rd commit it should still pass?
On 2014/03/03 16:41:46, danakj wrote: > Thanks for the new test, LGTM > > https://codereview.chromium.org/178123003/diff/360001/cc/trees/layer_tree_hos... > File cc/trees/layer_tree_host_unittest_animation.cc (right): > > https://codereview.chromium.org/178123003/diff/360001/cc/trees/layer_tree_hos... > cc/trees/layer_tree_host_unittest_animation.cc:930: EXPECT_EQ(3, num_animate_); > Can you test >= 2 instead of == 3 here? If the test ended and didn't do a 3rd > commit it should still pass? Ah, good idea, done. It's a little unfortunate the test harness is non-deterministic in this way.
The CQ bit was checked by skyostil@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/380001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/380001
On Mon, Mar 3, 2014 at 12:17 PM, <skyostil@chromium.org> wrote: > On 2014/03/03 16:41:46, danakj wrote: > >> Thanks for the new test, LGTM >> > > > https://codereview.chromium.org/178123003/diff/360001/cc/ > trees/layer_tree_host_unittest_animation.cc > >> File cc/trees/layer_tree_host_unittest_animation.cc (right): >> > > > https://codereview.chromium.org/178123003/diff/360001/cc/ > trees/layer_tree_host_unittest_animation.cc#newcode930 > >> cc/trees/layer_tree_host_unittest_animation.cc:930: EXPECT_EQ(3, >> > num_animate_); > >> Can you test >= 2 instead of == 3 here? If the test ended and didn't do a >> 3rd >> commit it should still pass? >> > > Ah, good idea, done. It's a little unfortunate the test harness is > non-deterministic in this way. > It actually should be deterministic now, this was a huge source of flake in the past, but maybe we change it one day, who knows :) > > https://codereview.chromium.org/178123003/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/380001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/178123003/380001
Message was sent while issue was closed.
Change committed as 254558 |