Added internal Protector key to official build
[chromium-blink-merge.git] / gpu / ipc / gpu_command_buffer_traits.cc
blob66d4189598b0e0dd726e7f90eca9afd73e7a1869
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "gpu/ipc/gpu_command_buffer_traits.h"
7 namespace IPC {
9 void ParamTraits<gpu::CommandBuffer::State> ::Write(Message* m,
10 const param_type& p) {
11 WriteParam(m, p.num_entries);
12 WriteParam(m, p.get_offset);
13 WriteParam(m, p.put_offset);
14 WriteParam(m, p.token);
15 WriteParam(m, static_cast<int32>(p.error));
16 WriteParam(m, p.generation);
19 bool ParamTraits<gpu::CommandBuffer::State> ::Read(const Message* m,
20 void** iter,
21 param_type* p) {
22 int32 temp;
23 if (ReadParam(m, iter, &p->num_entries) &&
24 ReadParam(m, iter, &p->get_offset) &&
25 ReadParam(m, iter, &p->put_offset) &&
26 ReadParam(m, iter, &p->token) &&
27 ReadParam(m, iter, &temp) &&
28 ReadParam(m, iter, &p->generation)) {
29 p->error = static_cast<gpu::error::Error>(temp);
30 return true;
31 } else {
32 return false;
36 void ParamTraits<gpu::CommandBuffer::State> ::Log(const param_type& p,
37 std::string* l) {
38 l->append("<CommandBuffer::State>");
41 } // namespace IPC