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

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

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 6 years, 6 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_pixel_test.cc ('k') | cc/trees/damage_tracker_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.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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 // so that those tasks will happen before the first commit. 530 // so that those tasks will happen before the first commit.
531 if (layer_tree_host_) { 531 if (layer_tree_host_) {
532 static_cast<LayerTreeHostForTesting*>(layer_tree_host_.get()) 532 static_cast<LayerTreeHostForTesting*>(layer_tree_host_.get())
533 ->set_test_started(true); 533 ->set_test_started(true);
534 } 534 }
535 } 535 }
536 536
537 void LayerTreeTest::SetupTree() { 537 void LayerTreeTest::SetupTree() {
538 if (!layer_tree_host_->root_layer()) { 538 if (!layer_tree_host_->root_layer()) {
539 scoped_refptr<Layer> root_layer = Layer::Create(); 539 scoped_refptr<Layer> root_layer = Layer::Create();
540 root_layer->SetAnchorPoint(gfx::PointF());
541 root_layer->SetBounds(gfx::Size(1, 1)); 540 root_layer->SetBounds(gfx::Size(1, 1));
542 root_layer->SetIsDrawable(true); 541 root_layer->SetIsDrawable(true);
543 layer_tree_host_->SetRootLayer(root_layer); 542 layer_tree_host_->SetRootLayer(root_layer);
544 } 543 }
545 544
546 gfx::Size root_bounds = layer_tree_host_->root_layer()->bounds(); 545 gfx::Size root_bounds = layer_tree_host_->root_layer()->bounds();
547 gfx::Size device_root_bounds = gfx::ToCeiledSize( 546 gfx::Size device_root_bounds = gfx::ToCeiledSize(
548 gfx::ScaleSize(root_bounds, layer_tree_host_->device_scale_factor())); 547 gfx::ScaleSize(root_bounds, layer_tree_host_->device_scale_factor()));
549 layer_tree_host_->SetViewportSize(device_root_bounds); 548 layer_tree_host_->SetViewportSize(device_root_bounds);
550 } 549 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 return -1; 736 return -1;
738 } 737 }
739 738
740 void LayerTreeTest::DestroyLayerTreeHost() { 739 void LayerTreeTest::DestroyLayerTreeHost() {
741 if (layer_tree_host_ && layer_tree_host_->root_layer()) 740 if (layer_tree_host_ && layer_tree_host_->root_layer())
742 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 741 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
743 layer_tree_host_.reset(); 742 layer_tree_host_.reset();
744 } 743 }
745 744
746 } // namespace cc 745 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698