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

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

Issue 2188093002: cc: Complete swap promise for aborted commit after pending activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 4 years, 4 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 // When a SwapPromiseMonitor is created on the main thread, it calls 329 // When a SwapPromiseMonitor is created on the main thread, it calls
330 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost. 330 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost.
331 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() 331 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor()
332 // to unregister itself. 332 // to unregister itself.
333 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); 333 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor);
334 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); 334 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor);
335 335
336 // Call this function when you expect there to be a swap buffer. 336 // Call this function when you expect there to be a swap buffer.
337 // See swap_promise.h for how to use SwapPromise. 337 // See swap_promise.h for how to use SwapPromise.
338 void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise); 338 void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise);
339
340 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 339 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
340 std::vector<std::unique_ptr<SwapPromise>> TakeSwapPromises();
341 341
342 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } 342 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); }
343 343
344 void set_surface_client_id(uint32_t client_id); 344 void set_surface_client_id(uint32_t client_id);
345 SurfaceSequence CreateSurfaceSequence(); 345 SurfaceSequence CreateSurfaceSequence();
346 346
347 PropertyTrees* property_trees() { return &property_trees_; } 347 PropertyTrees* property_trees() { return &property_trees_; }
348 bool needs_meta_info_recomputation() { 348 bool needs_meta_info_recomputation() {
349 return needs_meta_info_recomputation_; 349 return needs_meta_info_recomputation_;
350 } 350 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 uint32_t surface_client_id_; 612 uint32_t surface_client_id_;
613 uint32_t next_surface_sequence_; 613 uint32_t next_surface_sequence_;
614 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; 614 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
615 615
616 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 616 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
617 }; 617 };
618 618
619 } // namespace cc 619 } // namespace cc
620 620
621 #endif // CC_TREES_LAYER_TREE_HOST_H_ 621 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/trees/channel_main.h ('k') | cc/trees/layer_tree_host.cc » ('j') | cc/trees/layer_tree_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698