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

Unified Diff: chrome/common/command_buffer_messages.h

Issue 555020: Redesigned CommandBuffer and NPDevice3D interfaces (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « no previous file | chrome/common/command_buffer_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/command_buffer_messages.h
===================================================================
--- chrome/common/command_buffer_messages.h (revision 37414)
+++ chrome/common/command_buffer_messages.h (working copy)
@@ -5,6 +5,39 @@
#ifndef CHROME_COMMON_COMMAND_BUFFER_MESSAGES_H_
#define CHROME_COMMON_COMMAND_BUFFER_MESSAGES_H_
+#include "chrome/common/common_param_traits.h"
+#include "gpu/command_buffer/common/command_buffer.h"
+
+namespace IPC {
+template <>
+struct ParamTraits<gpu::CommandBuffer::State> {
+ typedef gpu::CommandBuffer::State param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteInt(p.size);
+ m->WriteInt(p.get_offset);
+ m->WriteInt(p.put_offset);
+ m->WriteInt(p.token);
+ m->WriteInt(p.error);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ int32 temp;
+ if (m->ReadInt(iter, &p->size) &&
+ m->ReadInt(iter, &p->get_offset) &&
+ m->ReadInt(iter, &p->put_offset) &&
+ m->ReadInt(iter, &p->token) &&
+ m->ReadInt(iter, &temp)) {
+ p->error = static_cast<gpu::parse_error::ParseError>(temp);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<CommandBuffer::State>");
+ }
+};
+} // namespace IPC
+
#define MESSAGES_INTERNAL_FILE "chrome/common/command_buffer_messages_internal.h"
#include "ipc/ipc_message_macros.h"
« no previous file with comments | « no previous file | chrome/common/command_buffer_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698