OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_TREES_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 float page_scale_factor() const { return page_scale_factor_; } | 157 float page_scale_factor() const { return page_scale_factor_; } |
158 float min_page_scale_factor() const { return min_page_scale_factor_; } | 158 float min_page_scale_factor() const { return min_page_scale_factor_; } |
159 float max_page_scale_factor() const { return max_page_scale_factor_; } | 159 float max_page_scale_factor() const { return max_page_scale_factor_; } |
160 float page_scale_delta() const { return page_scale_delta_; } | 160 float page_scale_delta() const { return page_scale_delta_; } |
161 void set_sent_page_scale_delta(float delta) { | 161 void set_sent_page_scale_delta(float delta) { |
162 sent_page_scale_delta_ = delta; | 162 sent_page_scale_delta_ = delta; |
163 } | 163 } |
164 float sent_page_scale_delta() const { return sent_page_scale_delta_; } | 164 float sent_page_scale_delta() const { return sent_page_scale_delta_; } |
165 | 165 |
| 166 void set_use_gpu_rasterization(bool use_gpu) { |
| 167 use_gpu_rasterization_ = use_gpu; |
| 168 } |
| 169 bool use_gpu_rasterization() const { return use_gpu_rasterization_; } |
| 170 |
166 // Updates draw properties and render surface layer list, as well as tile | 171 // Updates draw properties and render surface layer list, as well as tile |
167 // priorities. | 172 // priorities. |
168 void UpdateDrawProperties(); | 173 void UpdateDrawProperties(); |
169 | 174 |
170 void set_needs_update_draw_properties() { | 175 void set_needs_update_draw_properties() { |
171 needs_update_draw_properties_ = true; | 176 needs_update_draw_properties_ = true; |
172 } | 177 } |
173 bool needs_update_draw_properties() const { | 178 bool needs_update_draw_properties() const { |
174 return needs_update_draw_properties_; | 179 return needs_update_draw_properties_; |
175 } | 180 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 280 |
276 std::vector<LayerImpl*> layers_with_copy_output_request_; | 281 std::vector<LayerImpl*> layers_with_copy_output_request_; |
277 | 282 |
278 // Persisted state for non-impl-side-painting. | 283 // Persisted state for non-impl-side-painting. |
279 int scrolling_layer_id_from_previous_tree_; | 284 int scrolling_layer_id_from_previous_tree_; |
280 | 285 |
281 // List of visible or hit-testable layers for the most recently prepared | 286 // List of visible or hit-testable layers for the most recently prepared |
282 // frame. Used for rendering and input event hit testing. | 287 // frame. Used for rendering and input event hit testing. |
283 LayerImplList render_surface_layer_list_; | 288 LayerImplList render_surface_layer_list_; |
284 | 289 |
| 290 bool use_gpu_rasterization_; |
285 bool contents_textures_purged_; | 291 bool contents_textures_purged_; |
286 bool requires_high_res_to_draw_; | 292 bool requires_high_res_to_draw_; |
287 bool viewport_size_invalid_; | 293 bool viewport_size_invalid_; |
288 bool needs_update_draw_properties_; | 294 bool needs_update_draw_properties_; |
289 | 295 |
290 // In impl-side painting mode, this is true when the tree may contain | 296 // In impl-side painting mode, this is true when the tree may contain |
291 // structural differences relative to the active tree. | 297 // structural differences relative to the active tree. |
292 bool needs_full_tree_sync_; | 298 bool needs_full_tree_sync_; |
293 | 299 |
294 bool next_activation_forces_redraw_; | 300 bool next_activation_forces_redraw_; |
295 | 301 |
296 ScopedPtrVector<SwapPromise> swap_promise_list_; | 302 ScopedPtrVector<SwapPromise> swap_promise_list_; |
297 | 303 |
298 UIResourceRequestQueue ui_resource_request_queue_; | 304 UIResourceRequestQueue ui_resource_request_queue_; |
299 | 305 |
300 private: | 306 private: |
301 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 307 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
302 }; | 308 }; |
303 | 309 |
304 } // namespace cc | 310 } // namespace cc |
305 | 311 |
306 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 312 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |