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

Side by Side Diff: cc/test/layer_tree_test_common.cc

Issue 12642010: Implement on demand quad rasterization for PicturePiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes, adding unit tests. Created 7 years, 9 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/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host_impl_unittest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/test/layer_tree_test_common.h" 5 #include "cc/test/layer_tree_test_common.h"
6 6
7 #include "cc/animation/animation.h" 7 #include "cc/animation/animation.h"
8 #include "cc/animation/animation_registrar.h" 8 #include "cc/animation/animation_registrar.h"
9 #include "cc/animation/layer_animation_controller.h" 9 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/animation/timing_function.h" 10 #include "cc/animation/timing_function.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 310
311 ThreadedTest::~ThreadedTest() 311 ThreadedTest::~ThreadedTest()
312 { 312 {
313 } 313 }
314 314
315 void ThreadedTest::endTest() 315 void ThreadedTest::endTest()
316 { 316 {
317 // For the case where we endTest during beginTest(), set a flag to indicate that 317 // For the case where we endTest during beginTest(), set a flag to indicate that
318 // the test should end the second beginTest regains control. 318 // the test should end the second beginTest regains control.
319 if (m_beginning) 319 if (m_beginning) {
320 m_endWhenBeginReturns = true; 320 m_endWhenBeginReturns = true;
321 else 321 } else {
322 proxy()->MainThread()->PostTask(base::Bind(&ThreadedTest::realEndTest, m _mainThreadWeakPtr)); 322 // Racy timeouts and explicit endTest calls might have cleaned up the tr ee host.
323 if (proxy())
Leandro GraciĆ” Gil 2013/03/19 17:30:58 Found flakiness here when creating the new layer-b
324 proxy()->MainThread()->PostTask(base::Bind(&ThreadedTest::realEndTes t, m_mainThreadWeakPtr));
325 }
323 } 326 }
324 327
325 void ThreadedTest::endTestAfterDelay(int delayMilliseconds) 328 void ThreadedTest::endTestAfterDelay(int delayMilliseconds)
326 { 329 {
327 proxy()->MainThread()->PostTask(base::Bind(&ThreadedTest::endTest, m_mainThr eadWeakPtr)); 330 proxy()->MainThread()->PostTask(base::Bind(&ThreadedTest::endTest, m_mainThr eadWeakPtr));
328 } 331 }
329 332
330 void ThreadedTest::postAddAnimationToMainThread(Layer* layerToReceiveAnimation) 333 void ThreadedTest::postAddAnimationToMainThread(Layer* layerToReceiveAnimation)
331 { 334 {
332 proxy()->MainThread()->PostTask(base::Bind(&ThreadedTest::dispatchAddAnimati on, m_mainThreadWeakPtr, base::Unretained(layerToReceiveAnimation))); 335 proxy()->MainThread()->PostTask(base::Bind(&ThreadedTest::dispatchAddAnimati on, m_mainThreadWeakPtr, base::Unretained(layerToReceiveAnimation)));
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 ASSERT_FALSE(m_layerTreeHost.get()); 522 ASSERT_FALSE(m_layerTreeHost.get());
520 m_client.reset(); 523 m_client.reset();
521 if (m_timedOut) { 524 if (m_timedOut) {
522 FAIL() << "Test timed out"; 525 FAIL() << "Test timed out";
523 return; 526 return;
524 } 527 }
525 afterTest(); 528 afterTest();
526 } 529 }
527 530
528 } // namespace cc 531 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698