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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 } | 181 } |
182 bool needs_update_draw_properties() const { | 182 bool needs_update_draw_properties() const { |
183 return needs_update_draw_properties_; | 183 return needs_update_draw_properties_; |
184 } | 184 } |
185 | 185 |
186 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } | 186 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } |
187 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } | 187 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } |
188 | 188 |
189 void ForceRedrawNextActivation() { next_activation_forces_redraw_ = true; } | 189 void ForceRedrawNextActivation() { next_activation_forces_redraw_ = true; } |
190 | 190 |
191 void increment_frames_have_been_drawn() { | |
192 if (frames_have_been_drawn_) | |
weiliangc
2014/07/22 22:01:13
I use this check to make sure if TreeLayerImpl if
enne (OOO)
2014/07/22 22:35:38
I'm not sure what you're worried about here. If a
| |
193 ++frames_have_been_drawn_; | |
194 } | |
195 int frames_have_been_drawn() const { return frames_have_been_drawn_; } | |
196 | |
191 void set_ui_resource_request_queue(const UIResourceRequestQueue& queue); | 197 void set_ui_resource_request_queue(const UIResourceRequestQueue& queue); |
192 | 198 |
193 const LayerImplList& RenderSurfaceLayerList() const; | 199 const LayerImplList& RenderSurfaceLayerList() const; |
194 | 200 |
195 // These return the size of the root scrollable area and the size of | 201 // These return the size of the root scrollable area and the size of |
196 // the user-visible scrolling viewport, in CSS layout coordinates. | 202 // the user-visible scrolling viewport, in CSS layout coordinates. |
197 gfx::Size ScrollableSize() const; | 203 gfx::Size ScrollableSize() const; |
198 gfx::SizeF ScrollableViewportSize() const; | 204 gfx::SizeF ScrollableViewportSize() const; |
199 | 205 |
200 gfx::Rect RootScrollLayerDeviceViewportBounds() const; | 206 gfx::Rect RootScrollLayerDeviceViewportBounds() const; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 bool requires_high_res_to_draw_; | 329 bool requires_high_res_to_draw_; |
324 bool viewport_size_invalid_; | 330 bool viewport_size_invalid_; |
325 bool needs_update_draw_properties_; | 331 bool needs_update_draw_properties_; |
326 | 332 |
327 // In impl-side painting mode, this is true when the tree may contain | 333 // In impl-side painting mode, this is true when the tree may contain |
328 // structural differences relative to the active tree. | 334 // structural differences relative to the active tree. |
329 bool needs_full_tree_sync_; | 335 bool needs_full_tree_sync_; |
330 | 336 |
331 bool next_activation_forces_redraw_; | 337 bool next_activation_forces_redraw_; |
332 | 338 |
339 int frames_have_been_drawn_; | |
weiliangc
2014/07/22 22:01:13
I'm not very happy about this variable name but no
| |
340 | |
333 ScopedPtrVector<SwapPromise> swap_promise_list_; | 341 ScopedPtrVector<SwapPromise> swap_promise_list_; |
334 | 342 |
335 UIResourceRequestQueue ui_resource_request_queue_; | 343 UIResourceRequestQueue ui_resource_request_queue_; |
336 | 344 |
337 int render_surface_layer_list_id_; | 345 int render_surface_layer_list_id_; |
338 | 346 |
339 private: | 347 private: |
340 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 348 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
341 }; | 349 }; |
342 | 350 |
343 } // namespace cc | 351 } // namespace cc |
344 | 352 |
345 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 353 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |