1 // Copyright (c) 2012 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"
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
,
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
);
36 void ParamTraits
<gpu::CommandBuffer::State
> ::Log(const param_type
& p
,
38 l
->append("<CommandBuffer::State>");