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

Unified Diff: cc/trees/layer_tree_host.h

Issue 60513007: Add SwapPromise support to LayerTreeHost and LayerTreeImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add OVERRIDE to TestSwapPromise::DidNotSwap Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 54962fc4eafdf401556a0450315b90b4f8e183a0..47bfa115d449a8c6846edf4e4a1461cb6cbd451b 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -21,6 +21,7 @@
#include "cc/animation/animation_events.h"
#include "cc/base/cc_export.h"
#include "cc/base/scoped_ptr_vector.h"
+#include "cc/base/swap_promise.h"
#include "cc/debug/micro_benchmark.h"
#include "cc/debug/micro_benchmark_controller.h"
#include "cc/input/input_handler.h"
@@ -286,6 +287,12 @@ class CC_EXPORT LayerTreeHost {
scoped_ptr<base::Value> value,
const MicroBenchmark::DoneCallback& callback);
+ // Call this function when you expect there to be a swap buffer.
+ // See swap_promise.h for how to use SwapPromise.
+ void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
+
+ void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
+
protected:
LayerTreeHost(LayerTreeHostClient* client,
SharedBitmapManager* manager,
@@ -433,6 +440,8 @@ class CC_EXPORT LayerTreeHost {
SharedBitmapManager* shared_bitmap_manager_;
+ ScopedPtrVector<SwapPromise> swap_promise_list_;
+
DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
};
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698