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

Side by Side Diff: cc/trees/layer_tree_host_perftest.cc

Issue 13637017: Delete layout_viewport_size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void ReadTestFile(std::string name) { 82 void ReadTestFile(std::string name) {
83 test_name_ = name; 83 test_name_ = name;
84 base::FilePath test_data_dir; 84 base::FilePath test_data_dir;
85 ASSERT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir)); 85 ASSERT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir));
86 base::FilePath json_file = test_data_dir.AppendASCII(name + ".json"); 86 base::FilePath json_file = test_data_dir.AppendASCII(name + ".json");
87 ASSERT_TRUE(file_util::ReadFileToString(json_file, &json_)); 87 ASSERT_TRUE(file_util::ReadFileToString(json_file, &json_));
88 } 88 }
89 89
90 virtual void BuildTree() OVERRIDE { 90 virtual void BuildTree() OVERRIDE {
91 gfx::Size viewport = gfx::Size(720, 1038); 91 gfx::Size viewport = gfx::Size(720, 1038);
92 layer_tree_host()->SetViewportSize(viewport, viewport); 92 layer_tree_host()->SetViewportSize(viewport);
93 scoped_refptr<Layer> root = ParseTreeFromJson(json_, 93 scoped_refptr<Layer> root = ParseTreeFromJson(json_,
94 &fake_content_layer_client_); 94 &fake_content_layer_client_);
95 ASSERT_TRUE(root.get()); 95 ASSERT_TRUE(root.get());
96 layer_tree_host()->SetRootLayer(root); 96 layer_tree_host()->SetRootLayer(root);
97 } 97 }
98 98
99 private: 99 private:
100 std::string json_; 100 std::string json_;
101 }; 101 };
102 102
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 scoped_refptr<Layer> scrollable_; 136 scoped_refptr<Layer> scrollable_;
137 }; 137 };
138 138
139 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePage) { 139 TEST_F(ScrollingLayerTreePerfTest, LongScrollablePage) {
140 ReadTestFile("long_scrollable_page"); 140 ReadTestFile("long_scrollable_page");
141 RunTest(false); 141 RunTest(false);
142 } 142 }
143 143
144 } // namespace 144 } // namespace
145 } // namespace cc 145 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698