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

Unified Diff: gpu/ipc/gpu_command_buffer_traits.cc

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 11 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
« no previous file with comments | « gpu/ipc/gpu_command_buffer_traits.h ('k') | media/base/video_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/gpu_command_buffer_traits.cc
diff --git a/gpu/ipc/gpu_command_buffer_traits.cc b/gpu/ipc/gpu_command_buffer_traits.cc
index d9fc17d166070026a45c915f5a68b5b6ff5227c2..db482a92265461b1930d2b3be9cfa73a6e08ee2e 100644
--- a/gpu/ipc/gpu_command_buffer_traits.cc
+++ b/gpu/ipc/gpu_command_buffer_traits.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "gpu/ipc/gpu_command_buffer_traits.h"
-#include "gpu/command_buffer/common/mailbox.h"
+#include "gpu/command_buffer/common/mailbox_holder.h"
namespace IPC {
@@ -59,5 +59,25 @@ void ParamTraits<gpu::Mailbox>::Log(const param_type& p, std::string* l) {
*l += base::StringPrintf("%02x", p.name[i]);
}
+void ParamTraits<gpu::MailboxHolder>::Write(Message* m, const param_type& p) {
+ WriteParam(m, p.mailbox);
+ WriteParam(m, p.texture_target);
+ WriteParam(m, p.sync_point);
+}
+
+bool ParamTraits<gpu::MailboxHolder>::Read(const Message* m,
+ PickleIterator* iter,
+ param_type* p) {
+ if (!ReadParam(m, iter, &p->mailbox) ||
+ !ReadParam(m, iter, &p->texture_target) ||
+ !ReadParam(m, iter, &p->sync_point))
+ return false;
+ return true;
+}
+
+void ParamTraits<gpu::MailboxHolder>::Log(const param_type& p, std::string* l) {
+ ParamTraits<gpu::Mailbox>::Log(p.mailbox, l);
+ *l += base::StringPrintf(":%04x@%d", p.texture_target, p.sync_point);
+}
} // namespace IPC
« no previous file with comments | « gpu/ipc/gpu_command_buffer_traits.h ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698