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

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

Issue 465853004: Moving RenderSurface creation outside of CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated unit tests Created 6 years, 3 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 "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/layers/layer_impl.h" 8 #include "cc/layers/layer_impl.h"
9 #include "cc/trees/layer_tree_host_common.h" 9 #include "cc/trees/layer_tree_host_common.h"
10 10
(...skipping 13 matching lines...) Expand all
24 const gfx::PointF& position, 24 const gfx::PointF& position,
25 const gfx::Size& bounds, 25 const gfx::Size& bounds,
26 bool flatten_transform, 26 bool flatten_transform,
27 bool is_3d_sorted) { 27 bool is_3d_sorted) {
28 SetLayerPropertiesForTestingInternal<Layer>(layer, 28 SetLayerPropertiesForTestingInternal<Layer>(layer,
29 transform, 29 transform,
30 transform_origin, 30 transform_origin,
31 position, 31 position,
32 bounds, 32 bounds,
33 flatten_transform, 33 flatten_transform,
34 is_3d_sorted); 34 is_3d_sorted,
35 false);
35 } 36 }
36 37
37 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( 38 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting(
38 LayerImpl* layer, 39 LayerImpl* layer,
39 const gfx::Transform& transform, 40 const gfx::Transform& transform,
40 const gfx::Point3F& transform_origin, 41 const gfx::Point3F& transform_origin,
41 const gfx::PointF& position, 42 const gfx::PointF& position,
42 const gfx::Size& bounds, 43 const gfx::Size& bounds,
43 bool flatten_transform, 44 bool flatten_transform,
44 bool is_3d_sorted) { 45 bool is_3d_sorted,
46 bool create_render_surface) {
45 SetLayerPropertiesForTestingInternal<LayerImpl>(layer, 47 SetLayerPropertiesForTestingInternal<LayerImpl>(layer,
46 transform, 48 transform,
47 transform_origin, 49 transform_origin,
48 position, 50 position,
49 bounds, 51 bounds,
50 flatten_transform, 52 flatten_transform,
51 is_3d_sorted); 53 is_3d_sorted,
54 create_render_surface);
52 layer->SetContentBounds(bounds); 55 layer->SetContentBounds(bounds);
53 } 56 }
54 57
55 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( 58 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties(
56 Layer* root_layer, 59 Layer* root_layer,
57 float device_scale_factor, 60 float device_scale_factor,
58 float page_scale_factor, 61 float page_scale_factor,
59 Layer* page_scale_application_layer, 62 Layer* page_scale_application_layer,
60 bool can_use_lcd_text) { 63 bool can_use_lcd_text) {
61 EXPECT_TRUE(page_scale_application_layer || (page_scale_factor == 1.f)); 64 EXPECT_TRUE(page_scale_application_layer || (page_scale_factor == 1.f));
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 inputs.can_adjust_raster_scales = true; 107 inputs.can_adjust_raster_scales = true;
105 108
106 ++render_surface_layer_list_count_; 109 ++render_surface_layer_list_count_;
107 inputs.current_render_surface_layer_list_id = 110 inputs.current_render_surface_layer_list_id =
108 render_surface_layer_list_count_; 111 render_surface_layer_list_count_;
109 112
110 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 113 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
111 } 114 }
112 115
113 } // namespace cc 116 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698