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

Unified Diff: cc/ipc/single_release_callback_struct_traits.h

Issue 2686833003: CopyOutputResult must have a working release callback when received over mojo (Closed)
Patch Set: c Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: cc/ipc/single_release_callback_struct_traits.h
diff --git a/cc/ipc/single_release_callback_struct_traits.h b/cc/ipc/single_release_callback_struct_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c112296db62961644224293f523625d4c7ef84c
--- /dev/null
+++ b/cc/ipc/single_release_callback_struct_traits.h
@@ -0,0 +1,25 @@
+// Copyright 2016 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_IPC_SINGLE_RELEASE_CALLBACK_STRUCT_TRAITS_H_
+#define CC_IPC_SINGLE_RELEASE_CALLBACK_STRUCT_TRAITS_H_
+
+#include "cc/ipc/single_release_callback.mojom-shared.h"
+#include "cc/resources/single_release_callback.h"
+
+namespace mojo {
+
+template <>
+struct StructTraits<cc::mojom::SingleReleaseCallbackDataView,
+ std::unique_ptr<cc::SingleReleaseCallback>> {
+ static cc::mojom::TextureMailboxReleaserPtr releaser(
+ const std::unique_ptr<cc::SingleReleaseCallback>& callback);
+
+ static bool Read(cc::mojom::SingleReleaseCallbackDataView data,
+ std::unique_ptr<cc::SingleReleaseCallback>* out);
+};
+
+} // namespace mojo
+
+#endif // CC_IPC_SINGLE_RELEASE_CALLBACK_STRUCT_TRAITS_H_

Powered by Google App Engine
This is Rietveld 408576698