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

Unified Diff: cc/trees/layer_tree_impl.h

Issue 60513007: Add SwapPromise support to LayerTreeHost and LayerTreeImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework SwapPromise() interface to have virtual DidSwap() & DidNotSwap() interface 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
Index: cc/trees/layer_tree_impl.h
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 179b1895934b590d1f24f728b9ce3162fea5c1cc..914a43ba8d5973ff1dd63028fbe52339c3cf5a1f 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -10,7 +10,9 @@
#include <vector>
#include "base/containers/hash_tables.h"
+#include "base/memory/scoped_vector.h"
#include "base/values.h"
+#include "cc/base/swap_promise.h"
#include "cc/layers/layer_impl.h"
#include "cc/resources/ui_resource_client.h"
#include "ui/events/latency_info.h"
@@ -209,6 +211,15 @@ class CC_EXPORT LayerTreeImpl {
const ui::LatencyInfo& GetLatencyInfo();
void ClearLatencyInfo();
+ // Call this function when you expect there to be a swap buffer.
+ // See swap_promise.h for how to use SwapPromise.
+ // LTI will take the ownershipf of |swap_promise|.
+ void QueueSwapPromise(SwapPromise* swap_promise);
+
+ void TakeSwapPromise(ScopedVector<SwapPromise>* new_swap_promise);
+ void FinishSwapPromise();
+ void BreakSwapPromise(SwapPromise::DidNotSwapReason reason);
+
void DidModifyTilePriorities();
ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const;
@@ -271,6 +282,8 @@ class CC_EXPORT LayerTreeImpl {
ui::LatencyInfo latency_info_;
+ ScopedVector<SwapPromise> swap_promise_list_;
danakj 2013/11/13 23:22:09 ScopedPtrVector?
Yufeng Shen (Slow to review) 2013/11/14 22:09:55 Done.
+
UIResourceRequestQueue ui_resource_request_queue_;
private:

Powered by Google App Engine
This is Rietveld 408576698