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

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

Issue 2011063002: cc: Use ScreenSpaceTransform to determine content scale (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make layout test need-auto-rebaseline Created 4 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
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_common_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_host_common_test.h" 5 #include "cc/test/layer_tree_host_common_test.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( 172 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties(
173 LayerImpl* root_layer, 173 LayerImpl* root_layer,
174 float device_scale_factor, 174 float device_scale_factor,
175 float page_scale_factor, 175 float page_scale_factor,
176 LayerImpl* page_scale_layer, 176 LayerImpl* page_scale_layer,
177 bool can_use_lcd_text, 177 bool can_use_lcd_text,
178 bool layers_always_allowed_lcd_text) { 178 bool layers_always_allowed_lcd_text) {
179 root_layer->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor); 179 root_layer->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor);
180 180
181 EXPECT_TRUE(page_scale_layer || (page_scale_factor == 1.f));
182
181 gfx::Transform identity_matrix; 183 gfx::Transform identity_matrix;
182 gfx::Size device_viewport_size = 184 gfx::Size device_viewport_size =
183 gfx::Size(root_layer->bounds().width() * device_scale_factor, 185 gfx::Size(root_layer->bounds().width() * device_scale_factor,
184 root_layer->bounds().height() * device_scale_factor); 186 root_layer->bounds().height() * device_scale_factor);
185 187
186 render_surface_layer_list_impl_.reset(new LayerImplList); 188 render_surface_layer_list_impl_.reset(new LayerImplList);
187 189
188 // We are probably not testing what is intended if the root_layer bounds are 190 // We are probably not testing what is intended if the root_layer bounds are
189 // empty. 191 // empty.
190 DCHECK(!root_layer->bounds().IsEmpty()); 192 DCHECK(!root_layer->bounds().IsEmpty());
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 229
228 LayerTreeHostCommonTest::LayerTreeHostCommonTest() 230 LayerTreeHostCommonTest::LayerTreeHostCommonTest()
229 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {} 231 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {}
230 232
231 LayerTreeHostCommonTest::LayerTreeHostCommonTest( 233 LayerTreeHostCommonTest::LayerTreeHostCommonTest(
232 const LayerTreeSettings& settings) 234 const LayerTreeSettings& settings)
233 : LayerTreeHostCommonTestBase(settings) { 235 : LayerTreeHostCommonTestBase(settings) {
234 } 236 }
235 237
236 } // namespace cc 238 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698