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

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

Issue 11017044: Remove root layer specialness in calculateDrawTransforms (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added assertion that rounding does not affect exact coverage testing Created 8 years, 1 month 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
« no previous file with comments | « cc/test/layer_tree_test_common.h ('k') | no next file » | 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/test/layer_tree_test_common.h" 7 #include "cc/test/layer_tree_test_common.h"
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "cc/active_animation.h" 10 #include "cc/active_animation.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 void ThreadedTest::endTestAfterDelay(int delayMilliseconds) 343 void ThreadedTest::endTestAfterDelay(int delayMilliseconds)
344 { 344 {
345 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::endTest)); 345 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::endTest));
346 } 346 }
347 347
348 void ThreadedTest::postSetNeedsAnimateToMainThread() 348 void ThreadedTest::postSetNeedsAnimateToMainThread()
349 { 349 {
350 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchSe tNeedsAnimate)); 350 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchSe tNeedsAnimate));
351 } 351 }
352 352
353 void ThreadedTest::postAddAnimationToMainThread() 353 void ThreadedTest::postAddAnimationToMainThread(Layer* layerToReceiveAnimation)
354 { 354 {
355 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchAd dAnimation)); 355 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchAd dAnimation, layerToReceiveAnimation));
356 } 356 }
357 357
358 void ThreadedTest::postAddInstantAnimationToMainThread() 358 void ThreadedTest::postAddInstantAnimationToMainThread()
359 { 359 {
360 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchAd dInstantAnimation)); 360 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchAd dInstantAnimation));
361 } 361 }
362 362
363 void ThreadedTest::postSetNeedsCommitToMainThread() 363 void ThreadedTest::postSetNeedsCommitToMainThread()
364 { 364 {
365 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchSe tNeedsCommit)); 365 m_mainThreadProxy->postTask(createThreadTask(this, &ThreadedTest::dispatchSe tNeedsCommit));
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 { 449 {
450 DCHECK(Proxy::isMainThread()); 450 DCHECK(Proxy::isMainThread());
451 451
452 if (m_finished) 452 if (m_finished)
453 return; 453 return;
454 454
455 if (m_layerTreeHost.get() && m_layerTreeHost->rootLayer()) 455 if (m_layerTreeHost.get() && m_layerTreeHost->rootLayer())
456 addOpacityTransitionToLayer(*m_layerTreeHost->rootLayer(), 0, 0, 0.5, fa lse); 456 addOpacityTransitionToLayer(*m_layerTreeHost->rootLayer(), 0, 0, 0.5, fa lse);
457 } 457 }
458 458
459 void ThreadedTest::dispatchAddAnimation() 459 void ThreadedTest::dispatchAddAnimation(Layer* layerToReceiveAnimation)
460 { 460 {
461 DCHECK(Proxy::isMainThread()); 461 DCHECK(Proxy::isMainThread());
462 462
463 if (m_finished) 463 if (m_finished)
464 return; 464 return;
465 465
466 if (m_layerTreeHost.get() && m_layerTreeHost->rootLayer()) 466 if (layerToReceiveAnimation)
467 addOpacityTransitionToLayer(*m_layerTreeHost->rootLayer(), 10, 0, 0.5, t rue); 467 addOpacityTransitionToLayer(*layerToReceiveAnimation, 10, 0, 0.5, true);
468 } 468 }
469 469
470 void ThreadedTest::dispatchSetNeedsAnimateAndCommit() 470 void ThreadedTest::dispatchSetNeedsAnimateAndCommit()
471 { 471 {
472 DCHECK(Proxy::isMainThread()); 472 DCHECK(Proxy::isMainThread());
473 473
474 if (m_finished) 474 if (m_finished)
475 return; 475 return;
476 476
477 if (m_layerTreeHost.get()) { 477 if (m_layerTreeHost.get()) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 if (m_timedOut) { 577 if (m_timedOut) {
578 FAIL() << "Test timed out"; 578 FAIL() << "Test timed out";
579 Platform::current()->compositorSupport()->shutdown(); 579 Platform::current()->compositorSupport()->shutdown();
580 return; 580 return;
581 } 581 }
582 afterTest(); 582 afterTest();
583 Platform::current()->compositorSupport()->shutdown(); 583 Platform::current()->compositorSupport()->shutdown();
584 } 584 }
585 585
586 } // namespace WebKitTests 586 } // namespace WebKitTests
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698