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

Unified Diff: gpu/ipc/gpu_command_buffer_traits.cc

Issue 6400007: Implement proxy for 3d-related interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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') | ppapi/ppapi_shared_proxy.gypi » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..eecf19fd1863365c1db2f5846c629fe32b26bd4a
--- /dev/null
+++ b/gpu/ipc/gpu_command_buffer_traits.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 2011 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.
+
+#include "gpu/ipc/gpu_command_buffer_traits.h"
+
+namespace IPC {
+
+void ParamTraits<gpu::CommandBuffer::State> ::Write(Message* m,
+ const param_type& p) {
+ WriteParam(m, p.num_entries);
+ WriteParam(m, p.get_offset);
+ WriteParam(m, p.put_offset);
+ WriteParam(m, p.token);
+ WriteParam(m, static_cast<int32>(p.error));
+}
+
+bool ParamTraits<gpu::CommandBuffer::State> ::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ int32 temp;
+ if (ReadParam(m, iter, &p->num_entries) &&
+ ReadParam(m, iter, &p->get_offset) &&
+ ReadParam(m, iter, &p->put_offset) &&
+ ReadParam(m, iter, &p->token) &&
+ ReadParam(m, iter, &temp)) {
+ p->error = static_cast<gpu::error::Error>(temp);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+void ParamTraits<gpu::CommandBuffer::State> ::Log(const param_type& p,
+ std::string* l) {
+ l->append("<CommandBuffer::State>");
+}
+
+} // namespace IPC
« no previous file with comments | « gpu/ipc/gpu_command_buffer_traits.h ('k') | ppapi/ppapi_shared_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698