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

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

Issue 2758343002: cc: Use Element Id to Record Animation Changes (Closed)
Patch Set: fix for test Created 3 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
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host.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 "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 scoped_refptr<Layer> root_layer = Layer::Create(); 683 scoped_refptr<Layer> root_layer = Layer::Create();
684 root_layer->SetBounds(gfx::Size(1, 1)); 684 root_layer->SetBounds(gfx::Size(1, 1));
685 layer_tree_host()->SetRootLayer(root_layer); 685 layer_tree_host()->SetRootLayer(root_layer);
686 } 686 }
687 687
688 gfx::Size root_bounds = layer_tree_host()->root_layer()->bounds(); 688 gfx::Size root_bounds = layer_tree_host()->root_layer()->bounds();
689 gfx::Size device_root_bounds = gfx::ScaleToCeiledSize( 689 gfx::Size device_root_bounds = gfx::ScaleToCeiledSize(
690 root_bounds, layer_tree_host()->device_scale_factor()); 690 root_bounds, layer_tree_host()->device_scale_factor());
691 layer_tree_host()->SetViewportSize(device_root_bounds); 691 layer_tree_host()->SetViewportSize(device_root_bounds);
692 layer_tree_host()->root_layer()->SetIsDrawable(true); 692 layer_tree_host()->root_layer()->SetIsDrawable(true);
693 layer_tree_host()->SetElementIdsForTesting();
693 } 694 }
694 695
695 void LayerTreeTest::Timeout() { 696 void LayerTreeTest::Timeout() {
696 timed_out_ = true; 697 timed_out_ = true;
697 EndTest(); 698 EndTest();
698 } 699 }
699 700
700 void LayerTreeTest::RealEndTest() { 701 void LayerTreeTest::RealEndTest() {
701 // TODO(mithro): Make this method only end when not inside an impl frame. 702 // TODO(mithro): Make this method only end when not inside an impl frame.
702 bool main_frame_will_happen = 703 bool main_frame_will_happen =
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 DCHECK(task_runner_provider()->IsMainThread() || 888 DCHECK(task_runner_provider()->IsMainThread() ||
888 task_runner_provider()->IsMainThreadBlocked()); 889 task_runner_provider()->IsMainThreadBlocked());
889 return layer_tree_host_.get(); 890 return layer_tree_host_.get();
890 } 891 }
891 892
892 Proxy* LayerTreeTest::proxy() { 893 Proxy* LayerTreeTest::proxy() {
893 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; 894 return layer_tree_host() ? layer_tree_host()->proxy() : NULL;
894 } 895 }
895 896
896 } // namespace cc 897 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698