diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 21:53:50 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 21:53:50 +0000 |
commit | 246a7045b9c45620fd725210aac51322e611c83f (patch) | |
tree | 6bdce605ae758c282a2b27e92a6b223d98b8d46a /chrome/common/gpu_messages.h | |
parent | c3240722a63ff142684575e3ea4eb89915edae72 (diff) | |
download | chromium_src-246a7045b9c45620fd725210aac51322e611c83f.zip chromium_src-246a7045b9c45620fd725210aac51322e611c83f.tar.gz chromium_src-246a7045b9c45620fd725210aac51322e611c83f.tar.bz2 |
Added support for opening a GPU command buffer from a renderer processes through a GPU channel.
Probably only works in windows only so far.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/657046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gpu_messages.h')
-rw-r--r-- | chrome/common/gpu_messages.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/chrome/common/gpu_messages.h b/chrome/common/gpu_messages.h index fc2a826..1bf9bac 100644 --- a/chrome/common/gpu_messages.h +++ b/chrome/common/gpu_messages.h @@ -15,11 +15,36 @@ #include "chrome/common/common_param_traits.h" #include "chrome/common/gpu_native_window_handle.h" #include "chrome/common/transport_dib.h" +#include "gpu/command_buffer/common/command_buffer.h" namespace IPC { - -// Potential new structures for messages go here. - +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::error::Error>(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 \ |