Also blacklist the use of eglWaitSyncKHR on Adreno 2xx GPUs.
[chromium-blink-merge.git] / ppapi / proxy / ppapi_param_traits.h
blob6aff57450f838e6d44fb2344b3373fb05ba9f850
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 #ifndef PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_
6 #define PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_
8 #include <string>
9 #include <vector>
11 #include "ipc/ipc_message_utils.h"
12 #include "ipc/ipc_platform_file.h"
13 #include "ppapi/c/pp_completion_callback.h"
14 #include "ppapi/c/pp_rect.h"
15 #include "ppapi/c/pp_var.h"
16 #include "ppapi/proxy/ppapi_proxy_export.h"
17 #include "ppapi/shared_impl/compositor_layer_data.h"
18 #include "ppapi/shared_impl/file_path.h"
19 #include "ppapi/shared_impl/file_ref_create_info.h"
20 #include "ppapi/shared_impl/media_stream_video_track_shared.h"
21 #include "ppapi/shared_impl/ppapi_permissions.h"
22 #include "ppapi/shared_impl/socket_option_data.h"
24 struct PP_KeyInformation;
25 struct PP_NetAddress_Private;
27 namespace ppapi {
29 class HostResource;
30 class PPB_X509Certificate_Fields;
32 namespace proxy {
34 struct PPBFlash_DrawGlyphs_Params;
35 struct PPBURLLoader_UpdateProgress_Params;
36 struct SerializedDirEntry;
37 struct SerializedFontDescription;
38 struct SerializedTrueTypeFontDesc;
39 class SerializedFlashMenu;
40 class SerializedHandle;
41 class SerializedVar;
43 } // namespace proxy
44 } // namespace ppapi
46 namespace IPC {
48 template<>
49 struct PPAPI_PROXY_EXPORT ParamTraits<PP_Bool> {
50 typedef PP_Bool param_type;
51 static void Write(Message* m, const param_type& p);
52 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
53 static void Log(const param_type& p, std::string* l);
56 template <>
57 struct PPAPI_PROXY_EXPORT ParamTraits<PP_NetAddress_Private> {
58 typedef PP_NetAddress_Private param_type;
59 static void Write(Message* m, const param_type& p);
60 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p);
61 static void Log(const param_type& p, std::string* l);
64 template <>
65 struct PPAPI_PROXY_EXPORT ParamTraits<PP_KeyInformation> {
66 typedef PP_KeyInformation param_type;
67 static void Write(Message* m, const param_type& p);
68 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p);
69 static void Log(const param_type& p, std::string* l);
72 template<>
73 struct PPAPI_PROXY_EXPORT ParamTraits<
74 ppapi::proxy::PPBFlash_DrawGlyphs_Params> {
75 typedef ppapi::proxy::PPBFlash_DrawGlyphs_Params param_type;
76 static void Write(Message* m, const param_type& p);
77 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
78 static void Log(const param_type& p, std::string* l);
81 template<>
82 struct PPAPI_PROXY_EXPORT ParamTraits<
83 ppapi::proxy::PPBURLLoader_UpdateProgress_Params> {
84 typedef ppapi::proxy::PPBURLLoader_UpdateProgress_Params param_type;
85 static void Write(Message* m, const param_type& p);
86 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
87 static void Log(const param_type& p, std::string* l);
90 template<>
91 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedDirEntry> {
92 typedef ppapi::proxy::SerializedDirEntry param_type;
93 static void Write(Message* m, const param_type& p);
94 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
95 static void Log(const param_type& p, std::string* l);
98 template<>
99 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFontDescription> {
100 typedef ppapi::proxy::SerializedFontDescription param_type;
101 static void Write(Message* m, const param_type& p);
102 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
103 static void Log(const param_type& p, std::string* l);
106 template<>
107 struct PPAPI_PROXY_EXPORT
108 ParamTraits<ppapi::proxy::SerializedTrueTypeFontDesc> {
109 typedef ppapi::proxy::SerializedTrueTypeFontDesc param_type;
110 static void Write(Message* m, const param_type& p);
111 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
112 static void Log(const param_type& p, std::string* l);
115 template<>
116 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedHandle> {
117 typedef ppapi::proxy::SerializedHandle param_type;
118 static void Write(Message* m, const param_type& p);
119 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
120 static void Log(const param_type& p, std::string* l);
123 template<>
124 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::HostResource> {
125 typedef ppapi::HostResource param_type;
126 static void Write(Message* m, const param_type& p);
127 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
128 static void Log(const param_type& p, std::string* l);
131 template<>
132 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedVar> {
133 typedef ppapi::proxy::SerializedVar param_type;
134 static void Write(Message* m, const param_type& p);
135 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
136 static void Log(const param_type& p, std::string* l);
139 template<>
140 struct PPAPI_PROXY_EXPORT ParamTraits<
141 std::vector<ppapi::proxy::SerializedVar> > {
142 typedef std::vector<ppapi::proxy::SerializedVar> param_type;
143 static void Write(Message* m, const param_type& p);
144 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
145 static void Log(const param_type& p, std::string* l);
148 template<>
149 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PpapiPermissions> {
150 typedef ppapi::PpapiPermissions param_type;
151 static void Write(Message* m, const param_type& p);
152 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
153 static void Log(const param_type& p, std::string* l);
156 #if !defined(OS_NACL) && !defined(NACL_WIN64)
157 template <>
158 struct ParamTraits<ppapi::PepperFilePath> {
159 typedef ppapi::PepperFilePath param_type;
160 static void Write(Message* m, const param_type& p);
161 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p);
162 static void Log(const param_type& p, std::string* l);
165 template<>
166 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::proxy::SerializedFlashMenu> {
167 typedef ppapi::proxy::SerializedFlashMenu param_type;
168 static void Write(Message* m, const param_type& p);
169 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
170 static void Log(const param_type& p, std::string* l);
172 #endif // !defined(OS_NACL) && !defined(NACL_WIN64)
174 template<>
175 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::PPB_X509Certificate_Fields> {
176 typedef ppapi::PPB_X509Certificate_Fields param_type;
177 static void Write(Message* m, const param_type& p);
178 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
179 static void Log(const param_type& p, std::string* l);
182 template<>
183 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::SocketOptionData> {
184 typedef ppapi::SocketOptionData param_type;
185 static void Write(Message* m, const param_type& p);
186 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
187 static void Log(const param_type& p, std::string* l);
190 template<>
191 struct PPAPI_PROXY_EXPORT ParamTraits<ppapi::CompositorLayerData::Transform> {
192 typedef ppapi::CompositorLayerData::Transform param_type;
193 static void Write(Message* m, const param_type& p);
194 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
195 static void Log(const param_type& p, std::string* l);
198 } // namespace IPC
200 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_