| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_GPU_PARAM_TRAITS_H_ | |
| 6 #define CHROME_COMMON_GPU_PARAM_TRAITS_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/process.h" | |
| 11 #include "chrome/common/common_param_traits.h" | |
| 12 #include "chrome/common/dx_diag_node.h" | |
| 13 #include "chrome/common/gpu_create_command_buffer_config.h" | |
| 14 #include "chrome/common/gpu_info.h" | |
| 15 #include "gpu/ipc/gpu_command_buffer_traits.h" | |
| 16 #include "gpu/command_buffer/common/command_buffer.h" | |
| 17 #include "ui/gfx/native_widget_types.h" | |
| 18 #include "ui/gfx/rect.h" | |
| 19 #include "ui/gfx/size.h" | |
| 20 | |
| 21 #if defined(OS_MACOSX) | |
| 22 // Parameters for the GpuHostMsg_AcceleratedSurfaceSetIOSurface | |
| 23 // message, which has too many parameters to be sent with the | |
| 24 // predefined IPC macros. | |
| 25 struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params { | |
| 26 int32 renderer_id; | |
| 27 int32 render_view_id; | |
| 28 gfx::PluginWindowHandle window; | |
| 29 int32 width; | |
| 30 int32 height; | |
| 31 uint64 identifier; | |
| 32 | |
| 33 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params(); | |
| 34 }; | |
| 35 | |
| 36 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params { | |
| 37 int32 renderer_id; | |
| 38 int32 render_view_id; | |
| 39 gfx::PluginWindowHandle window; | |
| 40 uint64 surface_id; | |
| 41 int32 route_id; | |
| 42 uint64 swap_buffers_count; | |
| 43 | |
| 44 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params(); | |
| 45 }; | |
| 46 #endif | |
| 47 | |
| 48 namespace IPC { | |
| 49 #if defined(OS_MACOSX) | |
| 50 template <> | |
| 51 struct ParamTraits<GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params> { | |
| 52 typedef GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params param_type; | |
| 53 static void Write(Message* m, const param_type& p); | |
| 54 static bool Read(const Message* m, void** iter, param_type* p); | |
| 55 static void Log(const param_type& p, std::string* l); | |
| 56 }; | |
| 57 | |
| 58 template <> | |
| 59 struct ParamTraits<GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params> { | |
| 60 typedef GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params param_type; | |
| 61 static void Write(Message* m, const param_type& p); | |
| 62 static bool Read(const Message* m, void** iter, param_type* p); | |
| 63 static void Log(const param_type& p, std::string* l); | |
| 64 }; | |
| 65 #endif | |
| 66 | |
| 67 template <> | |
| 68 struct ParamTraits<GPUInfo> { | |
| 69 typedef GPUInfo param_type; | |
| 70 static void Write(Message* m, const param_type& p); | |
| 71 static bool Read(const Message* m, void** iter, param_type* p); | |
| 72 static void Log(const param_type& p, std::string* l); | |
| 73 }; | |
| 74 | |
| 75 template <> | |
| 76 struct ParamTraits<GPUInfo::Level> { | |
| 77 typedef GPUInfo::Level param_type; | |
| 78 static void Write(Message* m, const param_type& p); | |
| 79 static bool Read(const Message* m, void** iter, param_type* p); | |
| 80 static void Log(const param_type& p, std::string* l); | |
| 81 }; | |
| 82 | |
| 83 template <> | |
| 84 struct ParamTraits<DxDiagNode> { | |
| 85 typedef DxDiagNode param_type; | |
| 86 static void Write(Message* m, const param_type& p); | |
| 87 static bool Read(const Message* m, void** iter, param_type* p); | |
| 88 static void Log(const param_type& p, std::string* l); | |
| 89 }; | |
| 90 | |
| 91 template <> | |
| 92 struct ParamTraits<GPUCreateCommandBufferConfig> { | |
| 93 typedef GPUCreateCommandBufferConfig param_type; | |
| 94 static void Write(Message* m, const param_type& p); | |
| 95 static bool Read(const Message* m, void** iter, param_type* p); | |
| 96 static void Log(const param_type& p, std::string* l); | |
| 97 }; | |
| 98 | |
| 99 } // namespace IPC | |
| 100 | |
| 101 #endif // CHROME_COMMON_GPU_PARAM_TRAITS_H_ | |
| OLD | NEW |