OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 // This file is auto-generated. DO NOT EDIT! | 5 // This file is auto-generated from |
| 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
| 7 // DO NOT EDIT! |
6 | 8 |
7 #include "ppapi/proxy/ppb_opengles2_proxy.h" | 9 #include "ppapi/proxy/ppb_opengles2_proxy.h" |
8 | 10 |
9 #include "gpu/command_buffer/client/gles2_implementation.h" | 11 #include "gpu/command_buffer/client/gles2_implementation.h" |
10 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
11 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" |
12 #include "ppapi/c/dev/ppb_opengles_dev.h" | 14 #include "ppapi/c/dev/ppb_opengles_dev.h" |
13 #include "ppapi/proxy/plugin_dispatcher.h" | 15 #include "ppapi/proxy/plugin_dispatcher.h" |
14 #include "ppapi/proxy/plugin_resource.h" | 16 #include "ppapi/proxy/plugin_resource.h" |
15 #include "ppapi/proxy/ppb_context_3d_proxy.h" | 17 #include "ppapi/proxy/ppb_context_3d_proxy.h" |
| 18 #include "ppapi/shared_impl/resource_object_base.h" |
| 19 #include "ppapi/shared_impl/tracker_base.h" |
16 | 20 |
17 namespace pp { | 21 namespace pp { |
18 namespace proxy { | 22 namespace proxy { |
19 | 23 |
20 namespace { | 24 namespace { |
21 | 25 |
| 26 gpu::gles2::GLES2Implementation* GetGLES(PP_Resource context) { |
| 27 ppapi::ResourceObjectBase* base = |
| 28 ppapi::TrackerBase::Get()->GetResourceAPI(context); |
| 29 DCHECK(base->AsPPB_Context3D_API()); |
| 30 return static_cast<Context3D*>(base)->gles2_impl(); |
| 31 } |
| 32 |
22 void ActiveTexture(PP_Resource context_id, GLenum texture) { | 33 void ActiveTexture(PP_Resource context_id, GLenum texture) { |
23 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 34 GetGLES(context_id)->ActiveTexture(texture); |
24 context->gles2_impl()->ActiveTexture(texture); | |
25 } | 35 } |
26 | 36 |
27 void AttachShader(PP_Resource context_id, GLuint program, GLuint shader) { | 37 void AttachShader(PP_Resource context_id, GLuint program, GLuint shader) { |
28 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 38 GetGLES(context_id)->AttachShader(program, shader); |
29 context->gles2_impl()->AttachShader(program, shader); | |
30 } | 39 } |
31 | 40 |
32 void BindAttribLocation( | 41 void BindAttribLocation( |
33 PP_Resource context_id, GLuint program, GLuint index, const char* name) { | 42 PP_Resource context_id, GLuint program, GLuint index, const char* name) { |
34 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 43 GetGLES(context_id)->BindAttribLocation(program, index, name); |
35 context->gles2_impl()->BindAttribLocation(program, index, name); | |
36 } | 44 } |
37 | 45 |
38 void BindBuffer(PP_Resource context_id, GLenum target, GLuint buffer) { | 46 void BindBuffer(PP_Resource context_id, GLenum target, GLuint buffer) { |
39 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 47 GetGLES(context_id)->BindBuffer(target, buffer); |
40 context->gles2_impl()->BindBuffer(target, buffer); | |
41 } | 48 } |
42 | 49 |
43 void BindFramebuffer( | 50 void BindFramebuffer( |
44 PP_Resource context_id, GLenum target, GLuint framebuffer) { | 51 PP_Resource context_id, GLenum target, GLuint framebuffer) { |
45 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 52 GetGLES(context_id)->BindFramebuffer(target, framebuffer); |
46 context->gles2_impl()->BindFramebuffer(target, framebuffer); | |
47 } | 53 } |
48 | 54 |
49 void BindRenderbuffer( | 55 void BindRenderbuffer( |
50 PP_Resource context_id, GLenum target, GLuint renderbuffer) { | 56 PP_Resource context_id, GLenum target, GLuint renderbuffer) { |
51 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 57 GetGLES(context_id)->BindRenderbuffer(target, renderbuffer); |
52 context->gles2_impl()->BindRenderbuffer(target, renderbuffer); | |
53 } | 58 } |
54 | 59 |
55 void BindTexture(PP_Resource context_id, GLenum target, GLuint texture) { | 60 void BindTexture(PP_Resource context_id, GLenum target, GLuint texture) { |
56 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 61 GetGLES(context_id)->BindTexture(target, texture); |
57 context->gles2_impl()->BindTexture(target, texture); | |
58 } | 62 } |
59 | 63 |
60 void BlendColor( | 64 void BlendColor( |
61 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue, | 65 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue, |
62 GLclampf alpha) { | 66 GLclampf alpha) { |
63 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 67 GetGLES(context_id)->BlendColor(red, green, blue, alpha); |
64 context->gles2_impl()->BlendColor(red, green, blue, alpha); | |
65 } | 68 } |
66 | 69 |
67 void BlendEquation(PP_Resource context_id, GLenum mode) { | 70 void BlendEquation(PP_Resource context_id, GLenum mode) { |
68 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 71 GetGLES(context_id)->BlendEquation(mode); |
69 context->gles2_impl()->BlendEquation(mode); | |
70 } | 72 } |
71 | 73 |
72 void BlendEquationSeparate( | 74 void BlendEquationSeparate( |
73 PP_Resource context_id, GLenum modeRGB, GLenum modeAlpha) { | 75 PP_Resource context_id, GLenum modeRGB, GLenum modeAlpha) { |
74 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 76 GetGLES(context_id)->BlendEquationSeparate(modeRGB, modeAlpha); |
75 context->gles2_impl()->BlendEquationSeparate(modeRGB, modeAlpha); | |
76 } | 77 } |
77 | 78 |
78 void BlendFunc(PP_Resource context_id, GLenum sfactor, GLenum dfactor) { | 79 void BlendFunc(PP_Resource context_id, GLenum sfactor, GLenum dfactor) { |
79 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 80 GetGLES(context_id)->BlendFunc(sfactor, dfactor); |
80 context->gles2_impl()->BlendFunc(sfactor, dfactor); | |
81 } | 81 } |
82 | 82 |
83 void BlendFuncSeparate( | 83 void BlendFuncSeparate( |
84 PP_Resource context_id, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, | 84 PP_Resource context_id, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, |
85 GLenum dstAlpha) { | 85 GLenum dstAlpha) { |
86 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 86 GetGLES(context_id)->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); |
87 context->gles2_impl()->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); | |
88 } | 87 } |
89 | 88 |
90 void BufferData( | 89 void BufferData( |
91 PP_Resource context_id, GLenum target, GLsizeiptr size, const void* data, | 90 PP_Resource context_id, GLenum target, GLsizeiptr size, const void* data, |
92 GLenum usage) { | 91 GLenum usage) { |
93 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 92 GetGLES(context_id)->BufferData(target, size, data, usage); |
94 context->gles2_impl()->BufferData(target, size, data, usage); | |
95 } | 93 } |
96 | 94 |
97 void BufferSubData( | 95 void BufferSubData( |
98 PP_Resource context_id, GLenum target, GLintptr offset, GLsizeiptr size, | 96 PP_Resource context_id, GLenum target, GLintptr offset, GLsizeiptr size, |
99 const void* data) { | 97 const void* data) { |
100 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 98 GetGLES(context_id)->BufferSubData(target, offset, size, data); |
101 context->gles2_impl()->BufferSubData(target, offset, size, data); | |
102 } | 99 } |
103 | 100 |
104 GLenum CheckFramebufferStatus(PP_Resource context_id, GLenum target) { | 101 GLenum CheckFramebufferStatus(PP_Resource context_id, GLenum target) { |
105 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 102 return GetGLES(context_id)->CheckFramebufferStatus(target); |
106 return context->gles2_impl()->CheckFramebufferStatus(target); | |
107 } | 103 } |
108 | 104 |
109 void Clear(PP_Resource context_id, GLbitfield mask) { | 105 void Clear(PP_Resource context_id, GLbitfield mask) { |
110 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 106 GetGLES(context_id)->Clear(mask); |
111 context->gles2_impl()->Clear(mask); | |
112 } | 107 } |
113 | 108 |
114 void ClearColor( | 109 void ClearColor( |
115 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue, | 110 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue, |
116 GLclampf alpha) { | 111 GLclampf alpha) { |
117 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 112 GetGLES(context_id)->ClearColor(red, green, blue, alpha); |
118 context->gles2_impl()->ClearColor(red, green, blue, alpha); | |
119 } | 113 } |
120 | 114 |
121 void ClearDepthf(PP_Resource context_id, GLclampf depth) { | 115 void ClearDepthf(PP_Resource context_id, GLclampf depth) { |
122 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 116 GetGLES(context_id)->ClearDepthf(depth); |
123 context->gles2_impl()->ClearDepthf(depth); | |
124 } | 117 } |
125 | 118 |
126 void ClearStencil(PP_Resource context_id, GLint s) { | 119 void ClearStencil(PP_Resource context_id, GLint s) { |
127 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 120 GetGLES(context_id)->ClearStencil(s); |
128 context->gles2_impl()->ClearStencil(s); | |
129 } | 121 } |
130 | 122 |
131 void ColorMask( | 123 void ColorMask( |
132 PP_Resource context_id, GLboolean red, GLboolean green, GLboolean blue, | 124 PP_Resource context_id, GLboolean red, GLboolean green, GLboolean blue, |
133 GLboolean alpha) { | 125 GLboolean alpha) { |
134 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 126 GetGLES(context_id)->ColorMask(red, green, blue, alpha); |
135 context->gles2_impl()->ColorMask(red, green, blue, alpha); | |
136 } | 127 } |
137 | 128 |
138 void CompileShader(PP_Resource context_id, GLuint shader) { | 129 void CompileShader(PP_Resource context_id, GLuint shader) { |
139 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 130 GetGLES(context_id)->CompileShader(shader); |
140 context->gles2_impl()->CompileShader(shader); | |
141 } | 131 } |
142 | 132 |
143 void CompressedTexImage2D( | 133 void CompressedTexImage2D( |
144 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat, | 134 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat, |
145 GLsizei width, GLsizei height, GLint border, GLsizei imageSize, | 135 GLsizei width, GLsizei height, GLint border, GLsizei imageSize, |
146 const void* data) { | 136 const void* data) { |
147 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 137 GetGLES( |
148 context->gles2_impl()->CompressedTexImage2D( | 138 context_id)->CompressedTexImage2D( |
149 target, level, internalformat, width, height, border, imageSize, data); | 139 target, level, internalformat, width, height, border, imageSize, |
| 140 data); |
150 } | 141 } |
151 | 142 |
152 void CompressedTexSubImage2D( | 143 void CompressedTexSubImage2D( |
153 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, | 144 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, |
154 GLint yoffset, GLsizei width, GLsizei height, GLenum format, | 145 GLint yoffset, GLsizei width, GLsizei height, GLenum format, |
155 GLsizei imageSize, const void* data) { | 146 GLsizei imageSize, const void* data) { |
156 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 147 GetGLES( |
157 context->gles2_impl()->CompressedTexSubImage2D( | 148 context_id)->CompressedTexSubImage2D( |
158 target, level, xoffset, yoffset, width, height, format, imageSize, data); | 149 target, level, xoffset, yoffset, width, height, format, imageSize, |
| 150 data); |
159 } | 151 } |
160 | 152 |
161 void CopyTexImage2D( | 153 void CopyTexImage2D( |
162 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat, | 154 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat, |
163 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { | 155 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { |
164 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 156 GetGLES( |
165 context->gles2_impl()->CopyTexImage2D( | 157 context_id)->CopyTexImage2D( |
166 target, level, internalformat, x, y, width, height, border); | 158 target, level, internalformat, x, y, width, height, border); |
167 } | 159 } |
168 | 160 |
169 void CopyTexSubImage2D( | 161 void CopyTexSubImage2D( |
170 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, | 162 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, |
171 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { | 163 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { |
172 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 164 GetGLES( |
173 context->gles2_impl()->CopyTexSubImage2D( | 165 context_id)->CopyTexSubImage2D( |
174 target, level, xoffset, yoffset, x, y, width, height); | 166 target, level, xoffset, yoffset, x, y, width, height); |
175 } | 167 } |
176 | 168 |
177 GLuint CreateProgram(PP_Resource context_id) { | 169 GLuint CreateProgram(PP_Resource context_id) { |
178 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 170 return GetGLES(context_id)->CreateProgram(); |
179 return context->gles2_impl()->CreateProgram(); | |
180 } | 171 } |
181 | 172 |
182 GLuint CreateShader(PP_Resource context_id, GLenum type) { | 173 GLuint CreateShader(PP_Resource context_id, GLenum type) { |
183 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 174 return GetGLES(context_id)->CreateShader(type); |
184 return context->gles2_impl()->CreateShader(type); | |
185 } | 175 } |
186 | 176 |
187 void CullFace(PP_Resource context_id, GLenum mode) { | 177 void CullFace(PP_Resource context_id, GLenum mode) { |
188 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 178 GetGLES(context_id)->CullFace(mode); |
189 context->gles2_impl()->CullFace(mode); | |
190 } | 179 } |
191 | 180 |
192 void DeleteBuffers(PP_Resource context_id, GLsizei n, const GLuint* buffers) { | 181 void DeleteBuffers(PP_Resource context_id, GLsizei n, const GLuint* buffers) { |
193 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 182 GetGLES(context_id)->DeleteBuffers(n, buffers); |
194 context->gles2_impl()->DeleteBuffers(n, buffers); | |
195 } | 183 } |
196 | 184 |
197 void DeleteFramebuffers( | 185 void DeleteFramebuffers( |
198 PP_Resource context_id, GLsizei n, const GLuint* framebuffers) { | 186 PP_Resource context_id, GLsizei n, const GLuint* framebuffers) { |
199 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 187 GetGLES(context_id)->DeleteFramebuffers(n, framebuffers); |
200 context->gles2_impl()->DeleteFramebuffers(n, framebuffers); | |
201 } | 188 } |
202 | 189 |
203 void DeleteProgram(PP_Resource context_id, GLuint program) { | 190 void DeleteProgram(PP_Resource context_id, GLuint program) { |
204 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 191 GetGLES(context_id)->DeleteProgram(program); |
205 context->gles2_impl()->DeleteProgram(program); | |
206 } | 192 } |
207 | 193 |
208 void DeleteRenderbuffers( | 194 void DeleteRenderbuffers( |
209 PP_Resource context_id, GLsizei n, const GLuint* renderbuffers) { | 195 PP_Resource context_id, GLsizei n, const GLuint* renderbuffers) { |
210 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 196 GetGLES(context_id)->DeleteRenderbuffers(n, renderbuffers); |
211 context->gles2_impl()->DeleteRenderbuffers(n, renderbuffers); | |
212 } | 197 } |
213 | 198 |
214 void DeleteShader(PP_Resource context_id, GLuint shader) { | 199 void DeleteShader(PP_Resource context_id, GLuint shader) { |
215 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 200 GetGLES(context_id)->DeleteShader(shader); |
216 context->gles2_impl()->DeleteShader(shader); | |
217 } | 201 } |
218 | 202 |
219 void DeleteTextures( | 203 void DeleteTextures( |
220 PP_Resource context_id, GLsizei n, const GLuint* textures) { | 204 PP_Resource context_id, GLsizei n, const GLuint* textures) { |
221 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 205 GetGLES(context_id)->DeleteTextures(n, textures); |
222 context->gles2_impl()->DeleteTextures(n, textures); | |
223 } | 206 } |
224 | 207 |
225 void DepthFunc(PP_Resource context_id, GLenum func) { | 208 void DepthFunc(PP_Resource context_id, GLenum func) { |
226 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 209 GetGLES(context_id)->DepthFunc(func); |
227 context->gles2_impl()->DepthFunc(func); | |
228 } | 210 } |
229 | 211 |
230 void DepthMask(PP_Resource context_id, GLboolean flag) { | 212 void DepthMask(PP_Resource context_id, GLboolean flag) { |
231 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 213 GetGLES(context_id)->DepthMask(flag); |
232 context->gles2_impl()->DepthMask(flag); | |
233 } | 214 } |
234 | 215 |
235 void DepthRangef(PP_Resource context_id, GLclampf zNear, GLclampf zFar) { | 216 void DepthRangef(PP_Resource context_id, GLclampf zNear, GLclampf zFar) { |
236 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 217 GetGLES(context_id)->DepthRangef(zNear, zFar); |
237 context->gles2_impl()->DepthRangef(zNear, zFar); | |
238 } | 218 } |
239 | 219 |
240 void DetachShader(PP_Resource context_id, GLuint program, GLuint shader) { | 220 void DetachShader(PP_Resource context_id, GLuint program, GLuint shader) { |
241 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 221 GetGLES(context_id)->DetachShader(program, shader); |
242 context->gles2_impl()->DetachShader(program, shader); | |
243 } | 222 } |
244 | 223 |
245 void Disable(PP_Resource context_id, GLenum cap) { | 224 void Disable(PP_Resource context_id, GLenum cap) { |
246 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 225 GetGLES(context_id)->Disable(cap); |
247 context->gles2_impl()->Disable(cap); | |
248 } | 226 } |
249 | 227 |
250 void DisableVertexAttribArray(PP_Resource context_id, GLuint index) { | 228 void DisableVertexAttribArray(PP_Resource context_id, GLuint index) { |
251 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 229 GetGLES(context_id)->DisableVertexAttribArray(index); |
252 context->gles2_impl()->DisableVertexAttribArray(index); | |
253 } | 230 } |
254 | 231 |
255 void DrawArrays( | 232 void DrawArrays( |
256 PP_Resource context_id, GLenum mode, GLint first, GLsizei count) { | 233 PP_Resource context_id, GLenum mode, GLint first, GLsizei count) { |
257 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 234 GetGLES(context_id)->DrawArrays(mode, first, count); |
258 context->gles2_impl()->DrawArrays(mode, first, count); | |
259 } | 235 } |
260 | 236 |
261 void DrawElements( | 237 void DrawElements( |
262 PP_Resource context_id, GLenum mode, GLsizei count, GLenum type, | 238 PP_Resource context_id, GLenum mode, GLsizei count, GLenum type, |
263 const void* indices) { | 239 const void* indices) { |
264 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 240 GetGLES(context_id)->DrawElements(mode, count, type, indices); |
265 context->gles2_impl()->DrawElements(mode, count, type, indices); | |
266 } | 241 } |
267 | 242 |
268 void Enable(PP_Resource context_id, GLenum cap) { | 243 void Enable(PP_Resource context_id, GLenum cap) { |
269 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 244 GetGLES(context_id)->Enable(cap); |
270 context->gles2_impl()->Enable(cap); | |
271 } | 245 } |
272 | 246 |
273 void EnableVertexAttribArray(PP_Resource context_id, GLuint index) { | 247 void EnableVertexAttribArray(PP_Resource context_id, GLuint index) { |
274 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 248 GetGLES(context_id)->EnableVertexAttribArray(index); |
275 context->gles2_impl()->EnableVertexAttribArray(index); | |
276 } | 249 } |
277 | 250 |
278 void Finish(PP_Resource context_id) { | 251 void Finish(PP_Resource context_id) { |
279 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 252 GetGLES(context_id)->Finish(); |
280 context->gles2_impl()->Finish(); | |
281 } | 253 } |
282 | 254 |
283 void Flush(PP_Resource context_id) { | 255 void Flush(PP_Resource context_id) { |
284 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 256 GetGLES(context_id)->Flush(); |
285 context->gles2_impl()->Flush(); | |
286 } | 257 } |
287 | 258 |
288 void FramebufferRenderbuffer( | 259 void FramebufferRenderbuffer( |
289 PP_Resource context_id, GLenum target, GLenum attachment, | 260 PP_Resource context_id, GLenum target, GLenum attachment, |
290 GLenum renderbuffertarget, GLuint renderbuffer) { | 261 GLenum renderbuffertarget, GLuint renderbuffer) { |
291 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 262 GetGLES( |
292 context->gles2_impl()->FramebufferRenderbuffer( | 263 context_id)->FramebufferRenderbuffer( |
293 target, attachment, renderbuffertarget, renderbuffer); | 264 target, attachment, renderbuffertarget, renderbuffer); |
294 } | 265 } |
295 | 266 |
296 void FramebufferTexture2D( | 267 void FramebufferTexture2D( |
297 PP_Resource context_id, GLenum target, GLenum attachment, GLenum textarget, | 268 PP_Resource context_id, GLenum target, GLenum attachment, GLenum textarget, |
298 GLuint texture, GLint level) { | 269 GLuint texture, GLint level) { |
299 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 270 GetGLES( |
300 context->gles2_impl()->FramebufferTexture2D( | 271 context_id)->FramebufferTexture2D( |
301 target, attachment, textarget, texture, level); | 272 target, attachment, textarget, texture, level); |
302 } | 273 } |
303 | 274 |
304 void FrontFace(PP_Resource context_id, GLenum mode) { | 275 void FrontFace(PP_Resource context_id, GLenum mode) { |
305 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 276 GetGLES(context_id)->FrontFace(mode); |
306 context->gles2_impl()->FrontFace(mode); | |
307 } | 277 } |
308 | 278 |
309 void GenBuffers(PP_Resource context_id, GLsizei n, GLuint* buffers) { | 279 void GenBuffers(PP_Resource context_id, GLsizei n, GLuint* buffers) { |
310 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 280 GetGLES(context_id)->GenBuffers(n, buffers); |
311 context->gles2_impl()->GenBuffers(n, buffers); | |
312 } | 281 } |
313 | 282 |
314 void GenerateMipmap(PP_Resource context_id, GLenum target) { | 283 void GenerateMipmap(PP_Resource context_id, GLenum target) { |
315 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 284 GetGLES(context_id)->GenerateMipmap(target); |
316 context->gles2_impl()->GenerateMipmap(target); | |
317 } | 285 } |
318 | 286 |
319 void GenFramebuffers(PP_Resource context_id, GLsizei n, GLuint* framebuffers) { | 287 void GenFramebuffers(PP_Resource context_id, GLsizei n, GLuint* framebuffers) { |
320 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 288 GetGLES(context_id)->GenFramebuffers(n, framebuffers); |
321 context->gles2_impl()->GenFramebuffers(n, framebuffers); | |
322 } | 289 } |
323 | 290 |
324 void GenRenderbuffers( | 291 void GenRenderbuffers( |
325 PP_Resource context_id, GLsizei n, GLuint* renderbuffers) { | 292 PP_Resource context_id, GLsizei n, GLuint* renderbuffers) { |
326 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 293 GetGLES(context_id)->GenRenderbuffers(n, renderbuffers); |
327 context->gles2_impl()->GenRenderbuffers(n, renderbuffers); | |
328 } | 294 } |
329 | 295 |
330 void GenTextures(PP_Resource context_id, GLsizei n, GLuint* textures) { | 296 void GenTextures(PP_Resource context_id, GLsizei n, GLuint* textures) { |
331 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 297 GetGLES(context_id)->GenTextures(n, textures); |
332 context->gles2_impl()->GenTextures(n, textures); | |
333 } | 298 } |
334 | 299 |
335 void GetActiveAttrib( | 300 void GetActiveAttrib( |
336 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize, | 301 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize, |
337 GLsizei* length, GLint* size, GLenum* type, char* name) { | 302 GLsizei* length, GLint* size, GLenum* type, char* name) { |
338 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 303 GetGLES( |
339 context->gles2_impl()->GetActiveAttrib( | 304 context_id)->GetActiveAttrib( |
340 program, index, bufsize, length, size, type, name); | 305 program, index, bufsize, length, size, type, name); |
341 } | 306 } |
342 | 307 |
343 void GetActiveUniform( | 308 void GetActiveUniform( |
344 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize, | 309 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize, |
345 GLsizei* length, GLint* size, GLenum* type, char* name) { | 310 GLsizei* length, GLint* size, GLenum* type, char* name) { |
346 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 311 GetGLES( |
347 context->gles2_impl()->GetActiveUniform( | 312 context_id)->GetActiveUniform( |
348 program, index, bufsize, length, size, type, name); | 313 program, index, bufsize, length, size, type, name); |
349 } | 314 } |
350 | 315 |
351 void GetAttachedShaders( | 316 void GetAttachedShaders( |
352 PP_Resource context_id, GLuint program, GLsizei maxcount, GLsizei* count, | 317 PP_Resource context_id, GLuint program, GLsizei maxcount, GLsizei* count, |
353 GLuint* shaders) { | 318 GLuint* shaders) { |
354 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 319 GetGLES(context_id)->GetAttachedShaders(program, maxcount, count, shaders); |
355 context->gles2_impl()->GetAttachedShaders(program, maxcount, count, shaders); | |
356 } | 320 } |
357 | 321 |
358 GLint GetAttribLocation( | 322 GLint GetAttribLocation( |
359 PP_Resource context_id, GLuint program, const char* name) { | 323 PP_Resource context_id, GLuint program, const char* name) { |
360 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 324 return GetGLES(context_id)->GetAttribLocation(program, name); |
361 return context->gles2_impl()->GetAttribLocation(program, name); | |
362 } | 325 } |
363 | 326 |
364 void GetBooleanv(PP_Resource context_id, GLenum pname, GLboolean* params) { | 327 void GetBooleanv(PP_Resource context_id, GLenum pname, GLboolean* params) { |
365 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 328 GetGLES(context_id)->GetBooleanv(pname, params); |
366 context->gles2_impl()->GetBooleanv(pname, params); | |
367 } | 329 } |
368 | 330 |
369 void GetBufferParameteriv( | 331 void GetBufferParameteriv( |
370 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { | 332 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { |
371 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 333 GetGLES(context_id)->GetBufferParameteriv(target, pname, params); |
372 context->gles2_impl()->GetBufferParameteriv(target, pname, params); | |
373 } | 334 } |
374 | 335 |
375 GLenum GetError(PP_Resource context_id) { | 336 GLenum GetError(PP_Resource context_id) { |
376 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 337 return GetGLES(context_id)->GetError(); |
377 return context->gles2_impl()->GetError(); | |
378 } | 338 } |
379 | 339 |
380 void GetFloatv(PP_Resource context_id, GLenum pname, GLfloat* params) { | 340 void GetFloatv(PP_Resource context_id, GLenum pname, GLfloat* params) { |
381 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 341 GetGLES(context_id)->GetFloatv(pname, params); |
382 context->gles2_impl()->GetFloatv(pname, params); | |
383 } | 342 } |
384 | 343 |
385 void GetFramebufferAttachmentParameteriv( | 344 void GetFramebufferAttachmentParameteriv( |
386 PP_Resource context_id, GLenum target, GLenum attachment, GLenum pname, | 345 PP_Resource context_id, GLenum target, GLenum attachment, GLenum pname, |
387 GLint* params) { | 346 GLint* params) { |
388 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 347 GetGLES( |
389 context->gles2_impl()->GetFramebufferAttachmentParameteriv( | 348 context_id)->GetFramebufferAttachmentParameteriv( |
390 target, attachment, pname, params); | 349 target, attachment, pname, params); |
391 } | 350 } |
392 | 351 |
393 void GetIntegerv(PP_Resource context_id, GLenum pname, GLint* params) { | 352 void GetIntegerv(PP_Resource context_id, GLenum pname, GLint* params) { |
394 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 353 GetGLES(context_id)->GetIntegerv(pname, params); |
395 context->gles2_impl()->GetIntegerv(pname, params); | |
396 } | 354 } |
397 | 355 |
398 void GetProgramiv( | 356 void GetProgramiv( |
399 PP_Resource context_id, GLuint program, GLenum pname, GLint* params) { | 357 PP_Resource context_id, GLuint program, GLenum pname, GLint* params) { |
400 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 358 GetGLES(context_id)->GetProgramiv(program, pname, params); |
401 context->gles2_impl()->GetProgramiv(program, pname, params); | |
402 } | 359 } |
403 | 360 |
404 void GetProgramInfoLog( | 361 void GetProgramInfoLog( |
405 PP_Resource context_id, GLuint program, GLsizei bufsize, GLsizei* length, | 362 PP_Resource context_id, GLuint program, GLsizei bufsize, GLsizei* length, |
406 char* infolog) { | 363 char* infolog) { |
407 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 364 GetGLES(context_id)->GetProgramInfoLog(program, bufsize, length, infolog); |
408 context->gles2_impl()->GetProgramInfoLog(program, bufsize, length, infolog); | |
409 } | 365 } |
410 | 366 |
411 void GetRenderbufferParameteriv( | 367 void GetRenderbufferParameteriv( |
412 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { | 368 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { |
413 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 369 GetGLES(context_id)->GetRenderbufferParameteriv(target, pname, params); |
414 context->gles2_impl()->GetRenderbufferParameteriv(target, pname, params); | |
415 } | 370 } |
416 | 371 |
417 void GetShaderiv( | 372 void GetShaderiv( |
418 PP_Resource context_id, GLuint shader, GLenum pname, GLint* params) { | 373 PP_Resource context_id, GLuint shader, GLenum pname, GLint* params) { |
419 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 374 GetGLES(context_id)->GetShaderiv(shader, pname, params); |
420 context->gles2_impl()->GetShaderiv(shader, pname, params); | |
421 } | 375 } |
422 | 376 |
423 void GetShaderInfoLog( | 377 void GetShaderInfoLog( |
424 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length, | 378 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length, |
425 char* infolog) { | 379 char* infolog) { |
426 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 380 GetGLES(context_id)->GetShaderInfoLog(shader, bufsize, length, infolog); |
427 context->gles2_impl()->GetShaderInfoLog(shader, bufsize, length, infolog); | |
428 } | 381 } |
429 | 382 |
430 void GetShaderPrecisionFormat( | 383 void GetShaderPrecisionFormat( |
431 PP_Resource context_id, GLenum shadertype, GLenum precisiontype, | 384 PP_Resource context_id, GLenum shadertype, GLenum precisiontype, |
432 GLint* range, GLint* precision) { | 385 GLint* range, GLint* precision) { |
433 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 386 GetGLES( |
434 context->gles2_impl()->GetShaderPrecisionFormat( | 387 context_id)->GetShaderPrecisionFormat( |
435 shadertype, precisiontype, range, precision); | 388 shadertype, precisiontype, range, precision); |
436 } | 389 } |
437 | 390 |
438 void GetShaderSource( | 391 void GetShaderSource( |
439 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length, | 392 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length, |
440 char* source) { | 393 char* source) { |
441 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 394 GetGLES(context_id)->GetShaderSource(shader, bufsize, length, source); |
442 context->gles2_impl()->GetShaderSource(shader, bufsize, length, source); | |
443 } | 395 } |
444 | 396 |
445 const GLubyte* GetString(PP_Resource context_id, GLenum name) { | 397 const GLubyte* GetString(PP_Resource context_id, GLenum name) { |
446 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 398 return GetGLES(context_id)->GetString(name); |
447 return context->gles2_impl()->GetString(name); | |
448 } | 399 } |
449 | 400 |
450 void GetTexParameterfv( | 401 void GetTexParameterfv( |
451 PP_Resource context_id, GLenum target, GLenum pname, GLfloat* params) { | 402 PP_Resource context_id, GLenum target, GLenum pname, GLfloat* params) { |
452 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 403 GetGLES(context_id)->GetTexParameterfv(target, pname, params); |
453 context->gles2_impl()->GetTexParameterfv(target, pname, params); | |
454 } | 404 } |
455 | 405 |
456 void GetTexParameteriv( | 406 void GetTexParameteriv( |
457 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { | 407 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) { |
458 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 408 GetGLES(context_id)->GetTexParameteriv(target, pname, params); |
459 context->gles2_impl()->GetTexParameteriv(target, pname, params); | |
460 } | 409 } |
461 | 410 |
462 void GetUniformfv( | 411 void GetUniformfv( |
463 PP_Resource context_id, GLuint program, GLint location, GLfloat* params) { | 412 PP_Resource context_id, GLuint program, GLint location, GLfloat* params) { |
464 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 413 GetGLES(context_id)->GetUniformfv(program, location, params); |
465 context->gles2_impl()->GetUniformfv(program, location, params); | |
466 } | 414 } |
467 | 415 |
468 void GetUniformiv( | 416 void GetUniformiv( |
469 PP_Resource context_id, GLuint program, GLint location, GLint* params) { | 417 PP_Resource context_id, GLuint program, GLint location, GLint* params) { |
470 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 418 GetGLES(context_id)->GetUniformiv(program, location, params); |
471 context->gles2_impl()->GetUniformiv(program, location, params); | |
472 } | 419 } |
473 | 420 |
474 GLint GetUniformLocation( | 421 GLint GetUniformLocation( |
475 PP_Resource context_id, GLuint program, const char* name) { | 422 PP_Resource context_id, GLuint program, const char* name) { |
476 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 423 return GetGLES(context_id)->GetUniformLocation(program, name); |
477 return context->gles2_impl()->GetUniformLocation(program, name); | |
478 } | 424 } |
479 | 425 |
480 void GetVertexAttribfv( | 426 void GetVertexAttribfv( |
481 PP_Resource context_id, GLuint index, GLenum pname, GLfloat* params) { | 427 PP_Resource context_id, GLuint index, GLenum pname, GLfloat* params) { |
482 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 428 GetGLES(context_id)->GetVertexAttribfv(index, pname, params); |
483 context->gles2_impl()->GetVertexAttribfv(index, pname, params); | |
484 } | 429 } |
485 | 430 |
486 void GetVertexAttribiv( | 431 void GetVertexAttribiv( |
487 PP_Resource context_id, GLuint index, GLenum pname, GLint* params) { | 432 PP_Resource context_id, GLuint index, GLenum pname, GLint* params) { |
488 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 433 GetGLES(context_id)->GetVertexAttribiv(index, pname, params); |
489 context->gles2_impl()->GetVertexAttribiv(index, pname, params); | |
490 } | 434 } |
491 | 435 |
492 void GetVertexAttribPointerv( | 436 void GetVertexAttribPointerv( |
493 PP_Resource context_id, GLuint index, GLenum pname, void** pointer) { | 437 PP_Resource context_id, GLuint index, GLenum pname, void** pointer) { |
494 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 438 GetGLES(context_id)->GetVertexAttribPointerv(index, pname, pointer); |
495 context->gles2_impl()->GetVertexAttribPointerv(index, pname, pointer); | |
496 } | 439 } |
497 | 440 |
498 void Hint(PP_Resource context_id, GLenum target, GLenum mode) { | 441 void Hint(PP_Resource context_id, GLenum target, GLenum mode) { |
499 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 442 GetGLES(context_id)->Hint(target, mode); |
500 context->gles2_impl()->Hint(target, mode); | |
501 } | 443 } |
502 | 444 |
503 GLboolean IsBuffer(PP_Resource context_id, GLuint buffer) { | 445 GLboolean IsBuffer(PP_Resource context_id, GLuint buffer) { |
504 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 446 return GetGLES(context_id)->IsBuffer(buffer); |
505 return context->gles2_impl()->IsBuffer(buffer); | |
506 } | 447 } |
507 | 448 |
508 GLboolean IsEnabled(PP_Resource context_id, GLenum cap) { | 449 GLboolean IsEnabled(PP_Resource context_id, GLenum cap) { |
509 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 450 return GetGLES(context_id)->IsEnabled(cap); |
510 return context->gles2_impl()->IsEnabled(cap); | |
511 } | 451 } |
512 | 452 |
513 GLboolean IsFramebuffer(PP_Resource context_id, GLuint framebuffer) { | 453 GLboolean IsFramebuffer(PP_Resource context_id, GLuint framebuffer) { |
514 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 454 return GetGLES(context_id)->IsFramebuffer(framebuffer); |
515 return context->gles2_impl()->IsFramebuffer(framebuffer); | |
516 } | 455 } |
517 | 456 |
518 GLboolean IsProgram(PP_Resource context_id, GLuint program) { | 457 GLboolean IsProgram(PP_Resource context_id, GLuint program) { |
519 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 458 return GetGLES(context_id)->IsProgram(program); |
520 return context->gles2_impl()->IsProgram(program); | |
521 } | 459 } |
522 | 460 |
523 GLboolean IsRenderbuffer(PP_Resource context_id, GLuint renderbuffer) { | 461 GLboolean IsRenderbuffer(PP_Resource context_id, GLuint renderbuffer) { |
524 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 462 return GetGLES(context_id)->IsRenderbuffer(renderbuffer); |
525 return context->gles2_impl()->IsRenderbuffer(renderbuffer); | |
526 } | 463 } |
527 | 464 |
528 GLboolean IsShader(PP_Resource context_id, GLuint shader) { | 465 GLboolean IsShader(PP_Resource context_id, GLuint shader) { |
529 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 466 return GetGLES(context_id)->IsShader(shader); |
530 return context->gles2_impl()->IsShader(shader); | |
531 } | 467 } |
532 | 468 |
533 GLboolean IsTexture(PP_Resource context_id, GLuint texture) { | 469 GLboolean IsTexture(PP_Resource context_id, GLuint texture) { |
534 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 470 return GetGLES(context_id)->IsTexture(texture); |
535 return context->gles2_impl()->IsTexture(texture); | |
536 } | 471 } |
537 | 472 |
538 void LineWidth(PP_Resource context_id, GLfloat width) { | 473 void LineWidth(PP_Resource context_id, GLfloat width) { |
539 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 474 GetGLES(context_id)->LineWidth(width); |
540 context->gles2_impl()->LineWidth(width); | |
541 } | 475 } |
542 | 476 |
543 void LinkProgram(PP_Resource context_id, GLuint program) { | 477 void LinkProgram(PP_Resource context_id, GLuint program) { |
544 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 478 GetGLES(context_id)->LinkProgram(program); |
545 context->gles2_impl()->LinkProgram(program); | |
546 } | 479 } |
547 | 480 |
548 void PixelStorei(PP_Resource context_id, GLenum pname, GLint param) { | 481 void PixelStorei(PP_Resource context_id, GLenum pname, GLint param) { |
549 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 482 GetGLES(context_id)->PixelStorei(pname, param); |
550 context->gles2_impl()->PixelStorei(pname, param); | |
551 } | 483 } |
552 | 484 |
553 void PolygonOffset(PP_Resource context_id, GLfloat factor, GLfloat units) { | 485 void PolygonOffset(PP_Resource context_id, GLfloat factor, GLfloat units) { |
554 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 486 GetGLES(context_id)->PolygonOffset(factor, units); |
555 context->gles2_impl()->PolygonOffset(factor, units); | |
556 } | 487 } |
557 | 488 |
558 void ReadPixels( | 489 void ReadPixels( |
559 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height, | 490 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height, |
560 GLenum format, GLenum type, void* pixels) { | 491 GLenum format, GLenum type, void* pixels) { |
561 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 492 GetGLES(context_id)->ReadPixels(x, y, width, height, format, type, pixels); |
562 context->gles2_impl()->ReadPixels(x, y, width, height, format, type, pixels); | |
563 } | 493 } |
564 | 494 |
565 void ReleaseShaderCompiler(PP_Resource context_id) { | 495 void ReleaseShaderCompiler(PP_Resource context_id) { |
566 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 496 GetGLES(context_id)->ReleaseShaderCompiler(); |
567 context->gles2_impl()->ReleaseShaderCompiler(); | |
568 } | 497 } |
569 | 498 |
570 void RenderbufferStorage( | 499 void RenderbufferStorage( |
571 PP_Resource context_id, GLenum target, GLenum internalformat, GLsizei width, | 500 PP_Resource context_id, GLenum target, GLenum internalformat, GLsizei width, |
572 GLsizei height) { | 501 GLsizei height) { |
573 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 502 GetGLES( |
574 context->gles2_impl()->RenderbufferStorage( | 503 context_id)->RenderbufferStorage(target, internalformat, width, height); |
575 target, internalformat, width, height); | |
576 } | 504 } |
577 | 505 |
578 void SampleCoverage(PP_Resource context_id, GLclampf value, GLboolean invert) { | 506 void SampleCoverage(PP_Resource context_id, GLclampf value, GLboolean invert) { |
579 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 507 GetGLES(context_id)->SampleCoverage(value, invert); |
580 context->gles2_impl()->SampleCoverage(value, invert); | |
581 } | 508 } |
582 | 509 |
583 void Scissor( | 510 void Scissor( |
584 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { | 511 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { |
585 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 512 GetGLES(context_id)->Scissor(x, y, width, height); |
586 context->gles2_impl()->Scissor(x, y, width, height); | |
587 } | 513 } |
588 | 514 |
589 void ShaderBinary( | 515 void ShaderBinary( |
590 PP_Resource context_id, GLsizei n, const GLuint* shaders, | 516 PP_Resource context_id, GLsizei n, const GLuint* shaders, |
591 GLenum binaryformat, const void* binary, GLsizei length) { | 517 GLenum binaryformat, const void* binary, GLsizei length) { |
592 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 518 GetGLES(context_id)->ShaderBinary(n, shaders, binaryformat, binary, length); |
593 context->gles2_impl()->ShaderBinary( | |
594 n, shaders, binaryformat, binary, length); | |
595 } | 519 } |
596 | 520 |
597 void ShaderSource( | 521 void ShaderSource( |
598 PP_Resource context_id, GLuint shader, GLsizei count, const char** str, | 522 PP_Resource context_id, GLuint shader, GLsizei count, const char** str, |
599 const GLint* length) { | 523 const GLint* length) { |
600 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 524 GetGLES(context_id)->ShaderSource(shader, count, str, length); |
601 context->gles2_impl()->ShaderSource(shader, count, str, length); | |
602 } | 525 } |
603 | 526 |
604 void StencilFunc(PP_Resource context_id, GLenum func, GLint ref, GLuint mask) { | 527 void StencilFunc(PP_Resource context_id, GLenum func, GLint ref, GLuint mask) { |
605 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 528 GetGLES(context_id)->StencilFunc(func, ref, mask); |
606 context->gles2_impl()->StencilFunc(func, ref, mask); | |
607 } | 529 } |
608 | 530 |
609 void StencilFuncSeparate( | 531 void StencilFuncSeparate( |
610 PP_Resource context_id, GLenum face, GLenum func, GLint ref, GLuint mask) { | 532 PP_Resource context_id, GLenum face, GLenum func, GLint ref, GLuint mask) { |
611 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 533 GetGLES(context_id)->StencilFuncSeparate(face, func, ref, mask); |
612 context->gles2_impl()->StencilFuncSeparate(face, func, ref, mask); | |
613 } | 534 } |
614 | 535 |
615 void StencilMask(PP_Resource context_id, GLuint mask) { | 536 void StencilMask(PP_Resource context_id, GLuint mask) { |
616 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 537 GetGLES(context_id)->StencilMask(mask); |
617 context->gles2_impl()->StencilMask(mask); | |
618 } | 538 } |
619 | 539 |
620 void StencilMaskSeparate(PP_Resource context_id, GLenum face, GLuint mask) { | 540 void StencilMaskSeparate(PP_Resource context_id, GLenum face, GLuint mask) { |
621 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 541 GetGLES(context_id)->StencilMaskSeparate(face, mask); |
622 context->gles2_impl()->StencilMaskSeparate(face, mask); | |
623 } | 542 } |
624 | 543 |
625 void StencilOp( | 544 void StencilOp( |
626 PP_Resource context_id, GLenum fail, GLenum zfail, GLenum zpass) { | 545 PP_Resource context_id, GLenum fail, GLenum zfail, GLenum zpass) { |
627 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 546 GetGLES(context_id)->StencilOp(fail, zfail, zpass); |
628 context->gles2_impl()->StencilOp(fail, zfail, zpass); | |
629 } | 547 } |
630 | 548 |
631 void StencilOpSeparate( | 549 void StencilOpSeparate( |
632 PP_Resource context_id, GLenum face, GLenum fail, GLenum zfail, | 550 PP_Resource context_id, GLenum face, GLenum fail, GLenum zfail, |
633 GLenum zpass) { | 551 GLenum zpass) { |
634 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 552 GetGLES(context_id)->StencilOpSeparate(face, fail, zfail, zpass); |
635 context->gles2_impl()->StencilOpSeparate(face, fail, zfail, zpass); | |
636 } | 553 } |
637 | 554 |
638 void TexImage2D( | 555 void TexImage2D( |
639 PP_Resource context_id, GLenum target, GLint level, GLint internalformat, | 556 PP_Resource context_id, GLenum target, GLint level, GLint internalformat, |
640 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, | 557 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, |
641 const void* pixels) { | 558 const void* pixels) { |
642 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 559 GetGLES( |
643 context->gles2_impl()->TexImage2D( | 560 context_id)->TexImage2D( |
644 target, level, internalformat, width, height, border, format, type, | 561 target, level, internalformat, width, height, border, format, type, |
645 pixels); | 562 pixels); |
646 } | 563 } |
647 | 564 |
648 void TexParameterf( | 565 void TexParameterf( |
649 PP_Resource context_id, GLenum target, GLenum pname, GLfloat param) { | 566 PP_Resource context_id, GLenum target, GLenum pname, GLfloat param) { |
650 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 567 GetGLES(context_id)->TexParameterf(target, pname, param); |
651 context->gles2_impl()->TexParameterf(target, pname, param); | |
652 } | 568 } |
653 | 569 |
654 void TexParameterfv( | 570 void TexParameterfv( |
655 PP_Resource context_id, GLenum target, GLenum pname, | 571 PP_Resource context_id, GLenum target, GLenum pname, |
656 const GLfloat* params) { | 572 const GLfloat* params) { |
657 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 573 GetGLES(context_id)->TexParameterfv(target, pname, params); |
658 context->gles2_impl()->TexParameterfv(target, pname, params); | |
659 } | 574 } |
660 | 575 |
661 void TexParameteri( | 576 void TexParameteri( |
662 PP_Resource context_id, GLenum target, GLenum pname, GLint param) { | 577 PP_Resource context_id, GLenum target, GLenum pname, GLint param) { |
663 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 578 GetGLES(context_id)->TexParameteri(target, pname, param); |
664 context->gles2_impl()->TexParameteri(target, pname, param); | |
665 } | 579 } |
666 | 580 |
667 void TexParameteriv( | 581 void TexParameteriv( |
668 PP_Resource context_id, GLenum target, GLenum pname, const GLint* params) { | 582 PP_Resource context_id, GLenum target, GLenum pname, const GLint* params) { |
669 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 583 GetGLES(context_id)->TexParameteriv(target, pname, params); |
670 context->gles2_impl()->TexParameteriv(target, pname, params); | |
671 } | 584 } |
672 | 585 |
673 void TexSubImage2D( | 586 void TexSubImage2D( |
674 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, | 587 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, |
675 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, | 588 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, |
676 const void* pixels) { | 589 const void* pixels) { |
677 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 590 GetGLES( |
678 context->gles2_impl()->TexSubImage2D( | 591 context_id)->TexSubImage2D( |
679 target, level, xoffset, yoffset, width, height, format, type, pixels); | 592 target, level, xoffset, yoffset, width, height, format, type, |
| 593 pixels); |
680 } | 594 } |
681 | 595 |
682 void Uniform1f(PP_Resource context_id, GLint location, GLfloat x) { | 596 void Uniform1f(PP_Resource context_id, GLint location, GLfloat x) { |
683 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 597 GetGLES(context_id)->Uniform1f(location, x); |
684 context->gles2_impl()->Uniform1f(location, x); | |
685 } | 598 } |
686 | 599 |
687 void Uniform1fv( | 600 void Uniform1fv( |
688 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { | 601 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { |
689 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 602 GetGLES(context_id)->Uniform1fv(location, count, v); |
690 context->gles2_impl()->Uniform1fv(location, count, v); | |
691 } | 603 } |
692 | 604 |
693 void Uniform1i(PP_Resource context_id, GLint location, GLint x) { | 605 void Uniform1i(PP_Resource context_id, GLint location, GLint x) { |
694 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 606 GetGLES(context_id)->Uniform1i(location, x); |
695 context->gles2_impl()->Uniform1i(location, x); | |
696 } | 607 } |
697 | 608 |
698 void Uniform1iv( | 609 void Uniform1iv( |
699 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { | 610 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { |
700 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 611 GetGLES(context_id)->Uniform1iv(location, count, v); |
701 context->gles2_impl()->Uniform1iv(location, count, v); | |
702 } | 612 } |
703 | 613 |
704 void Uniform2f(PP_Resource context_id, GLint location, GLfloat x, GLfloat y) { | 614 void Uniform2f(PP_Resource context_id, GLint location, GLfloat x, GLfloat y) { |
705 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 615 GetGLES(context_id)->Uniform2f(location, x, y); |
706 context->gles2_impl()->Uniform2f(location, x, y); | |
707 } | 616 } |
708 | 617 |
709 void Uniform2fv( | 618 void Uniform2fv( |
710 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { | 619 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { |
711 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 620 GetGLES(context_id)->Uniform2fv(location, count, v); |
712 context->gles2_impl()->Uniform2fv(location, count, v); | |
713 } | 621 } |
714 | 622 |
715 void Uniform2i(PP_Resource context_id, GLint location, GLint x, GLint y) { | 623 void Uniform2i(PP_Resource context_id, GLint location, GLint x, GLint y) { |
716 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 624 GetGLES(context_id)->Uniform2i(location, x, y); |
717 context->gles2_impl()->Uniform2i(location, x, y); | |
718 } | 625 } |
719 | 626 |
720 void Uniform2iv( | 627 void Uniform2iv( |
721 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { | 628 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { |
722 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 629 GetGLES(context_id)->Uniform2iv(location, count, v); |
723 context->gles2_impl()->Uniform2iv(location, count, v); | |
724 } | 630 } |
725 | 631 |
726 void Uniform3f( | 632 void Uniform3f( |
727 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z) { | 633 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z) { |
728 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 634 GetGLES(context_id)->Uniform3f(location, x, y, z); |
729 context->gles2_impl()->Uniform3f(location, x, y, z); | |
730 } | 635 } |
731 | 636 |
732 void Uniform3fv( | 637 void Uniform3fv( |
733 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { | 638 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { |
734 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 639 GetGLES(context_id)->Uniform3fv(location, count, v); |
735 context->gles2_impl()->Uniform3fv(location, count, v); | |
736 } | 640 } |
737 | 641 |
738 void Uniform3i( | 642 void Uniform3i( |
739 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z) { | 643 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z) { |
740 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 644 GetGLES(context_id)->Uniform3i(location, x, y, z); |
741 context->gles2_impl()->Uniform3i(location, x, y, z); | |
742 } | 645 } |
743 | 646 |
744 void Uniform3iv( | 647 void Uniform3iv( |
745 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { | 648 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { |
746 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 649 GetGLES(context_id)->Uniform3iv(location, count, v); |
747 context->gles2_impl()->Uniform3iv(location, count, v); | |
748 } | 650 } |
749 | 651 |
750 void Uniform4f( | 652 void Uniform4f( |
751 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z, | 653 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z, |
752 GLfloat w) { | 654 GLfloat w) { |
753 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 655 GetGLES(context_id)->Uniform4f(location, x, y, z, w); |
754 context->gles2_impl()->Uniform4f(location, x, y, z, w); | |
755 } | 656 } |
756 | 657 |
757 void Uniform4fv( | 658 void Uniform4fv( |
758 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { | 659 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) { |
759 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 660 GetGLES(context_id)->Uniform4fv(location, count, v); |
760 context->gles2_impl()->Uniform4fv(location, count, v); | |
761 } | 661 } |
762 | 662 |
763 void Uniform4i( | 663 void Uniform4i( |
764 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z, | 664 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z, |
765 GLint w) { | 665 GLint w) { |
766 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 666 GetGLES(context_id)->Uniform4i(location, x, y, z, w); |
767 context->gles2_impl()->Uniform4i(location, x, y, z, w); | |
768 } | 667 } |
769 | 668 |
770 void Uniform4iv( | 669 void Uniform4iv( |
771 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { | 670 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) { |
772 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 671 GetGLES(context_id)->Uniform4iv(location, count, v); |
773 context->gles2_impl()->Uniform4iv(location, count, v); | |
774 } | 672 } |
775 | 673 |
776 void UniformMatrix2fv( | 674 void UniformMatrix2fv( |
777 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, | 675 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, |
778 const GLfloat* value) { | 676 const GLfloat* value) { |
779 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 677 GetGLES(context_id)->UniformMatrix2fv(location, count, transpose, value); |
780 context->gles2_impl()->UniformMatrix2fv(location, count, transpose, value); | |
781 } | 678 } |
782 | 679 |
783 void UniformMatrix3fv( | 680 void UniformMatrix3fv( |
784 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, | 681 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, |
785 const GLfloat* value) { | 682 const GLfloat* value) { |
786 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 683 GetGLES(context_id)->UniformMatrix3fv(location, count, transpose, value); |
787 context->gles2_impl()->UniformMatrix3fv(location, count, transpose, value); | |
788 } | 684 } |
789 | 685 |
790 void UniformMatrix4fv( | 686 void UniformMatrix4fv( |
791 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, | 687 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose, |
792 const GLfloat* value) { | 688 const GLfloat* value) { |
793 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 689 GetGLES(context_id)->UniformMatrix4fv(location, count, transpose, value); |
794 context->gles2_impl()->UniformMatrix4fv(location, count, transpose, value); | |
795 } | 690 } |
796 | 691 |
797 void UseProgram(PP_Resource context_id, GLuint program) { | 692 void UseProgram(PP_Resource context_id, GLuint program) { |
798 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 693 GetGLES(context_id)->UseProgram(program); |
799 context->gles2_impl()->UseProgram(program); | |
800 } | 694 } |
801 | 695 |
802 void ValidateProgram(PP_Resource context_id, GLuint program) { | 696 void ValidateProgram(PP_Resource context_id, GLuint program) { |
803 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 697 GetGLES(context_id)->ValidateProgram(program); |
804 context->gles2_impl()->ValidateProgram(program); | |
805 } | 698 } |
806 | 699 |
807 void VertexAttrib1f(PP_Resource context_id, GLuint indx, GLfloat x) { | 700 void VertexAttrib1f(PP_Resource context_id, GLuint indx, GLfloat x) { |
808 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 701 GetGLES(context_id)->VertexAttrib1f(indx, x); |
809 context->gles2_impl()->VertexAttrib1f(indx, x); | |
810 } | 702 } |
811 | 703 |
812 void VertexAttrib1fv( | 704 void VertexAttrib1fv( |
813 PP_Resource context_id, GLuint indx, const GLfloat* values) { | 705 PP_Resource context_id, GLuint indx, const GLfloat* values) { |
814 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 706 GetGLES(context_id)->VertexAttrib1fv(indx, values); |
815 context->gles2_impl()->VertexAttrib1fv(indx, values); | |
816 } | 707 } |
817 | 708 |
818 void VertexAttrib2f( | 709 void VertexAttrib2f( |
819 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y) { | 710 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y) { |
820 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 711 GetGLES(context_id)->VertexAttrib2f(indx, x, y); |
821 context->gles2_impl()->VertexAttrib2f(indx, x, y); | |
822 } | 712 } |
823 | 713 |
824 void VertexAttrib2fv( | 714 void VertexAttrib2fv( |
825 PP_Resource context_id, GLuint indx, const GLfloat* values) { | 715 PP_Resource context_id, GLuint indx, const GLfloat* values) { |
826 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 716 GetGLES(context_id)->VertexAttrib2fv(indx, values); |
827 context->gles2_impl()->VertexAttrib2fv(indx, values); | |
828 } | 717 } |
829 | 718 |
830 void VertexAttrib3f( | 719 void VertexAttrib3f( |
831 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z) { | 720 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z) { |
832 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 721 GetGLES(context_id)->VertexAttrib3f(indx, x, y, z); |
833 context->gles2_impl()->VertexAttrib3f(indx, x, y, z); | |
834 } | 722 } |
835 | 723 |
836 void VertexAttrib3fv( | 724 void VertexAttrib3fv( |
837 PP_Resource context_id, GLuint indx, const GLfloat* values) { | 725 PP_Resource context_id, GLuint indx, const GLfloat* values) { |
838 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 726 GetGLES(context_id)->VertexAttrib3fv(indx, values); |
839 context->gles2_impl()->VertexAttrib3fv(indx, values); | |
840 } | 727 } |
841 | 728 |
842 void VertexAttrib4f( | 729 void VertexAttrib4f( |
843 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z, | 730 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z, |
844 GLfloat w) { | 731 GLfloat w) { |
845 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 732 GetGLES(context_id)->VertexAttrib4f(indx, x, y, z, w); |
846 context->gles2_impl()->VertexAttrib4f(indx, x, y, z, w); | |
847 } | 733 } |
848 | 734 |
849 void VertexAttrib4fv( | 735 void VertexAttrib4fv( |
850 PP_Resource context_id, GLuint indx, const GLfloat* values) { | 736 PP_Resource context_id, GLuint indx, const GLfloat* values) { |
851 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 737 GetGLES(context_id)->VertexAttrib4fv(indx, values); |
852 context->gles2_impl()->VertexAttrib4fv(indx, values); | |
853 } | 738 } |
854 | 739 |
855 void VertexAttribPointer( | 740 void VertexAttribPointer( |
856 PP_Resource context_id, GLuint indx, GLint size, GLenum type, | 741 PP_Resource context_id, GLuint indx, GLint size, GLenum type, |
857 GLboolean normalized, GLsizei stride, const void* ptr) { | 742 GLboolean normalized, GLsizei stride, const void* ptr) { |
858 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 743 GetGLES( |
859 context->gles2_impl()->VertexAttribPointer( | 744 context_id)->VertexAttribPointer( |
860 indx, size, type, normalized, stride, ptr); | 745 indx, size, type, normalized, stride, ptr); |
861 } | 746 } |
862 | 747 |
863 void Viewport( | 748 void Viewport( |
864 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { | 749 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { |
865 Context3D* context = PluginResource::GetAs<Context3D>(context_id); | 750 GetGLES(context_id)->Viewport(x, y, width, height); |
866 context->gles2_impl()->Viewport(x, y, width, height); | 751 } |
| 752 |
| 753 void SetLatchCHROMIUM(PP_Resource context_id, GLuint latch_id) { |
| 754 GetGLES(context_id)->SetLatchCHROMIUM(latch_id); |
| 755 } |
| 756 |
| 757 void WaitLatchCHROMIUM(PP_Resource context_id, GLuint latch_id) { |
| 758 GetGLES(context_id)->WaitLatchCHROMIUM(latch_id); |
867 } | 759 } |
868 | 760 |
869 const struct PPB_OpenGLES2_Dev opengles2_interface = { | 761 const struct PPB_OpenGLES2_Dev opengles2_interface = { |
870 &ActiveTexture, | 762 &ActiveTexture, |
871 &AttachShader, | 763 &AttachShader, |
872 &BindAttribLocation, | 764 &BindAttribLocation, |
873 &BindBuffer, | 765 &BindBuffer, |
874 &BindFramebuffer, | 766 &BindFramebuffer, |
875 &BindRenderbuffer, | 767 &BindRenderbuffer, |
876 &BindTexture, | 768 &BindTexture, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 &ValidateProgram, | 893 &ValidateProgram, |
1002 &VertexAttrib1f, | 894 &VertexAttrib1f, |
1003 &VertexAttrib1fv, | 895 &VertexAttrib1fv, |
1004 &VertexAttrib2f, | 896 &VertexAttrib2f, |
1005 &VertexAttrib2fv, | 897 &VertexAttrib2fv, |
1006 &VertexAttrib3f, | 898 &VertexAttrib3f, |
1007 &VertexAttrib3fv, | 899 &VertexAttrib3fv, |
1008 &VertexAttrib4f, | 900 &VertexAttrib4f, |
1009 &VertexAttrib4fv, | 901 &VertexAttrib4fv, |
1010 &VertexAttribPointer, | 902 &VertexAttribPointer, |
1011 &Viewport | 903 &Viewport, |
| 904 &SetLatchCHROMIUM, |
| 905 &WaitLatchCHROMIUM |
1012 }; | 906 }; |
1013 | 907 |
1014 | 908 |
1015 InterfaceProxy* CreateOpenGLES2Proxy(Dispatcher* dispatcher, | 909 InterfaceProxy* CreateOpenGLES2Proxy(Dispatcher* dispatcher, |
1016 const void* target_interface) { | 910 const void* target_interface) { |
1017 return new PPB_OpenGLES2_Proxy(dispatcher, target_interface); | 911 return new PPB_OpenGLES2_Proxy(dispatcher, target_interface); |
1018 } | 912 } |
1019 | 913 |
1020 } // namespace | 914 } // namespace |
1021 | 915 |
(...skipping 16 matching lines...) Expand all Loading... |
1038 }; | 932 }; |
1039 return &info; | 933 return &info; |
1040 } | 934 } |
1041 | 935 |
1042 bool PPB_OpenGLES2_Proxy::OnMessageReceived(const IPC::Message& msg) { | 936 bool PPB_OpenGLES2_Proxy::OnMessageReceived(const IPC::Message& msg) { |
1043 return false; | 937 return false; |
1044 } | 938 } |
1045 | 939 |
1046 } // namespace proxy | 940 } // namespace proxy |
1047 } // namespace pp | 941 } // namespace pp |
OLD | NEW |