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

Unified Diff: cc/base/swap_promise.h

Issue 60513007: Add SwapPromise support to LayerTreeHost and LayerTreeImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add comments for when to use QueueSwapPromise() 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 | « no previous file | cc/cc.gyp » ('j') | cc/trees/layer_tree_host.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/swap_promise.h
diff --git a/cc/base/swap_promise.h b/cc/base/swap_promise.h
new file mode 100644
index 0000000000000000000000000000000000000000..69ffd5acf758b47faeeac740f7e1a101206723f5
--- /dev/null
+++ b/cc/base/swap_promise.h
@@ -0,0 +1,29 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_BASE_SWAP_PROMISE_H_
+#define CC_BASE_SWAP_PROMISE_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/callback_forward.h"
+
+namespace cc {
+
+struct SwapPromise {
+ SwapPromise(const base::Closure& did_swap_cb,
+ const base::Callback<void(const std::string&)>& swap_aborted_cb)
+ : did_swap_callback(did_swap_cb),
+ swap_aborted_callback(swap_aborted_cb) {}
+
+ ~SwapPromise() {}
+
+ base::Closure did_swap_callback;
+ base::Callback<void(const std::string&)> swap_aborted_callback;
jamesr 2013/11/12 03:15:04 why does this take a std::string? from this patch
Yufeng Shen (Slow to review) 2013/11/13 21:05:04 Done.
+};
+
+} // namespace cc
+
+#endif // CC_BASE_SWAP_PROMISE_H_
« no previous file with comments | « no previous file | cc/cc.gyp » ('j') | cc/trees/layer_tree_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698