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

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

Issue 1505243003: Revert of Create RenderSurface on Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@alwayspt
Patch Set: rebase Created 5 years 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/test/layer_test_common.h ('k') | cc/test/layer_tree_host_common_test.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 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
7 7
8 #include <algorithm>
9 #include <vector> 8 #include <vector>
10 9
11 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
12 #include "cc/layers/layer_lists.h" 11 #include "cc/layers/layer_lists.h"
13 #include "cc/layers/layer_settings.h" 12 #include "cc/layers/layer_settings.h"
14 #include "cc/test/fake_layer_tree_host_client.h" 13 #include "cc/test/fake_layer_tree_host_client.h"
15 #include "cc/test/layer_test_common.h" 14 #include "cc/test/layer_test_common.h"
16 #include "cc/test/test_task_graph_runner.h" 15 #include "cc/test/test_task_graph_runner.h"
17 #include "cc/trees/layer_tree_settings.h" 16 #include "cc/trees/layer_tree_settings.h"
18 #include "cc/trees/property_tree.h" 17 #include "cc/trees/property_tree.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const gfx::Size& bounds, 59 const gfx::Size& bounds,
61 bool flatten_transform, 60 bool flatten_transform,
62 bool is_3d_sorted); 61 bool is_3d_sorted);
63 62
64 void SetLayerPropertiesForTesting(LayerImpl* layer, 63 void SetLayerPropertiesForTesting(LayerImpl* layer,
65 const gfx::Transform& transform, 64 const gfx::Transform& transform,
66 const gfx::Point3F& transform_origin, 65 const gfx::Point3F& transform_origin,
67 const gfx::PointF& position, 66 const gfx::PointF& position,
68 const gfx::Size& bounds, 67 const gfx::Size& bounds,
69 bool flatten_transform, 68 bool flatten_transform,
70 bool is_3d_sorted);
71
72 void SetLayerPropertiesForTesting(LayerImpl* layer,
73 const gfx::Transform& transform,
74 const gfx::Point3F& transform_origin,
75 const gfx::PointF& position,
76 const gfx::Size& bounds,
77 bool flatten_transform,
78 bool is_3d_sorted, 69 bool is_3d_sorted,
79 bool create_render_surface); 70 bool create_render_surface);
80 71
81 void ExecuteCalculateDrawProperties(Layer* root_layer, 72 void ExecuteCalculateDrawProperties(Layer* root_layer,
82 float device_scale_factor, 73 float device_scale_factor,
83 float page_scale_factor, 74 float page_scale_factor,
84 Layer* page_scale_application_layer, 75 Layer* page_scale_application_layer,
85 bool can_use_lcd_text, 76 bool can_use_lcd_text,
86 bool layers_always_allowed_lcd_text); 77 bool layers_always_allowed_lcd_text);
87 78
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void ExecuteCalculateDrawPropertiesWithPropertyTrees(Layer* layer); 111 void ExecuteCalculateDrawPropertiesWithPropertyTrees(Layer* layer);
121 void ExecuteCalculateDrawPropertiesWithPropertyTrees(LayerImpl* layer); 112 void ExecuteCalculateDrawPropertiesWithPropertyTrees(LayerImpl* layer);
122 113
123 void ExecuteCalculateDrawPropertiesWithoutSeparateSurfaces( 114 void ExecuteCalculateDrawPropertiesWithoutSeparateSurfaces(
124 LayerImpl* root_layer); 115 LayerImpl* root_layer);
125 116
126 LayerImplList* render_surface_layer_list_impl() const { 117 LayerImplList* render_surface_layer_list_impl() const {
127 return render_surface_layer_list_impl_.get(); 118 return render_surface_layer_list_impl_.get();
128 } 119 }
129 120
130 LayerImplList* update_layer_list_impl() const {
131 return update_layer_list_impl_.get();
132 }
133 bool UpdateLayerListImplContains(int id) const {
134 return std::count_if(
135 update_layer_list_impl_->begin(), update_layer_list_impl_->end(),
136 [id](LayerImpl* layer) { return layer->id() == id; }) != 0;
137 }
138
139 const LayerList& update_layer_list() const { return update_layer_list_; } 121 const LayerList& update_layer_list() const { return update_layer_list_; }
140 bool UpdateLayerListContains(int id) const; 122 bool UpdateLayerListContains(int id) const;
141 123
142 int render_surface_layer_list_count() const { 124 int render_surface_layer_list_count() const {
143 return render_surface_layer_list_count_; 125 return render_surface_layer_list_count_;
144 } 126 }
145 127
146 const LayerSettings& layer_settings() { return layer_settings_; } 128 const LayerSettings& layer_settings() { return layer_settings_; }
147 129
148 private: 130 private:
149 scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_; 131 scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_;
150 LayerList update_layer_list_; 132 LayerList update_layer_list_;
151 scoped_ptr<LayerImplList> update_layer_list_impl_;
152 LayerSettings layer_settings_; 133 LayerSettings layer_settings_;
153 134
154 int render_surface_layer_list_count_; 135 int render_surface_layer_list_count_;
155 }; 136 };
156 137
157 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, 138 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase,
158 public testing::Test { 139 public testing::Test {
159 public: 140 public:
160 LayerTreeHostCommonTest(); 141 LayerTreeHostCommonTest();
161 explicit LayerTreeHostCommonTest(const LayerTreeSettings& settings); 142 explicit LayerTreeHostCommonTest(const LayerTreeSettings& settings);
162 }; 143 };
163 144
164 } // namespace cc 145 } // namespace cc
165 146
166 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 147 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_host_common_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698