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

Side by Side Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 22469002: cc: Fix aborted commits with evicted textures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix animation test Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "cc/animation/animation_curve.h" 7 #include "cc/animation/animation_curve.h"
8 #include "cc/animation/layer_animation_controller.h" 8 #include "cc/animation/layer_animation_controller.h"
9 #include "cc/animation/timing_function.h" 9 #include "cc/animation/timing_function.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 virtual void BeginTest() OVERRIDE { 263 virtual void BeginTest() OVERRIDE {
264 PostAddAnimationToMainThread(layer_tree_host()->root_layer()); 264 PostAddAnimationToMainThread(layer_tree_host()->root_layer());
265 } 265 }
266 266
267 // Use WillAnimateLayers to set visible false before the animation runs and 267 // Use WillAnimateLayers to set visible false before the animation runs and
268 // causes a commit, so we block the second visible animate in single-thread 268 // causes a commit, so we block the second visible animate in single-thread
269 // mode. 269 // mode.
270 virtual void WillAnimateLayers( 270 virtual void WillAnimateLayers(
271 LayerTreeHostImpl* host_impl, 271 LayerTreeHostImpl* host_impl,
272 base::TimeTicks monotonic_time) OVERRIDE { 272 base::TimeTicks monotonic_time) OVERRIDE {
273 // Verify that the host can draw, it's just not visible.
274 EXPECT_TRUE(host_impl->CanDraw());
enne (OOO) 2013/08/06 21:41:21 This test started failing because of the changes t
273 if (num_animates_ < 2) { 275 if (num_animates_ < 2) {
274 if (!num_animates_) { 276 if (!num_animates_) {
275 // We have a long animation running. It should continue to tick even 277 // We have a long animation running. It should continue to tick even
276 // if we are not visible. 278 // if we are not visible.
277 PostSetVisibleToMainThread(false); 279 PostSetVisibleToMainThread(false);
278 } 280 }
279 num_animates_++; 281 num_animates_++;
280 return; 282 return;
281 } 283 }
282 EndTest(); 284 EndTest();
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 int finished_times_; 797 int finished_times_;
796 FakeContentLayerClient client_; 798 FakeContentLayerClient client_;
797 scoped_refptr<FakeContentLayer> content_; 799 scoped_refptr<FakeContentLayer> content_;
798 }; 800 };
799 801
800 MULTI_THREAD_TEST_F( 802 MULTI_THREAD_TEST_F(
801 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations); 803 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations);
802 804
803 } // namespace 805 } // namespace
804 } // namespace cc 806 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698