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

Side by Side Diff: cc/trees/layer_tree_impl.h

Issue 1292773003: Queue latency info swap promises in a separate already-active queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use different return value for failed draw in test, to avoid NOTREACHED() Created 5 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_impl.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 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // Distribute the rool scroll between outer and inner viewport scroll layer. 278 // Distribute the rool scroll between outer and inner viewport scroll layer.
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 //
289 // A swap promise queued by QueueSwapPromise travels with the layer
290 // information currently associated with the tree. For example, when
291 // a pending tree is activated, the swap promise is passed to the
292 // active tree along with the layer information. Similarly, when a
293 // new activation overwrites layer information on the active tree,
294 // queued swap promises are broken.
288 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); 295 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
289 296
297 // Queue a swap promise, pinned to this tree. Pinned swap promises
298 // may only be queued on the active tree.
299 //
300 // An active tree pinned swap promise will see only DidSwap() or
301 // DidNotSwap(SWAP_FAILS). No DidActivate() will be seen because
302 // that has already happened prior to queueing of the swap promise.
303 //
304 // Pinned active tree swap promises will not be broken prematurely
305 // on the active tree if a new tree is activated.
306 void QueuePinnedSwapPromise(scoped_ptr<SwapPromise> swap_promise);
307
290 // Take the |new_swap_promise| and append it to |swap_promise_list_|. 308 // Take the |new_swap_promise| and append it to |swap_promise_list_|.
291 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise); 309 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise);
292 void FinishSwapPromises(CompositorFrameMetadata* metadata); 310 void FinishSwapPromises(CompositorFrameMetadata* metadata);
293 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 311 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
294 312
295 void DidModifyTilePriorities(); 313 void DidModifyTilePriorities();
296 314
297 ResourceId ResourceIdForUIResource(UIResourceId uid) const; 315 ResourceId ResourceIdForUIResource(UIResourceId uid) const;
298 void ProcessUIResourceRequestQueue(); 316 void ProcessUIResourceRequestQueue();
299 317
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 457
440 // In impl-side painting mode, this is true when the tree may contain 458 // In impl-side painting mode, this is true when the tree may contain
441 // structural differences relative to the active tree. 459 // structural differences relative to the active tree.
442 bool needs_full_tree_sync_; 460 bool needs_full_tree_sync_;
443 461
444 bool next_activation_forces_redraw_; 462 bool next_activation_forces_redraw_;
445 463
446 bool has_ever_been_drawn_; 464 bool has_ever_been_drawn_;
447 465
448 ScopedPtrVector<SwapPromise> swap_promise_list_; 466 ScopedPtrVector<SwapPromise> swap_promise_list_;
467 ScopedPtrVector<SwapPromise> pinned_swap_promise_list_;
449 468
450 UIResourceRequestQueue ui_resource_request_queue_; 469 UIResourceRequestQueue ui_resource_request_queue_;
451 470
452 int render_surface_layer_list_id_; 471 int render_surface_layer_list_id_;
453 472
454 // Whether or not Blink's viewport size was shrunk by the height of the top 473 // Whether or not Blink's viewport size was shrunk by the height of the top
455 // controls at the time of the last layout. 474 // controls at the time of the last layout.
456 bool top_controls_shrink_blink_size_; 475 bool top_controls_shrink_blink_size_;
457 476
458 float top_controls_height_; 477 float top_controls_height_;
459 478
460 // The amount that the top controls are shown from 0 (hidden) to 1 (fully 479 // The amount that the top controls are shown from 0 (hidden) to 1 (fully
461 // shown). 480 // shown).
462 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_; 481 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_;
463 482
464 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 483 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
465 484
466 private: 485 private:
467 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 486 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
468 }; 487 };
469 488
470 } // namespace cc 489 } // namespace cc
471 490
472 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 491 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698