diff options
author | kochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 08:29:43 +0000 |
---|---|---|
committer | kochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 08:29:43 +0000 |
commit | 585fa72fe0792a5a8f3d8e428046c1c40257854f (patch) | |
tree | c6932269fd96cc345a2a7604576833c75722c9c2 /cc/trees/layer_tree_host_unittest_animation.cc | |
parent | b027bb7ba4d6a8f8b42ea3848d4efd64218675ad (diff) | |
download | chromium_src-585fa72fe0792a5a8f3d8e428046c1c40257854f.zip chromium_src-585fa72fe0792a5a8f3d8e428046c1c40257854f.tar.gz chromium_src-585fa72fe0792a5a8f3d8e428046c1c40257854f.tar.bz2 |
Revert 256454 "cc: Allow sending BeginMainFrame before draw or a..."
Speculatively reverting this, which caused Android cc_unittests
crash on LayerTreeHostAnimationTestCancelAnimateCommit.
RunMultiThread_DirectRenderer_MainThreadPaint
BUG=351638
> cc: Allow sending BeginMainFrame before draw or activation
>
> BeginMainFrame before draw:
> Enabled by default because of concurrency benefits.
> When main thread painting, this will block the main thread from
> finishing the commit until the active tree has been drawn.
> When impl side painting, this does not block the main thread.
>
> The following flag will disable sending BeginMainFrame to the
> main thread before we draw the previous commit:
> --disable-main-frame-before-draw
>
> BeginMainFrame before activation:
> Disabled by default because of latency concerns.
> This applies only when impl-side-painting is enabled and will
> cause the main thread to block finishing the commit until the
> pending tree is activated.
>
> The following flags control whether BeginMainFrame is sent to
> the main thread before or after the previous commit has
> activated:
> --enable-main-frame-before-activation
> --disable-main-frame-before-activation
>
> BUG=293941
>
> Review URL: https://codereview.chromium.org/23907006
TBR=brianderson@chromium.org
Review URL: https://codereview.chromium.org/196893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_animation.cc')
-rw-r--r-- | cc/trees/layer_tree_host_unittest_animation.cc | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc index 171e71e..7a9b63f 100644 --- a/cc/trees/layer_tree_host_unittest_animation.cc +++ b/cc/trees/layer_tree_host_unittest_animation.cc @@ -829,15 +829,13 @@ MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestContinuousAnimate); class LayerTreeHostAnimationTestCancelAnimateCommit : public LayerTreeHostAnimationTest { public: - LayerTreeHostAnimationTestCancelAnimateCommit() - : num_animate_calls_(0), num_commit_calls_(0), num_draw_calls_(0) {} + LayerTreeHostAnimationTestCancelAnimateCommit() : num_animate_calls_(0) {} virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } virtual void Animate(base::TimeTicks) OVERRIDE { - num_animate_calls_++; // No-op animate will cancel the commit. - if (layer_tree_host()->source_frame_number() == 1) { + if (++num_animate_calls_ == 2) { EndTest(); return; } @@ -845,27 +843,19 @@ class LayerTreeHostAnimationTestCancelAnimateCommit } virtual void CommitCompleteOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { - num_commit_calls_++; - if (layer_tree_host()->source_frame_number() > 1) + if (num_animate_calls_ > 1) FAIL() << "Commit should have been canceled."; } virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { - num_draw_calls_++; - if (layer_tree_host()->source_frame_number() > 1) + if (num_animate_calls_ > 1) FAIL() << "Draw should have been canceled."; } - virtual void AfterTest() OVERRIDE { - EXPECT_EQ(2, num_animate_calls_); - EXPECT_EQ(1, num_commit_calls_); - EXPECT_EQ(1, num_draw_calls_); - } + virtual void AfterTest() OVERRIDE { EXPECT_EQ(2, num_animate_calls_); } private: int num_animate_calls_; - int num_commit_calls_; - int num_draw_calls_; FakeContentLayerClient client_; scoped_refptr<FakeContentLayer> content_; }; |