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

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

Issue 2140313004: cc: Fix non root copy request visible rect in HighDPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 | « no previous file | cc/trees/draw_property_utils.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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 can_render_to_separate_surface, 166 can_render_to_separate_surface,
167 root_layer->layer_tree_impl()->property_trees(), 167 root_layer->layer_tree_impl()->property_trees(),
168 update_layer_list_impl_.get()); 168 update_layer_list_impl_.get());
169 } 169 }
170 170
171 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( 171 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties(
172 LayerImpl* root_layer, 172 LayerImpl* root_layer,
173 float device_scale_factor, 173 float device_scale_factor,
174 float page_scale_factor, 174 float page_scale_factor,
175 LayerImpl* page_scale_layer) { 175 LayerImpl* page_scale_layer) {
176 if (device_scale_factor !=
177 root_layer->layer_tree_impl()->device_scale_factor())
178 root_layer->layer_tree_impl()->property_trees()->needs_rebuild = true;
179
176 root_layer->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor); 180 root_layer->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor);
177 181
178 EXPECT_TRUE(page_scale_layer || (page_scale_factor == 1.f)); 182 EXPECT_TRUE(page_scale_layer || (page_scale_factor == 1.f));
179 183
180 gfx::Transform identity_matrix; 184 gfx::Transform identity_matrix;
181 gfx::Size device_viewport_size = 185 gfx::Size device_viewport_size =
182 gfx::Size(root_layer->bounds().width() * device_scale_factor, 186 gfx::Size(root_layer->bounds().width() * device_scale_factor,
183 root_layer->bounds().height() * device_scale_factor); 187 root_layer->bounds().height() * device_scale_factor);
184 188
185 render_surface_layer_list_impl_.reset(new LayerImplList); 189 render_surface_layer_list_impl_.reset(new LayerImplList);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 228
225 LayerTreeHostCommonTest::LayerTreeHostCommonTest() 229 LayerTreeHostCommonTest::LayerTreeHostCommonTest()
226 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {} 230 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {}
227 231
228 LayerTreeHostCommonTest::LayerTreeHostCommonTest( 232 LayerTreeHostCommonTest::LayerTreeHostCommonTest(
229 const LayerTreeSettings& settings) 233 const LayerTreeSettings& settings)
230 : LayerTreeHostCommonTestBase(settings) { 234 : LayerTreeHostCommonTestBase(settings) {
231 } 235 }
232 236
233 } // namespace cc 237 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698