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

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

Issue 14301021: cc: Don't pass simple well-defined classes by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host.h » ('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.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 base::Bind(&LayerTreeTest::DispatchAcquireLayerTextures, 364 base::Bind(&LayerTreeTest::DispatchAcquireLayerTextures,
365 main_thread_weak_ptr_)); 365 main_thread_weak_ptr_));
366 } 366 }
367 367
368 void LayerTreeTest::PostSetNeedsRedrawToMainThread() { 368 void LayerTreeTest::PostSetNeedsRedrawToMainThread() {
369 proxy()->MainThread()->PostTask( 369 proxy()->MainThread()->PostTask(
370 base::Bind(&LayerTreeTest::DispatchSetNeedsRedraw, 370 base::Bind(&LayerTreeTest::DispatchSetNeedsRedraw,
371 main_thread_weak_ptr_)); 371 main_thread_weak_ptr_));
372 } 372 }
373 373
374 void LayerTreeTest::PostSetNeedsRedrawRectToMainThread( 374 void LayerTreeTest::PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect) {
375 const gfx::Rect& damage_rect) {
376 proxy()->MainThread()->PostTask( 375 proxy()->MainThread()->PostTask(
377 base::Bind(&LayerTreeTest::DispatchSetNeedsRedrawRect, 376 base::Bind(&LayerTreeTest::DispatchSetNeedsRedrawRect,
378 main_thread_weak_ptr_, damage_rect)); 377 main_thread_weak_ptr_, damage_rect));
379 } 378 }
380 379
381 void LayerTreeTest::PostSetVisibleToMainThread(bool visible) { 380 void LayerTreeTest::PostSetVisibleToMainThread(bool visible) {
382 proxy()->MainThread()->PostTask( 381 proxy()->MainThread()->PostTask(
383 base::Bind(&LayerTreeTest::DispatchSetVisible, 382 base::Bind(&LayerTreeTest::DispatchSetVisible,
384 main_thread_weak_ptr_, 383 main_thread_weak_ptr_,
385 visible)); 384 visible));
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 layer_tree_host_->AcquireLayerTextures(); 494 layer_tree_host_->AcquireLayerTextures();
496 } 495 }
497 496
498 void LayerTreeTest::DispatchSetNeedsRedraw() { 497 void LayerTreeTest::DispatchSetNeedsRedraw() {
499 DCHECK(!proxy() || proxy()->IsMainThread()); 498 DCHECK(!proxy() || proxy()->IsMainThread());
500 499
501 if (layer_tree_host_) 500 if (layer_tree_host_)
502 layer_tree_host_->SetNeedsRedraw(); 501 layer_tree_host_->SetNeedsRedraw();
503 } 502 }
504 503
505 void LayerTreeTest::DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect) { 504 void LayerTreeTest::DispatchSetNeedsRedrawRect(gfx::Rect damage_rect) {
506 DCHECK(!proxy() || proxy()->IsMainThread()); 505 DCHECK(!proxy() || proxy()->IsMainThread());
507 506
508 if (layer_tree_host_) 507 if (layer_tree_host_)
509 layer_tree_host_->SetNeedsRedrawRect(damage_rect); 508 layer_tree_host_->SetNeedsRedrawRect(damage_rect);
510 } 509 }
511 510
512 void LayerTreeTest::DispatchSetVisible(bool visible) { 511 void LayerTreeTest::DispatchSetVisible(bool visible) {
513 DCHECK(!proxy() || proxy()->IsMainThread()); 512 DCHECK(!proxy() || proxy()->IsMainThread());
514 513
515 if (!layer_tree_host_) 514 if (!layer_tree_host_)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 ASSERT_FALSE(layer_tree_host_.get()); 573 ASSERT_FALSE(layer_tree_host_.get());
575 client_.reset(); 574 client_.reset();
576 if (timed_out_) { 575 if (timed_out_) {
577 FAIL() << "Test timed out"; 576 FAIL() << "Test timed out";
578 return; 577 return;
579 } 578 }
580 AfterTest(); 579 AfterTest();
581 } 580 }
582 581
583 } // namespace cc 582 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698