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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 // The outer viewport scroll layer scrolls first. | 279 // The outer viewport scroll layer scrolls first. |
280 void DistributeRootScrollOffset(); | 280 void DistributeRootScrollOffset(); |
281 | 281 |
282 void ApplyScroll(LayerImpl* layer, ScrollState* scroll_state) { | 282 void ApplyScroll(LayerImpl* layer, ScrollState* scroll_state) { |
283 layer_tree_host_impl_->ApplyScroll(layer, scroll_state); | 283 layer_tree_host_impl_->ApplyScroll(layer, scroll_state); |
284 } | 284 } |
285 | 285 |
286 // Call this function when you expect there to be a swap buffer. | 286 // Call this function when you expect there to be a swap buffer. |
287 // See swap_promise.h for how to use SwapPromise. | 287 // See swap_promise.h for how to use SwapPromise. |
288 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); | 288 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); |
289 void QueueActiveTreeSwapPromise(scoped_ptr<SwapPromise> swap_promise); | |
danakj
2015/08/14 17:47:39
Explain this in a comment?
Tobias Sargeant
2015/08/18 11:22:15
Done.
| |
289 | 290 |
290 // Take the |new_swap_promise| and append it to |swap_promise_list_|. | 291 // Take the |new_swap_promise| and append it to |swap_promise_list_|. |
291 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise); | 292 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise); |
292 void FinishSwapPromises(CompositorFrameMetadata* metadata); | 293 void FinishSwapPromises(CompositorFrameMetadata* metadata); |
293 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); | 294 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); |
294 | 295 |
295 void DidModifyTilePriorities(); | 296 void DidModifyTilePriorities(); |
296 | 297 |
297 ResourceId ResourceIdForUIResource(UIResourceId uid) const; | 298 ResourceId ResourceIdForUIResource(UIResourceId uid) const; |
298 void ProcessUIResourceRequestQueue(); | 299 void ProcessUIResourceRequestQueue(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 | 440 |
440 // In impl-side painting mode, this is true when the tree may contain | 441 // In impl-side painting mode, this is true when the tree may contain |
441 // structural differences relative to the active tree. | 442 // structural differences relative to the active tree. |
442 bool needs_full_tree_sync_; | 443 bool needs_full_tree_sync_; |
443 | 444 |
444 bool next_activation_forces_redraw_; | 445 bool next_activation_forces_redraw_; |
445 | 446 |
446 bool has_ever_been_drawn_; | 447 bool has_ever_been_drawn_; |
447 | 448 |
448 ScopedPtrVector<SwapPromise> swap_promise_list_; | 449 ScopedPtrVector<SwapPromise> swap_promise_list_; |
450 ScopedPtrVector<SwapPromise> active_tree_swap_promise_list_; | |
449 | 451 |
450 UIResourceRequestQueue ui_resource_request_queue_; | 452 UIResourceRequestQueue ui_resource_request_queue_; |
451 | 453 |
452 int render_surface_layer_list_id_; | 454 int render_surface_layer_list_id_; |
453 | 455 |
454 // Whether or not Blink's viewport size was shrunk by the height of the top | 456 // Whether or not Blink's viewport size was shrunk by the height of the top |
455 // controls at the time of the last layout. | 457 // controls at the time of the last layout. |
456 bool top_controls_shrink_blink_size_; | 458 bool top_controls_shrink_blink_size_; |
457 | 459 |
458 float top_controls_height_; | 460 float top_controls_height_; |
459 | 461 |
460 // The amount that the top controls are shown from 0 (hidden) to 1 (fully | 462 // The amount that the top controls are shown from 0 (hidden) to 1 (fully |
461 // shown). | 463 // shown). |
462 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; | 464 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; |
463 | 465 |
464 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 466 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
465 | 467 |
466 private: | 468 private: |
467 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 469 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
468 }; | 470 }; |
469 | 471 |
470 } // namespace cc | 472 } // namespace cc |
471 | 473 |
472 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 474 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |