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 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
9 #include "ppapi/shared_impl/ppb_opengles2_shared.h"
11 #include "base/logging.h"
12 #include "gpu/command_buffer/client/gles2_implementation.h"
13 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
14 #include "ppapi/thunk/enter.h"
20 typedef thunk::EnterResource
<thunk::PPB_Graphics3D_API
> Enter3D
;
22 gpu::gles2::GLES2Implementation
* ToGles2Impl(Enter3D
* enter
) {
24 DCHECK(enter
->succeeded());
25 return static_cast<PPB_Graphics3D_Shared
*>(enter
->object())->gles2_impl();
28 void ActiveTexture(PP_Resource context_id
, GLenum texture
) {
29 Enter3D
enter(context_id
, true);
30 if (enter
.succeeded()) {
31 ToGles2Impl(&enter
)->ActiveTexture(texture
);
35 void AttachShader(PP_Resource context_id
, GLuint program
, GLuint shader
) {
36 Enter3D
enter(context_id
, true);
37 if (enter
.succeeded()) {
38 ToGles2Impl(&enter
)->AttachShader(program
, shader
);
42 void BindAttribLocation(
43 PP_Resource context_id
, GLuint program
, GLuint index
, const char* name
) {
44 Enter3D
enter(context_id
, true);
45 if (enter
.succeeded()) {
46 ToGles2Impl(&enter
)->BindAttribLocation(program
, index
, name
);
50 void BindBuffer(PP_Resource context_id
, GLenum target
, GLuint buffer
) {
51 Enter3D
enter(context_id
, true);
52 if (enter
.succeeded()) {
53 ToGles2Impl(&enter
)->BindBuffer(target
, buffer
);
58 PP_Resource context_id
, GLenum target
, GLuint framebuffer
) {
59 Enter3D
enter(context_id
, true);
60 if (enter
.succeeded()) {
61 ToGles2Impl(&enter
)->BindFramebuffer(target
, framebuffer
);
65 void BindRenderbuffer(
66 PP_Resource context_id
, GLenum target
, GLuint renderbuffer
) {
67 Enter3D
enter(context_id
, true);
68 if (enter
.succeeded()) {
69 ToGles2Impl(&enter
)->BindRenderbuffer(target
, renderbuffer
);
73 void BindTexture(PP_Resource context_id
, GLenum target
, GLuint texture
) {
74 Enter3D
enter(context_id
, true);
75 if (enter
.succeeded()) {
76 ToGles2Impl(&enter
)->BindTexture(target
, texture
);
81 PP_Resource context_id
, GLclampf red
, GLclampf green
, GLclampf blue
,
83 Enter3D
enter(context_id
, true);
84 if (enter
.succeeded()) {
85 ToGles2Impl(&enter
)->BlendColor(red
, green
, blue
, alpha
);
89 void BlendEquation(PP_Resource context_id
, GLenum mode
) {
90 Enter3D
enter(context_id
, true);
91 if (enter
.succeeded()) {
92 ToGles2Impl(&enter
)->BlendEquation(mode
);
96 void BlendEquationSeparate(
97 PP_Resource context_id
, GLenum modeRGB
, GLenum modeAlpha
) {
98 Enter3D
enter(context_id
, true);
99 if (enter
.succeeded()) {
100 ToGles2Impl(&enter
)->BlendEquationSeparate(modeRGB
, modeAlpha
);
104 void BlendFunc(PP_Resource context_id
, GLenum sfactor
, GLenum dfactor
) {
105 Enter3D
enter(context_id
, true);
106 if (enter
.succeeded()) {
107 ToGles2Impl(&enter
)->BlendFunc(sfactor
, dfactor
);
111 void BlendFuncSeparate(
112 PP_Resource context_id
, GLenum srcRGB
, GLenum dstRGB
, GLenum srcAlpha
,
114 Enter3D
enter(context_id
, true);
115 if (enter
.succeeded()) {
116 ToGles2Impl(&enter
)->BlendFuncSeparate(srcRGB
, dstRGB
, srcAlpha
, dstAlpha
);
121 PP_Resource context_id
, GLenum target
, GLsizeiptr size
, const void* data
,
123 Enter3D
enter(context_id
, true);
124 if (enter
.succeeded()) {
125 ToGles2Impl(&enter
)->BufferData(target
, size
, data
, usage
);
130 PP_Resource context_id
, GLenum target
, GLintptr offset
, GLsizeiptr size
,
132 Enter3D
enter(context_id
, true);
133 if (enter
.succeeded()) {
134 ToGles2Impl(&enter
)->BufferSubData(target
, offset
, size
, data
);
138 GLenum
CheckFramebufferStatus(PP_Resource context_id
, GLenum target
) {
139 Enter3D
enter(context_id
, true);
140 if (enter
.succeeded()) {
141 return ToGles2Impl(&enter
)->CheckFramebufferStatus(target
);
147 void Clear(PP_Resource context_id
, GLbitfield mask
) {
148 Enter3D
enter(context_id
, true);
149 if (enter
.succeeded()) {
150 ToGles2Impl(&enter
)->Clear(mask
);
155 PP_Resource context_id
, GLclampf red
, GLclampf green
, GLclampf blue
,
157 Enter3D
enter(context_id
, true);
158 if (enter
.succeeded()) {
159 ToGles2Impl(&enter
)->ClearColor(red
, green
, blue
, alpha
);
163 void ClearDepthf(PP_Resource context_id
, GLclampf depth
) {
164 Enter3D
enter(context_id
, true);
165 if (enter
.succeeded()) {
166 ToGles2Impl(&enter
)->ClearDepthf(depth
);
170 void ClearStencil(PP_Resource context_id
, GLint s
) {
171 Enter3D
enter(context_id
, true);
172 if (enter
.succeeded()) {
173 ToGles2Impl(&enter
)->ClearStencil(s
);
178 PP_Resource context_id
, GLboolean red
, GLboolean green
, GLboolean blue
,
180 Enter3D
enter(context_id
, true);
181 if (enter
.succeeded()) {
182 ToGles2Impl(&enter
)->ColorMask(red
, green
, blue
, alpha
);
186 void CompileShader(PP_Resource context_id
, GLuint shader
) {
187 Enter3D
enter(context_id
, true);
188 if (enter
.succeeded()) {
189 ToGles2Impl(&enter
)->CompileShader(shader
);
193 void CompressedTexImage2D(
194 PP_Resource context_id
, GLenum target
, GLint level
, GLenum internalformat
,
195 GLsizei width
, GLsizei height
, GLint border
, GLsizei imageSize
,
197 Enter3D
enter(context_id
, true);
198 if (enter
.succeeded()) {
200 &enter
)->CompressedTexImage2D(
201 target
, level
, internalformat
, width
, height
, border
, imageSize
,
206 void CompressedTexSubImage2D(
207 PP_Resource context_id
, GLenum target
, GLint level
, GLint xoffset
,
208 GLint yoffset
, GLsizei width
, GLsizei height
, GLenum format
,
209 GLsizei imageSize
, const void* data
) {
210 Enter3D
enter(context_id
, true);
211 if (enter
.succeeded()) {
213 &enter
)->CompressedTexSubImage2D(
214 target
, level
, xoffset
, yoffset
, width
, height
, format
, imageSize
,
220 PP_Resource context_id
, GLenum target
, GLint level
, GLenum internalformat
,
221 GLint x
, GLint y
, GLsizei width
, GLsizei height
, GLint border
) {
222 Enter3D
enter(context_id
, true);
223 if (enter
.succeeded()) {
225 &enter
)->CopyTexImage2D(
226 target
, level
, internalformat
, x
, y
, width
, height
, border
);
230 void CopyTexSubImage2D(
231 PP_Resource context_id
, GLenum target
, GLint level
, GLint xoffset
,
232 GLint yoffset
, GLint x
, GLint y
, GLsizei width
, GLsizei height
) {
233 Enter3D
enter(context_id
, true);
234 if (enter
.succeeded()) {
236 &enter
)->CopyTexSubImage2D(
237 target
, level
, xoffset
, yoffset
, x
, y
, width
, height
);
241 GLuint
CreateProgram(PP_Resource context_id
) {
242 Enter3D
enter(context_id
, true);
243 if (enter
.succeeded()) {
244 return ToGles2Impl(&enter
)->CreateProgram();
250 GLuint
CreateShader(PP_Resource context_id
, GLenum type
) {
251 Enter3D
enter(context_id
, true);
252 if (enter
.succeeded()) {
253 return ToGles2Impl(&enter
)->CreateShader(type
);
259 void CullFace(PP_Resource context_id
, GLenum mode
) {
260 Enter3D
enter(context_id
, true);
261 if (enter
.succeeded()) {
262 ToGles2Impl(&enter
)->CullFace(mode
);
266 void DeleteBuffers(PP_Resource context_id
, GLsizei n
, const GLuint
* buffers
) {
267 Enter3D
enter(context_id
, true);
268 if (enter
.succeeded()) {
269 ToGles2Impl(&enter
)->DeleteBuffers(n
, buffers
);
273 void DeleteFramebuffers(
274 PP_Resource context_id
, GLsizei n
, const GLuint
* framebuffers
) {
275 Enter3D
enter(context_id
, true);
276 if (enter
.succeeded()) {
277 ToGles2Impl(&enter
)->DeleteFramebuffers(n
, framebuffers
);
281 void DeleteProgram(PP_Resource context_id
, GLuint program
) {
282 Enter3D
enter(context_id
, true);
283 if (enter
.succeeded()) {
284 ToGles2Impl(&enter
)->DeleteProgram(program
);
288 void DeleteRenderbuffers(
289 PP_Resource context_id
, GLsizei n
, const GLuint
* renderbuffers
) {
290 Enter3D
enter(context_id
, true);
291 if (enter
.succeeded()) {
292 ToGles2Impl(&enter
)->DeleteRenderbuffers(n
, renderbuffers
);
296 void DeleteShader(PP_Resource context_id
, GLuint shader
) {
297 Enter3D
enter(context_id
, true);
298 if (enter
.succeeded()) {
299 ToGles2Impl(&enter
)->DeleteShader(shader
);
304 PP_Resource context_id
, GLsizei n
, const GLuint
* textures
) {
305 Enter3D
enter(context_id
, true);
306 if (enter
.succeeded()) {
307 ToGles2Impl(&enter
)->DeleteTextures(n
, textures
);
311 void DepthFunc(PP_Resource context_id
, GLenum func
) {
312 Enter3D
enter(context_id
, true);
313 if (enter
.succeeded()) {
314 ToGles2Impl(&enter
)->DepthFunc(func
);
318 void DepthMask(PP_Resource context_id
, GLboolean flag
) {
319 Enter3D
enter(context_id
, true);
320 if (enter
.succeeded()) {
321 ToGles2Impl(&enter
)->DepthMask(flag
);
325 void DepthRangef(PP_Resource context_id
, GLclampf zNear
, GLclampf zFar
) {
326 Enter3D
enter(context_id
, true);
327 if (enter
.succeeded()) {
328 ToGles2Impl(&enter
)->DepthRangef(zNear
, zFar
);
332 void DetachShader(PP_Resource context_id
, GLuint program
, GLuint shader
) {
333 Enter3D
enter(context_id
, true);
334 if (enter
.succeeded()) {
335 ToGles2Impl(&enter
)->DetachShader(program
, shader
);
339 void Disable(PP_Resource context_id
, GLenum cap
) {
340 Enter3D
enter(context_id
, true);
341 if (enter
.succeeded()) {
342 ToGles2Impl(&enter
)->Disable(cap
);
346 void DisableVertexAttribArray(PP_Resource context_id
, GLuint index
) {
347 Enter3D
enter(context_id
, true);
348 if (enter
.succeeded()) {
349 ToGles2Impl(&enter
)->DisableVertexAttribArray(index
);
354 PP_Resource context_id
, GLenum mode
, GLint first
, GLsizei count
) {
355 Enter3D
enter(context_id
, true);
356 if (enter
.succeeded()) {
357 ToGles2Impl(&enter
)->DrawArrays(mode
, first
, count
);
362 PP_Resource context_id
, GLenum mode
, GLsizei count
, GLenum type
,
363 const void* indices
) {
364 Enter3D
enter(context_id
, true);
365 if (enter
.succeeded()) {
366 ToGles2Impl(&enter
)->DrawElements(mode
, count
, type
, indices
);
370 void Enable(PP_Resource context_id
, GLenum cap
) {
371 Enter3D
enter(context_id
, true);
372 if (enter
.succeeded()) {
373 ToGles2Impl(&enter
)->Enable(cap
);
377 void EnableVertexAttribArray(PP_Resource context_id
, GLuint index
) {
378 Enter3D
enter(context_id
, true);
379 if (enter
.succeeded()) {
380 ToGles2Impl(&enter
)->EnableVertexAttribArray(index
);
384 void Finish(PP_Resource context_id
) {
385 Enter3D
enter(context_id
, true);
386 if (enter
.succeeded()) {
387 ToGles2Impl(&enter
)->Finish();
391 void Flush(PP_Resource context_id
) {
392 Enter3D
enter(context_id
, true);
393 if (enter
.succeeded()) {
394 ToGles2Impl(&enter
)->Flush();
398 void FramebufferRenderbuffer(
399 PP_Resource context_id
, GLenum target
, GLenum attachment
,
400 GLenum renderbuffertarget
, GLuint renderbuffer
) {
401 Enter3D
enter(context_id
, true);
402 if (enter
.succeeded()) {
404 &enter
)->FramebufferRenderbuffer(
405 target
, attachment
, renderbuffertarget
, renderbuffer
);
409 void FramebufferTexture2D(
410 PP_Resource context_id
, GLenum target
, GLenum attachment
, GLenum textarget
,
411 GLuint texture
, GLint level
) {
412 Enter3D
enter(context_id
, true);
413 if (enter
.succeeded()) {
415 &enter
)->FramebufferTexture2D(
416 target
, attachment
, textarget
, texture
, level
);
420 void FrontFace(PP_Resource context_id
, GLenum mode
) {
421 Enter3D
enter(context_id
, true);
422 if (enter
.succeeded()) {
423 ToGles2Impl(&enter
)->FrontFace(mode
);
427 void GenBuffers(PP_Resource context_id
, GLsizei n
, GLuint
* buffers
) {
428 Enter3D
enter(context_id
, true);
429 if (enter
.succeeded()) {
430 ToGles2Impl(&enter
)->GenBuffers(n
, buffers
);
434 void GenerateMipmap(PP_Resource context_id
, GLenum target
) {
435 Enter3D
enter(context_id
, true);
436 if (enter
.succeeded()) {
437 ToGles2Impl(&enter
)->GenerateMipmap(target
);
441 void GenFramebuffers(PP_Resource context_id
, GLsizei n
, GLuint
* framebuffers
) {
442 Enter3D
enter(context_id
, true);
443 if (enter
.succeeded()) {
444 ToGles2Impl(&enter
)->GenFramebuffers(n
, framebuffers
);
448 void GenRenderbuffers(
449 PP_Resource context_id
, GLsizei n
, GLuint
* renderbuffers
) {
450 Enter3D
enter(context_id
, true);
451 if (enter
.succeeded()) {
452 ToGles2Impl(&enter
)->GenRenderbuffers(n
, renderbuffers
);
456 void GenTextures(PP_Resource context_id
, GLsizei n
, GLuint
* textures
) {
457 Enter3D
enter(context_id
, true);
458 if (enter
.succeeded()) {
459 ToGles2Impl(&enter
)->GenTextures(n
, textures
);
463 void GetActiveAttrib(
464 PP_Resource context_id
, GLuint program
, GLuint index
, GLsizei bufsize
,
465 GLsizei
* length
, GLint
* size
, GLenum
* type
, char* name
) {
466 Enter3D
enter(context_id
, true);
467 if (enter
.succeeded()) {
469 &enter
)->GetActiveAttrib(
470 program
, index
, bufsize
, length
, size
, type
, name
);
474 void GetActiveUniform(
475 PP_Resource context_id
, GLuint program
, GLuint index
, GLsizei bufsize
,
476 GLsizei
* length
, GLint
* size
, GLenum
* type
, char* name
) {
477 Enter3D
enter(context_id
, true);
478 if (enter
.succeeded()) {
480 &enter
)->GetActiveUniform(
481 program
, index
, bufsize
, length
, size
, type
, name
);
485 void GetAttachedShaders(
486 PP_Resource context_id
, GLuint program
, GLsizei maxcount
, GLsizei
* count
,
488 Enter3D
enter(context_id
, true);
489 if (enter
.succeeded()) {
490 ToGles2Impl(&enter
)->GetAttachedShaders(program
, maxcount
, count
, shaders
);
494 GLint
GetAttribLocation(
495 PP_Resource context_id
, GLuint program
, const char* name
) {
496 Enter3D
enter(context_id
, true);
497 if (enter
.succeeded()) {
498 return ToGles2Impl(&enter
)->GetAttribLocation(program
, name
);
504 void GetBooleanv(PP_Resource context_id
, GLenum pname
, GLboolean
* params
) {
505 Enter3D
enter(context_id
, true);
506 if (enter
.succeeded()) {
507 ToGles2Impl(&enter
)->GetBooleanv(pname
, params
);
511 void GetBufferParameteriv(
512 PP_Resource context_id
, GLenum target
, GLenum pname
, GLint
* params
) {
513 Enter3D
enter(context_id
, true);
514 if (enter
.succeeded()) {
515 ToGles2Impl(&enter
)->GetBufferParameteriv(target
, pname
, params
);
519 GLenum
GetError(PP_Resource context_id
) {
520 Enter3D
enter(context_id
, true);
521 if (enter
.succeeded()) {
522 return ToGles2Impl(&enter
)->GetError();
528 void GetFloatv(PP_Resource context_id
, GLenum pname
, GLfloat
* params
) {
529 Enter3D
enter(context_id
, true);
530 if (enter
.succeeded()) {
531 ToGles2Impl(&enter
)->GetFloatv(pname
, params
);
535 void GetFramebufferAttachmentParameteriv(
536 PP_Resource context_id
, GLenum target
, GLenum attachment
, GLenum pname
,
538 Enter3D
enter(context_id
, true);
539 if (enter
.succeeded()) {
541 &enter
)->GetFramebufferAttachmentParameteriv(
542 target
, attachment
, pname
, params
);
546 void GetIntegerv(PP_Resource context_id
, GLenum pname
, GLint
* params
) {
547 Enter3D
enter(context_id
, true);
548 if (enter
.succeeded()) {
549 ToGles2Impl(&enter
)->GetIntegerv(pname
, params
);
554 PP_Resource context_id
, GLuint program
, GLenum pname
, GLint
* params
) {
555 Enter3D
enter(context_id
, true);
556 if (enter
.succeeded()) {
557 ToGles2Impl(&enter
)->GetProgramiv(program
, pname
, params
);
561 void GetProgramInfoLog(
562 PP_Resource context_id
, GLuint program
, GLsizei bufsize
, GLsizei
* length
,
564 Enter3D
enter(context_id
, true);
565 if (enter
.succeeded()) {
566 ToGles2Impl(&enter
)->GetProgramInfoLog(program
, bufsize
, length
, infolog
);
570 void GetRenderbufferParameteriv(
571 PP_Resource context_id
, GLenum target
, GLenum pname
, GLint
* params
) {
572 Enter3D
enter(context_id
, true);
573 if (enter
.succeeded()) {
574 ToGles2Impl(&enter
)->GetRenderbufferParameteriv(target
, pname
, params
);
579 PP_Resource context_id
, GLuint shader
, GLenum pname
, GLint
* params
) {
580 Enter3D
enter(context_id
, true);
581 if (enter
.succeeded()) {
582 ToGles2Impl(&enter
)->GetShaderiv(shader
, pname
, params
);
586 void GetShaderInfoLog(
587 PP_Resource context_id
, GLuint shader
, GLsizei bufsize
, GLsizei
* length
,
589 Enter3D
enter(context_id
, true);
590 if (enter
.succeeded()) {
591 ToGles2Impl(&enter
)->GetShaderInfoLog(shader
, bufsize
, length
, infolog
);
595 void GetShaderPrecisionFormat(
596 PP_Resource context_id
, GLenum shadertype
, GLenum precisiontype
,
597 GLint
* range
, GLint
* precision
) {
598 Enter3D
enter(context_id
, true);
599 if (enter
.succeeded()) {
601 &enter
)->GetShaderPrecisionFormat(
602 shadertype
, precisiontype
, range
, precision
);
606 void GetShaderSource(
607 PP_Resource context_id
, GLuint shader
, GLsizei bufsize
, GLsizei
* length
,
609 Enter3D
enter(context_id
, true);
610 if (enter
.succeeded()) {
611 ToGles2Impl(&enter
)->GetShaderSource(shader
, bufsize
, length
, source
);
615 const GLubyte
* GetString(PP_Resource context_id
, GLenum name
) {
616 Enter3D
enter(context_id
, true);
617 if (enter
.succeeded()) {
618 return ToGles2Impl(&enter
)->GetString(name
);
624 void GetTexParameterfv(
625 PP_Resource context_id
, GLenum target
, GLenum pname
, GLfloat
* params
) {
626 Enter3D
enter(context_id
, true);
627 if (enter
.succeeded()) {
628 ToGles2Impl(&enter
)->GetTexParameterfv(target
, pname
, params
);
632 void GetTexParameteriv(
633 PP_Resource context_id
, GLenum target
, GLenum pname
, GLint
* params
) {
634 Enter3D
enter(context_id
, true);
635 if (enter
.succeeded()) {
636 ToGles2Impl(&enter
)->GetTexParameteriv(target
, pname
, params
);
641 PP_Resource context_id
, GLuint program
, GLint location
, GLfloat
* params
) {
642 Enter3D
enter(context_id
, true);
643 if (enter
.succeeded()) {
644 ToGles2Impl(&enter
)->GetUniformfv(program
, location
, params
);
649 PP_Resource context_id
, GLuint program
, GLint location
, GLint
* params
) {
650 Enter3D
enter(context_id
, true);
651 if (enter
.succeeded()) {
652 ToGles2Impl(&enter
)->GetUniformiv(program
, location
, params
);
656 GLint
GetUniformLocation(
657 PP_Resource context_id
, GLuint program
, const char* name
) {
658 Enter3D
enter(context_id
, true);
659 if (enter
.succeeded()) {
660 return ToGles2Impl(&enter
)->GetUniformLocation(program
, name
);
666 void GetVertexAttribfv(
667 PP_Resource context_id
, GLuint index
, GLenum pname
, GLfloat
* params
) {
668 Enter3D
enter(context_id
, true);
669 if (enter
.succeeded()) {
670 ToGles2Impl(&enter
)->GetVertexAttribfv(index
, pname
, params
);
674 void GetVertexAttribiv(
675 PP_Resource context_id
, GLuint index
, GLenum pname
, GLint
* params
) {
676 Enter3D
enter(context_id
, true);
677 if (enter
.succeeded()) {
678 ToGles2Impl(&enter
)->GetVertexAttribiv(index
, pname
, params
);
682 void GetVertexAttribPointerv(
683 PP_Resource context_id
, GLuint index
, GLenum pname
, void** pointer
) {
684 Enter3D
enter(context_id
, true);
685 if (enter
.succeeded()) {
686 ToGles2Impl(&enter
)->GetVertexAttribPointerv(index
, pname
, pointer
);
690 void Hint(PP_Resource context_id
, GLenum target
, GLenum mode
) {
691 Enter3D
enter(context_id
, true);
692 if (enter
.succeeded()) {
693 ToGles2Impl(&enter
)->Hint(target
, mode
);
697 GLboolean
IsBuffer(PP_Resource context_id
, GLuint buffer
) {
698 Enter3D
enter(context_id
, true);
699 if (enter
.succeeded()) {
700 return ToGles2Impl(&enter
)->IsBuffer(buffer
);
706 GLboolean
IsEnabled(PP_Resource context_id
, GLenum cap
) {
707 Enter3D
enter(context_id
, true);
708 if (enter
.succeeded()) {
709 return ToGles2Impl(&enter
)->IsEnabled(cap
);
715 GLboolean
IsFramebuffer(PP_Resource context_id
, GLuint framebuffer
) {
716 Enter3D
enter(context_id
, true);
717 if (enter
.succeeded()) {
718 return ToGles2Impl(&enter
)->IsFramebuffer(framebuffer
);
724 GLboolean
IsProgram(PP_Resource context_id
, GLuint program
) {
725 Enter3D
enter(context_id
, true);
726 if (enter
.succeeded()) {
727 return ToGles2Impl(&enter
)->IsProgram(program
);
733 GLboolean
IsRenderbuffer(PP_Resource context_id
, GLuint renderbuffer
) {
734 Enter3D
enter(context_id
, true);
735 if (enter
.succeeded()) {
736 return ToGles2Impl(&enter
)->IsRenderbuffer(renderbuffer
);
742 GLboolean
IsShader(PP_Resource context_id
, GLuint shader
) {
743 Enter3D
enter(context_id
, true);
744 if (enter
.succeeded()) {
745 return ToGles2Impl(&enter
)->IsShader(shader
);
751 GLboolean
IsTexture(PP_Resource context_id
, GLuint texture
) {
752 Enter3D
enter(context_id
, true);
753 if (enter
.succeeded()) {
754 return ToGles2Impl(&enter
)->IsTexture(texture
);
760 void LineWidth(PP_Resource context_id
, GLfloat width
) {
761 Enter3D
enter(context_id
, true);
762 if (enter
.succeeded()) {
763 ToGles2Impl(&enter
)->LineWidth(width
);
767 void LinkProgram(PP_Resource context_id
, GLuint program
) {
768 Enter3D
enter(context_id
, true);
769 if (enter
.succeeded()) {
770 ToGles2Impl(&enter
)->LinkProgram(program
);
774 void PixelStorei(PP_Resource context_id
, GLenum pname
, GLint param
) {
775 Enter3D
enter(context_id
, true);
776 if (enter
.succeeded()) {
777 ToGles2Impl(&enter
)->PixelStorei(pname
, param
);
781 void PolygonOffset(PP_Resource context_id
, GLfloat factor
, GLfloat units
) {
782 Enter3D
enter(context_id
, true);
783 if (enter
.succeeded()) {
784 ToGles2Impl(&enter
)->PolygonOffset(factor
, units
);
789 PP_Resource context_id
, GLint x
, GLint y
, GLsizei width
, GLsizei height
,
790 GLenum format
, GLenum type
, void* pixels
) {
791 Enter3D
enter(context_id
, true);
792 if (enter
.succeeded()) {
793 ToGles2Impl(&enter
)->ReadPixels(x
, y
, width
, height
, format
, type
, pixels
);
797 void ReleaseShaderCompiler(PP_Resource context_id
) {
798 Enter3D
enter(context_id
, true);
799 if (enter
.succeeded()) {
800 ToGles2Impl(&enter
)->ReleaseShaderCompiler();
804 void RenderbufferStorage(
805 PP_Resource context_id
, GLenum target
, GLenum internalformat
, GLsizei width
,
807 Enter3D
enter(context_id
, true);
808 if (enter
.succeeded()) {
810 &enter
)->RenderbufferStorage(target
, internalformat
, width
, height
);
814 void SampleCoverage(PP_Resource context_id
, GLclampf value
, GLboolean invert
) {
815 Enter3D
enter(context_id
, true);
816 if (enter
.succeeded()) {
817 ToGles2Impl(&enter
)->SampleCoverage(value
, invert
);
822 PP_Resource context_id
, GLint x
, GLint y
, GLsizei width
, GLsizei height
) {
823 Enter3D
enter(context_id
, true);
824 if (enter
.succeeded()) {
825 ToGles2Impl(&enter
)->Scissor(x
, y
, width
, height
);
830 PP_Resource context_id
, GLsizei n
, const GLuint
* shaders
,
831 GLenum binaryformat
, const void* binary
, GLsizei length
) {
832 Enter3D
enter(context_id
, true);
833 if (enter
.succeeded()) {
835 &enter
)->ShaderBinary(n
, shaders
, binaryformat
, binary
, length
);
840 PP_Resource context_id
, GLuint shader
, GLsizei count
, const char** str
,
841 const GLint
* length
) {
842 Enter3D
enter(context_id
, true);
843 if (enter
.succeeded()) {
844 ToGles2Impl(&enter
)->ShaderSource(shader
, count
, str
, length
);
848 void StencilFunc(PP_Resource context_id
, GLenum func
, GLint ref
, GLuint mask
) {
849 Enter3D
enter(context_id
, true);
850 if (enter
.succeeded()) {
851 ToGles2Impl(&enter
)->StencilFunc(func
, ref
, mask
);
855 void StencilFuncSeparate(
856 PP_Resource context_id
, GLenum face
, GLenum func
, GLint ref
, GLuint mask
) {
857 Enter3D
enter(context_id
, true);
858 if (enter
.succeeded()) {
859 ToGles2Impl(&enter
)->StencilFuncSeparate(face
, func
, ref
, mask
);
863 void StencilMask(PP_Resource context_id
, GLuint mask
) {
864 Enter3D
enter(context_id
, true);
865 if (enter
.succeeded()) {
866 ToGles2Impl(&enter
)->StencilMask(mask
);
870 void StencilMaskSeparate(PP_Resource context_id
, GLenum face
, GLuint mask
) {
871 Enter3D
enter(context_id
, true);
872 if (enter
.succeeded()) {
873 ToGles2Impl(&enter
)->StencilMaskSeparate(face
, mask
);
878 PP_Resource context_id
, GLenum fail
, GLenum zfail
, GLenum zpass
) {
879 Enter3D
enter(context_id
, true);
880 if (enter
.succeeded()) {
881 ToGles2Impl(&enter
)->StencilOp(fail
, zfail
, zpass
);
885 void StencilOpSeparate(
886 PP_Resource context_id
, GLenum face
, GLenum fail
, GLenum zfail
,
888 Enter3D
enter(context_id
, true);
889 if (enter
.succeeded()) {
890 ToGles2Impl(&enter
)->StencilOpSeparate(face
, fail
, zfail
, zpass
);
895 PP_Resource context_id
, GLenum target
, GLint level
, GLint internalformat
,
896 GLsizei width
, GLsizei height
, GLint border
, GLenum format
, GLenum type
,
897 const void* pixels
) {
898 Enter3D
enter(context_id
, true);
899 if (enter
.succeeded()) {
902 target
, level
, internalformat
, width
, height
, border
, format
, type
,
908 PP_Resource context_id
, GLenum target
, GLenum pname
, GLfloat param
) {
909 Enter3D
enter(context_id
, true);
910 if (enter
.succeeded()) {
911 ToGles2Impl(&enter
)->TexParameterf(target
, pname
, param
);
916 PP_Resource context_id
, GLenum target
, GLenum pname
,
917 const GLfloat
* params
) {
918 Enter3D
enter(context_id
, true);
919 if (enter
.succeeded()) {
920 ToGles2Impl(&enter
)->TexParameterfv(target
, pname
, params
);
925 PP_Resource context_id
, GLenum target
, GLenum pname
, GLint param
) {
926 Enter3D
enter(context_id
, true);
927 if (enter
.succeeded()) {
928 ToGles2Impl(&enter
)->TexParameteri(target
, pname
, param
);
933 PP_Resource context_id
, GLenum target
, GLenum pname
, const GLint
* params
) {
934 Enter3D
enter(context_id
, true);
935 if (enter
.succeeded()) {
936 ToGles2Impl(&enter
)->TexParameteriv(target
, pname
, params
);
941 PP_Resource context_id
, GLenum target
, GLint level
, GLint xoffset
,
942 GLint yoffset
, GLsizei width
, GLsizei height
, GLenum format
, GLenum type
,
943 const void* pixels
) {
944 Enter3D
enter(context_id
, true);
945 if (enter
.succeeded()) {
947 &enter
)->TexSubImage2D(
948 target
, level
, xoffset
, yoffset
, width
, height
, format
, type
,
953 void Uniform1f(PP_Resource context_id
, GLint location
, GLfloat x
) {
954 Enter3D
enter(context_id
, true);
955 if (enter
.succeeded()) {
956 ToGles2Impl(&enter
)->Uniform1f(location
, x
);
961 PP_Resource context_id
, GLint location
, GLsizei count
, const GLfloat
* v
) {
962 Enter3D
enter(context_id
, true);
963 if (enter
.succeeded()) {
964 ToGles2Impl(&enter
)->Uniform1fv(location
, count
, v
);
968 void Uniform1i(PP_Resource context_id
, GLint location
, GLint x
) {
969 Enter3D
enter(context_id
, true);
970 if (enter
.succeeded()) {
971 ToGles2Impl(&enter
)->Uniform1i(location
, x
);
976 PP_Resource context_id
, GLint location
, GLsizei count
, const GLint
* v
) {
977 Enter3D
enter(context_id
, true);
978 if (enter
.succeeded()) {
979 ToGles2Impl(&enter
)->Uniform1iv(location
, count
, v
);
983 void Uniform2f(PP_Resource context_id
, GLint location
, GLfloat x
, GLfloat y
) {
984 Enter3D
enter(context_id
, true);
985 if (enter
.succeeded()) {
986 ToGles2Impl(&enter
)->Uniform2f(location
, x
, y
);
991 PP_Resource context_id
, GLint location
, GLsizei count
, const GLfloat
* v
) {
992 Enter3D
enter(context_id
, true);
993 if (enter
.succeeded()) {
994 ToGles2Impl(&enter
)->Uniform2fv(location
, count
, v
);
998 void Uniform2i(PP_Resource context_id
, GLint location
, GLint x
, GLint y
) {
999 Enter3D
enter(context_id
, true);
1000 if (enter
.succeeded()) {
1001 ToGles2Impl(&enter
)->Uniform2i(location
, x
, y
);
1006 PP_Resource context_id
, GLint location
, GLsizei count
, const GLint
* v
) {
1007 Enter3D
enter(context_id
, true);
1008 if (enter
.succeeded()) {
1009 ToGles2Impl(&enter
)->Uniform2iv(location
, count
, v
);
1014 PP_Resource context_id
, GLint location
, GLfloat x
, GLfloat y
, GLfloat z
) {
1015 Enter3D
enter(context_id
, true);
1016 if (enter
.succeeded()) {
1017 ToGles2Impl(&enter
)->Uniform3f(location
, x
, y
, z
);
1022 PP_Resource context_id
, GLint location
, GLsizei count
, const GLfloat
* v
) {
1023 Enter3D
enter(context_id
, true);
1024 if (enter
.succeeded()) {
1025 ToGles2Impl(&enter
)->Uniform3fv(location
, count
, v
);
1030 PP_Resource context_id
, GLint location
, GLint x
, GLint y
, GLint z
) {
1031 Enter3D
enter(context_id
, true);
1032 if (enter
.succeeded()) {
1033 ToGles2Impl(&enter
)->Uniform3i(location
, x
, y
, z
);
1038 PP_Resource context_id
, GLint location
, GLsizei count
, const GLint
* v
) {
1039 Enter3D
enter(context_id
, true);
1040 if (enter
.succeeded()) {
1041 ToGles2Impl(&enter
)->Uniform3iv(location
, count
, v
);
1046 PP_Resource context_id
, GLint location
, GLfloat x
, GLfloat y
, GLfloat z
,
1048 Enter3D
enter(context_id
, true);
1049 if (enter
.succeeded()) {
1050 ToGles2Impl(&enter
)->Uniform4f(location
, x
, y
, z
, w
);
1055 PP_Resource context_id
, GLint location
, GLsizei count
, const GLfloat
* v
) {
1056 Enter3D
enter(context_id
, true);
1057 if (enter
.succeeded()) {
1058 ToGles2Impl(&enter
)->Uniform4fv(location
, count
, v
);
1063 PP_Resource context_id
, GLint location
, GLint x
, GLint y
, GLint z
,
1065 Enter3D
enter(context_id
, true);
1066 if (enter
.succeeded()) {
1067 ToGles2Impl(&enter
)->Uniform4i(location
, x
, y
, z
, w
);
1072 PP_Resource context_id
, GLint location
, GLsizei count
, const GLint
* v
) {
1073 Enter3D
enter(context_id
, true);
1074 if (enter
.succeeded()) {
1075 ToGles2Impl(&enter
)->Uniform4iv(location
, count
, v
);
1079 void UniformMatrix2fv(
1080 PP_Resource context_id
, GLint location
, GLsizei count
, GLboolean transpose
,
1081 const GLfloat
* value
) {
1082 Enter3D
enter(context_id
, true);
1083 if (enter
.succeeded()) {
1084 ToGles2Impl(&enter
)->UniformMatrix2fv(location
, count
, transpose
, value
);
1088 void UniformMatrix3fv(
1089 PP_Resource context_id
, GLint location
, GLsizei count
, GLboolean transpose
,
1090 const GLfloat
* value
) {
1091 Enter3D
enter(context_id
, true);
1092 if (enter
.succeeded()) {
1093 ToGles2Impl(&enter
)->UniformMatrix3fv(location
, count
, transpose
, value
);
1097 void UniformMatrix4fv(
1098 PP_Resource context_id
, GLint location
, GLsizei count
, GLboolean transpose
,
1099 const GLfloat
* value
) {
1100 Enter3D
enter(context_id
, true);
1101 if (enter
.succeeded()) {
1102 ToGles2Impl(&enter
)->UniformMatrix4fv(location
, count
, transpose
, value
);
1106 void UseProgram(PP_Resource context_id
, GLuint program
) {
1107 Enter3D
enter(context_id
, true);
1108 if (enter
.succeeded()) {
1109 ToGles2Impl(&enter
)->UseProgram(program
);
1113 void ValidateProgram(PP_Resource context_id
, GLuint program
) {
1114 Enter3D
enter(context_id
, true);
1115 if (enter
.succeeded()) {
1116 ToGles2Impl(&enter
)->ValidateProgram(program
);
1120 void VertexAttrib1f(PP_Resource context_id
, GLuint indx
, GLfloat x
) {
1121 Enter3D
enter(context_id
, true);
1122 if (enter
.succeeded()) {
1123 ToGles2Impl(&enter
)->VertexAttrib1f(indx
, x
);
1127 void VertexAttrib1fv(
1128 PP_Resource context_id
, GLuint indx
, const GLfloat
* values
) {
1129 Enter3D
enter(context_id
, true);
1130 if (enter
.succeeded()) {
1131 ToGles2Impl(&enter
)->VertexAttrib1fv(indx
, values
);
1135 void VertexAttrib2f(
1136 PP_Resource context_id
, GLuint indx
, GLfloat x
, GLfloat y
) {
1137 Enter3D
enter(context_id
, true);
1138 if (enter
.succeeded()) {
1139 ToGles2Impl(&enter
)->VertexAttrib2f(indx
, x
, y
);
1143 void VertexAttrib2fv(
1144 PP_Resource context_id
, GLuint indx
, const GLfloat
* values
) {
1145 Enter3D
enter(context_id
, true);
1146 if (enter
.succeeded()) {
1147 ToGles2Impl(&enter
)->VertexAttrib2fv(indx
, values
);
1151 void VertexAttrib3f(
1152 PP_Resource context_id
, GLuint indx
, GLfloat x
, GLfloat y
, GLfloat z
) {
1153 Enter3D
enter(context_id
, true);
1154 if (enter
.succeeded()) {
1155 ToGles2Impl(&enter
)->VertexAttrib3f(indx
, x
, y
, z
);
1159 void VertexAttrib3fv(
1160 PP_Resource context_id
, GLuint indx
, const GLfloat
* values
) {
1161 Enter3D
enter(context_id
, true);
1162 if (enter
.succeeded()) {
1163 ToGles2Impl(&enter
)->VertexAttrib3fv(indx
, values
);
1167 void VertexAttrib4f(
1168 PP_Resource context_id
, GLuint indx
, GLfloat x
, GLfloat y
, GLfloat z
,
1170 Enter3D
enter(context_id
, true);
1171 if (enter
.succeeded()) {
1172 ToGles2Impl(&enter
)->VertexAttrib4f(indx
, x
, y
, z
, w
);
1176 void VertexAttrib4fv(
1177 PP_Resource context_id
, GLuint indx
, const GLfloat
* values
) {
1178 Enter3D
enter(context_id
, true);
1179 if (enter
.succeeded()) {
1180 ToGles2Impl(&enter
)->VertexAttrib4fv(indx
, values
);
1184 void VertexAttribPointer(
1185 PP_Resource context_id
, GLuint indx
, GLint size
, GLenum type
,
1186 GLboolean normalized
, GLsizei stride
, const void* ptr
) {
1187 Enter3D
enter(context_id
, true);
1188 if (enter
.succeeded()) {
1190 &enter
)->VertexAttribPointer(
1191 indx
, size
, type
, normalized
, stride
, ptr
);
1196 PP_Resource context_id
, GLint x
, GLint y
, GLsizei width
, GLsizei height
) {
1197 Enter3D
enter(context_id
, true);
1198 if (enter
.succeeded()) {
1199 ToGles2Impl(&enter
)->Viewport(x
, y
, width
, height
);
1203 void BlitFramebufferEXT(
1204 PP_Resource context_id
, GLint srcX0
, GLint srcY0
, GLint srcX1
, GLint srcY1
,
1205 GLint dstX0
, GLint dstY0
, GLint dstX1
, GLint dstY1
, GLbitfield mask
,
1207 Enter3D
enter(context_id
, true);
1208 if (enter
.succeeded()) {
1210 &enter
)->BlitFramebufferEXT(
1211 srcX0
, srcY0
, srcX1
, srcY1
, dstX0
, dstY0
, dstX1
, dstY1
, mask
,
1216 void RenderbufferStorageMultisampleEXT(
1217 PP_Resource context_id
, GLenum target
, GLsizei samples
,
1218 GLenum internalformat
, GLsizei width
, GLsizei height
) {
1219 Enter3D
enter(context_id
, true);
1220 if (enter
.succeeded()) {
1222 &enter
)->RenderbufferStorageMultisampleEXT(
1223 target
, samples
, internalformat
, width
, height
);
1227 void GenQueriesEXT(PP_Resource context_id
, GLsizei n
, GLuint
* queries
) {
1228 Enter3D
enter(context_id
, true);
1229 if (enter
.succeeded()) {
1230 ToGles2Impl(&enter
)->GenQueriesEXT(n
, queries
);
1234 void DeleteQueriesEXT(
1235 PP_Resource context_id
, GLsizei n
, const GLuint
* queries
) {
1236 Enter3D
enter(context_id
, true);
1237 if (enter
.succeeded()) {
1238 ToGles2Impl(&enter
)->DeleteQueriesEXT(n
, queries
);
1242 GLboolean
IsQueryEXT(PP_Resource context_id
, GLuint id
) {
1243 Enter3D
enter(context_id
, true);
1244 if (enter
.succeeded()) {
1245 return ToGles2Impl(&enter
)->IsQueryEXT(id
);
1251 void BeginQueryEXT(PP_Resource context_id
, GLenum target
, GLuint id
) {
1252 Enter3D
enter(context_id
, true);
1253 if (enter
.succeeded()) {
1254 ToGles2Impl(&enter
)->BeginQueryEXT(target
, id
);
1258 void EndQueryEXT(PP_Resource context_id
, GLenum target
) {
1259 Enter3D
enter(context_id
, true);
1260 if (enter
.succeeded()) {
1261 ToGles2Impl(&enter
)->EndQueryEXT(target
);
1266 PP_Resource context_id
, GLenum target
, GLenum pname
, GLint
* params
) {
1267 Enter3D
enter(context_id
, true);
1268 if (enter
.succeeded()) {
1269 ToGles2Impl(&enter
)->GetQueryivEXT(target
, pname
, params
);
1273 void GetQueryObjectuivEXT(
1274 PP_Resource context_id
, GLuint id
, GLenum pname
, GLuint
* params
) {
1275 Enter3D
enter(context_id
, true);
1276 if (enter
.succeeded()) {
1277 ToGles2Impl(&enter
)->GetQueryObjectuivEXT(id
, pname
, params
);
1281 GLboolean
EnableFeatureCHROMIUM(PP_Resource context_id
, const char* feature
) {
1282 Enter3D
enter(context_id
, true);
1283 if (enter
.succeeded()) {
1284 return ToGles2Impl(&enter
)->EnableFeatureCHROMIUM(feature
);
1290 void* MapBufferSubDataCHROMIUM(
1291 PP_Resource context_id
, GLuint target
, GLintptr offset
, GLsizeiptr size
,
1293 Enter3D
enter(context_id
, true);
1294 if (enter
.succeeded()) {
1296 &enter
)->MapBufferSubDataCHROMIUM(target
, offset
, size
, access
);
1302 void UnmapBufferSubDataCHROMIUM(PP_Resource context_id
, const void* mem
) {
1303 Enter3D
enter(context_id
, true);
1304 if (enter
.succeeded()) {
1305 ToGles2Impl(&enter
)->UnmapBufferSubDataCHROMIUM(mem
);
1309 void* MapTexSubImage2DCHROMIUM(
1310 PP_Resource context_id
, GLenum target
, GLint level
, GLint xoffset
,
1311 GLint yoffset
, GLsizei width
, GLsizei height
, GLenum format
, GLenum type
,
1313 Enter3D
enter(context_id
, true);
1314 if (enter
.succeeded()) {
1316 &enter
)->MapTexSubImage2DCHROMIUM(
1317 target
, level
, xoffset
, yoffset
, width
, height
, format
, type
,
1324 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id
, const void* mem
) {
1325 Enter3D
enter(context_id
, true);
1326 if (enter
.succeeded()) {
1327 ToGles2Impl(&enter
)->UnmapTexSubImage2DCHROMIUM(mem
);
1331 void DrawArraysInstancedANGLE(
1332 PP_Resource context_id
, GLenum mode
, GLint first
, GLsizei count
,
1333 GLsizei primcount
) {
1334 Enter3D
enter(context_id
, true);
1335 if (enter
.succeeded()) {
1337 &enter
)->DrawArraysInstancedANGLE(mode
, first
, count
, primcount
);
1341 void DrawElementsInstancedANGLE(
1342 PP_Resource context_id
, GLenum mode
, GLsizei count
, GLenum type
,
1343 const void* indices
, GLsizei primcount
) {
1344 Enter3D
enter(context_id
, true);
1345 if (enter
.succeeded()) {
1347 &enter
)->DrawElementsInstancedANGLE(
1348 mode
, count
, type
, indices
, primcount
);
1352 void VertexAttribDivisorANGLE(
1353 PP_Resource context_id
, GLuint index
, GLuint divisor
) {
1354 Enter3D
enter(context_id
, true);
1355 if (enter
.succeeded()) {
1356 ToGles2Impl(&enter
)->VertexAttribDivisorANGLE(index
, divisor
);
1361 const PPB_OpenGLES2
* PPB_OpenGLES2_Shared::GetInterface() {
1362 static const struct PPB_OpenGLES2 ppb_opengles2
= {
1365 &BindAttribLocation
,
1372 &BlendEquationSeparate
,
1377 &CheckFramebufferStatus
,
1384 &CompressedTexImage2D
,
1385 &CompressedTexSubImage2D
,
1392 &DeleteFramebuffers
,
1394 &DeleteRenderbuffers
,
1402 &DisableVertexAttribArray
,
1406 &EnableVertexAttribArray
,
1409 &FramebufferRenderbuffer
,
1410 &FramebufferTexture2D
,
1419 &GetAttachedShaders
,
1422 &GetBufferParameteriv
,
1425 &GetFramebufferAttachmentParameteriv
,
1429 &GetRenderbufferParameteriv
,
1432 &GetShaderPrecisionFormat
,
1439 &GetUniformLocation
,
1442 &GetVertexAttribPointerv
,
1456 &ReleaseShaderCompiler
,
1457 &RenderbufferStorage
,
1463 &StencilFuncSeparate
,
1465 &StencilMaskSeparate
,
1503 &VertexAttribPointer
,
1506 return &ppb_opengles2
;
1508 const PPB_OpenGLES2InstancedArrays
* PPB_OpenGLES2_Shared::GetInstancedArraysInterface() { // NOLINT
1509 static const struct PPB_OpenGLES2InstancedArrays ppb_opengles2
= {
1510 &DrawArraysInstancedANGLE
,
1511 &DrawElementsInstancedANGLE
,
1512 &VertexAttribDivisorANGLE
1514 return &ppb_opengles2
;
1516 const PPB_OpenGLES2FramebufferBlit
* PPB_OpenGLES2_Shared::GetFramebufferBlitInterface() { // NOLINT
1517 static const struct PPB_OpenGLES2FramebufferBlit ppb_opengles2
= {
1520 return &ppb_opengles2
;
1522 const PPB_OpenGLES2FramebufferMultisample
* PPB_OpenGLES2_Shared::GetFramebufferMultisampleInterface() { // NOLINT
1523 static const struct PPB_OpenGLES2FramebufferMultisample ppb_opengles2
= {
1524 &RenderbufferStorageMultisampleEXT
1526 return &ppb_opengles2
;
1528 const PPB_OpenGLES2ChromiumEnableFeature
* PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface() { // NOLINT
1529 static const struct PPB_OpenGLES2ChromiumEnableFeature ppb_opengles2
= {
1530 &EnableFeatureCHROMIUM
1532 return &ppb_opengles2
;
1534 const PPB_OpenGLES2ChromiumMapSub
* PPB_OpenGLES2_Shared::GetChromiumMapSubInterface() { // NOLINT
1535 static const struct PPB_OpenGLES2ChromiumMapSub ppb_opengles2
= {
1536 &MapBufferSubDataCHROMIUM
,
1537 &UnmapBufferSubDataCHROMIUM
,
1538 &MapTexSubImage2DCHROMIUM
,
1539 &UnmapTexSubImage2DCHROMIUM
1541 return &ppb_opengles2
;
1543 const PPB_OpenGLES2Query
* PPB_OpenGLES2_Shared::GetQueryInterface() {
1544 static const struct PPB_OpenGLES2Query ppb_opengles2
= {
1551 &GetQueryObjectuivEXT
1553 return &ppb_opengles2
;
1555 } // namespace ppapi