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

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

Issue 1823833002: cc : Update render surfaces using LayerListIterator instead of treewalk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( 162 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties(
163 LayerImpl* root_layer, 163 LayerImpl* root_layer,
164 float device_scale_factor, 164 float device_scale_factor,
165 float page_scale_factor, 165 float page_scale_factor,
166 LayerImpl* page_scale_layer, 166 LayerImpl* page_scale_layer,
167 bool can_use_lcd_text, 167 bool can_use_lcd_text,
168 bool layers_always_allowed_lcd_text) { 168 bool layers_always_allowed_lcd_text) {
169 host_impl()->active_tree()->SetDeviceScaleFactor(device_scale_factor); 169 host_impl()->active_tree()->SetDeviceScaleFactor(device_scale_factor);
170 host_impl()->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); 170 if (host_impl()->active_tree()->property_trees()->needs_rebuild)
ajuma 2016/03/22 14:41:54 Why does this depend on whether we need to rebuild
jaydasika 2016/03/22 20:48:34 Whoops, it should be the other way around, if we a
171 host_impl()->active_tree()->SetPageScaleOnActiveTree(page_scale_factor);
171 172
172 gfx::Transform identity_matrix; 173 gfx::Transform identity_matrix;
173 gfx::Size device_viewport_size = 174 gfx::Size device_viewport_size =
174 gfx::Size(root_layer->bounds().width() * device_scale_factor, 175 gfx::Size(root_layer->bounds().width() * device_scale_factor,
175 root_layer->bounds().height() * device_scale_factor); 176 root_layer->bounds().height() * device_scale_factor);
176 177
177 render_surface_layer_list_impl_.reset(new LayerImplList); 178 render_surface_layer_list_impl_.reset(new LayerImplList);
178 179
179 // We are probably not testing what is intended if the root_layer bounds are 180 // We are probably not testing what is intended if the root_layer bounds are
180 // empty. 181 // empty.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 229
229 LayerTreeHostCommonTest::LayerTreeHostCommonTest() 230 LayerTreeHostCommonTest::LayerTreeHostCommonTest()
230 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {} 231 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {}
231 232
232 LayerTreeHostCommonTest::LayerTreeHostCommonTest( 233 LayerTreeHostCommonTest::LayerTreeHostCommonTest(
233 const LayerTreeSettings& settings) 234 const LayerTreeSettings& settings)
234 : LayerTreeHostCommonTestBase(settings) { 235 : LayerTreeHostCommonTestBase(settings) {
235 } 236 }
236 237
237 } // namespace cc 238 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698