OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/gpu_messages.h" | 5 #include "chrome/common/gpu_messages.h" |
6 | 6 |
7 #include "chrome/common/gpu_create_command_buffer_config.h" | 7 #include "chrome/common/gpu_create_command_buffer_config.h" |
8 #include "chrome/common/gpu_info.h" | 8 #include "chrome/common/gpu_info.h" |
9 #include "chrome/common/dx_diag_node.h" | 9 #include "chrome/common/dx_diag_node.h" |
10 #include "gfx/rect.h" | 10 #include "gfx/rect.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params:: | 24 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params:: |
25 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params() | 25 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params() |
26 : renderer_id(0), | 26 : renderer_id(0), |
27 render_view_id(0), | 27 render_view_id(0), |
28 window(NULL), | 28 window(NULL), |
29 width(0), | 29 width(0), |
30 height(0), | 30 height(0), |
31 identifier(0) { | 31 identifier(0) { |
32 } | 32 } |
33 | 33 |
| 34 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params:: |
| 35 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params() |
| 36 : renderer_id(0), |
| 37 render_view_id(0), |
| 38 window(NULL), |
| 39 surface_id(0), |
| 40 route_id(0), |
| 41 swap_buffers_count(0) { |
| 42 } |
34 #endif | 43 #endif |
35 | 44 |
36 namespace IPC { | 45 namespace IPC { |
37 | 46 |
38 #if defined(OS_MACOSX) | 47 #if defined(OS_MACOSX) |
39 | 48 |
40 void ParamTraits<GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params> ::Write( | 49 void ParamTraits<GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params> ::Write( |
41 Message* m, | 50 Message* m, |
42 const param_type& p) { | 51 const param_type& p) { |
43 WriteParam(m, p.renderer_id); | 52 WriteParam(m, p.renderer_id); |
(...skipping 27 matching lines...) Expand all Loading... |
71 LogParam(p.window, l); | 80 LogParam(p.window, l); |
72 l->append(", "); | 81 l->append(", "); |
73 LogParam(p.width, l); | 82 LogParam(p.width, l); |
74 l->append(", "); | 83 l->append(", "); |
75 LogParam(p.height, l); | 84 LogParam(p.height, l); |
76 l->append(", "); | 85 l->append(", "); |
77 LogParam(p.identifier, l); | 86 LogParam(p.identifier, l); |
78 l->append(")"); | 87 l->append(")"); |
79 } | 88 } |
80 | 89 |
| 90 void ParamTraits<GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params> ::Write( |
| 91 Message* m, |
| 92 const param_type& p) { |
| 93 WriteParam(m, p.renderer_id); |
| 94 WriteParam(m, p.render_view_id); |
| 95 WriteParam(m, p.window); |
| 96 WriteParam(m, p.surface_id); |
| 97 WriteParam(m, p.route_id); |
| 98 WriteParam(m, p.swap_buffers_count); |
| 99 } |
| 100 |
| 101 bool ParamTraits<GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params> ::Read( |
| 102 const Message* m, |
| 103 void** iter, |
| 104 param_type* p) { |
| 105 return ReadParam(m, iter, &p->renderer_id) && |
| 106 ReadParam(m, iter, &p->render_view_id) && |
| 107 ReadParam(m, iter, &p->window) && |
| 108 ReadParam(m, iter, &p->surface_id) && |
| 109 ReadParam(m, iter, &p->route_id) && |
| 110 ReadParam(m, iter, &p->swap_buffers_count); |
| 111 } |
| 112 |
| 113 void ParamTraits<GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params> ::Log( |
| 114 const param_type& p, |
| 115 std::string* l) { |
| 116 l->append("("); |
| 117 LogParam(p.renderer_id, l); |
| 118 l->append(", "); |
| 119 LogParam(p.render_view_id, l); |
| 120 l->append(", "); |
| 121 LogParam(p.window, l); |
| 122 l->append(", "); |
| 123 LogParam(p.surface_id, l); |
| 124 l->append(", "); |
| 125 LogParam(p.route_id, l); |
| 126 l->append(", "); |
| 127 LogParam(p.swap_buffers_count, l); |
| 128 l->append(")"); |
| 129 } |
81 #endif // if defined(OS_MACOSX) | 130 #endif // if defined(OS_MACOSX) |
82 | 131 |
83 void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) { | 132 void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) { |
84 WriteParam(m, static_cast<int32>(p.progress())); | 133 WriteParam(m, static_cast<int32>(p.progress())); |
85 WriteParam(m, p.initialization_time()); | 134 WriteParam(m, p.initialization_time()); |
86 WriteParam(m, p.vendor_id()); | 135 WriteParam(m, p.vendor_id()); |
87 WriteParam(m, p.device_id()); | 136 WriteParam(m, p.device_id()); |
88 WriteParam(m, p.driver_version()); | 137 WriteParam(m, p.driver_version()); |
89 WriteParam(m, p.pixel_shader_version()); | 138 WriteParam(m, p.pixel_shader_version()); |
90 WriteParam(m, p.vertex_shader_version()); | 139 WriteParam(m, p.vertex_shader_version()); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 260 } |
212 return true; | 261 return true; |
213 } | 262 } |
214 | 263 |
215 void ParamTraits<GPUCreateCommandBufferConfig> ::Log( | 264 void ParamTraits<GPUCreateCommandBufferConfig> ::Log( |
216 const param_type& p, std::string* l) { | 265 const param_type& p, std::string* l) { |
217 l->append("<GPUCreateCommandBufferConfig>"); | 266 l->append("<GPUCreateCommandBufferConfig>"); |
218 } | 267 } |
219 | 268 |
220 } // namespace IPC | 269 } // namespace IPC |
OLD | NEW |