1 // Copyright 2014 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
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
11 #include "mojo/gpu/mojo_gles2_impl_autogen.h"
13 #include "base/logging.h"
14 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_copy_texture.h"
15 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_image.h"
16 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_miscellaneous.h"
17 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_pixel_transfer_buffer_object.h"
18 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_sub_image.h"
19 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_sync_point.h"
20 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_texture_mailbox.h"
21 #include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
22 #include "third_party/mojo/src/mojo/public/c/gles2/occlusion_query_ext.h"
26 void MojoGLES2Impl::ActiveTexture(GLenum texture
) {
27 MojoGLES2MakeCurrent(context_
);
28 glActiveTexture(texture
);
30 void MojoGLES2Impl::AttachShader(GLuint program
, GLuint shader
) {
31 MojoGLES2MakeCurrent(context_
);
32 glAttachShader(program
, shader
);
34 void MojoGLES2Impl::BindAttribLocation(GLuint program
,
37 MojoGLES2MakeCurrent(context_
);
38 glBindAttribLocation(program
, index
, name
);
40 void MojoGLES2Impl::BindBuffer(GLenum target
, GLuint buffer
) {
41 MojoGLES2MakeCurrent(context_
);
42 glBindBuffer(target
, buffer
);
44 void MojoGLES2Impl::BindBufferBase(GLenum target
, GLuint index
, GLuint buffer
) {
45 NOTREACHED() << "Unimplemented BindBufferBase.";
47 void MojoGLES2Impl::BindBufferRange(GLenum target
,
52 NOTREACHED() << "Unimplemented BindBufferRange.";
54 void MojoGLES2Impl::BindFramebuffer(GLenum target
, GLuint framebuffer
) {
55 MojoGLES2MakeCurrent(context_
);
56 glBindFramebuffer(target
, framebuffer
);
58 void MojoGLES2Impl::BindRenderbuffer(GLenum target
, GLuint renderbuffer
) {
59 MojoGLES2MakeCurrent(context_
);
60 glBindRenderbuffer(target
, renderbuffer
);
62 void MojoGLES2Impl::BindSampler(GLuint unit
, GLuint sampler
) {
63 NOTREACHED() << "Unimplemented BindSampler.";
65 void MojoGLES2Impl::BindTexture(GLenum target
, GLuint texture
) {
66 MojoGLES2MakeCurrent(context_
);
67 glBindTexture(target
, texture
);
69 void MojoGLES2Impl::BindTransformFeedback(GLenum target
,
70 GLuint transformfeedback
) {
71 NOTREACHED() << "Unimplemented BindTransformFeedback.";
73 void MojoGLES2Impl::BlendColor(GLclampf red
,
77 MojoGLES2MakeCurrent(context_
);
78 glBlendColor(red
, green
, blue
, alpha
);
80 void MojoGLES2Impl::BlendEquation(GLenum mode
) {
81 MojoGLES2MakeCurrent(context_
);
82 glBlendEquation(mode
);
84 void MojoGLES2Impl::BlendEquationSeparate(GLenum modeRGB
, GLenum modeAlpha
) {
85 MojoGLES2MakeCurrent(context_
);
86 glBlendEquationSeparate(modeRGB
, modeAlpha
);
88 void MojoGLES2Impl::BlendFunc(GLenum sfactor
, GLenum dfactor
) {
89 MojoGLES2MakeCurrent(context_
);
90 glBlendFunc(sfactor
, dfactor
);
92 void MojoGLES2Impl::BlendFuncSeparate(GLenum srcRGB
,
96 MojoGLES2MakeCurrent(context_
);
97 glBlendFuncSeparate(srcRGB
, dstRGB
, srcAlpha
, dstAlpha
);
99 void MojoGLES2Impl::BufferData(GLenum target
,
103 MojoGLES2MakeCurrent(context_
);
104 glBufferData(target
, size
, data
, usage
);
106 void MojoGLES2Impl::BufferSubData(GLenum target
,
110 MojoGLES2MakeCurrent(context_
);
111 glBufferSubData(target
, offset
, size
, data
);
113 GLenum
MojoGLES2Impl::CheckFramebufferStatus(GLenum target
) {
114 MojoGLES2MakeCurrent(context_
);
115 return glCheckFramebufferStatus(target
);
117 void MojoGLES2Impl::Clear(GLbitfield mask
) {
118 MojoGLES2MakeCurrent(context_
);
121 void MojoGLES2Impl::ClearBufferfi(GLenum buffer
,
125 NOTREACHED() << "Unimplemented ClearBufferfi.";
127 void MojoGLES2Impl::ClearBufferfv(GLenum buffer
,
129 const GLfloat
* value
) {
130 NOTREACHED() << "Unimplemented ClearBufferfv.";
132 void MojoGLES2Impl::ClearBufferiv(GLenum buffer
,
134 const GLint
* value
) {
135 NOTREACHED() << "Unimplemented ClearBufferiv.";
137 void MojoGLES2Impl::ClearBufferuiv(GLenum buffer
,
139 const GLuint
* value
) {
140 NOTREACHED() << "Unimplemented ClearBufferuiv.";
142 void MojoGLES2Impl::ClearColor(GLclampf red
,
146 MojoGLES2MakeCurrent(context_
);
147 glClearColor(red
, green
, blue
, alpha
);
149 void MojoGLES2Impl::ClearDepthf(GLclampf depth
) {
150 MojoGLES2MakeCurrent(context_
);
151 glClearDepthf(depth
);
153 void MojoGLES2Impl::ClearStencil(GLint s
) {
154 MojoGLES2MakeCurrent(context_
);
157 GLenum
MojoGLES2Impl::ClientWaitSync(GLsync sync
,
160 NOTREACHED() << "Unimplemented ClientWaitSync.";
163 void MojoGLES2Impl::ColorMask(GLboolean red
,
167 MojoGLES2MakeCurrent(context_
);
168 glColorMask(red
, green
, blue
, alpha
);
170 void MojoGLES2Impl::CompileShader(GLuint shader
) {
171 MojoGLES2MakeCurrent(context_
);
172 glCompileShader(shader
);
174 void MojoGLES2Impl::CompressedTexImage2D(GLenum target
,
176 GLenum internalformat
,
182 MojoGLES2MakeCurrent(context_
);
183 glCompressedTexImage2D(target
, level
, internalformat
, width
, height
, border
,
186 void MojoGLES2Impl::CompressedTexSubImage2D(GLenum target
,
195 MojoGLES2MakeCurrent(context_
);
196 glCompressedTexSubImage2D(target
, level
, xoffset
, yoffset
, width
, height
,
197 format
, imageSize
, data
);
199 void MojoGLES2Impl::CompressedTexImage3D(GLenum target
,
201 GLenum internalformat
,
208 NOTREACHED() << "Unimplemented CompressedTexImage3D.";
210 void MojoGLES2Impl::CompressedTexSubImage3D(GLenum target
,
221 NOTREACHED() << "Unimplemented CompressedTexSubImage3D.";
223 void MojoGLES2Impl::CopyBufferSubData(GLenum readtarget
,
226 GLintptr writeoffset
,
228 NOTREACHED() << "Unimplemented CopyBufferSubData.";
230 void MojoGLES2Impl::CopyTexImage2D(GLenum target
,
232 GLenum internalformat
,
238 MojoGLES2MakeCurrent(context_
);
239 glCopyTexImage2D(target
, level
, internalformat
, x
, y
, width
, height
, border
);
241 void MojoGLES2Impl::CopyTexSubImage2D(GLenum target
,
249 MojoGLES2MakeCurrent(context_
);
250 glCopyTexSubImage2D(target
, level
, xoffset
, yoffset
, x
, y
, width
, height
);
252 void MojoGLES2Impl::CopyTexSubImage3D(GLenum target
,
261 NOTREACHED() << "Unimplemented CopyTexSubImage3D.";
263 GLuint
MojoGLES2Impl::CreateProgram() {
264 MojoGLES2MakeCurrent(context_
);
265 return glCreateProgram();
267 GLuint
MojoGLES2Impl::CreateShader(GLenum type
) {
268 MojoGLES2MakeCurrent(context_
);
269 return glCreateShader(type
);
271 void MojoGLES2Impl::CullFace(GLenum mode
) {
272 MojoGLES2MakeCurrent(context_
);
275 void MojoGLES2Impl::DeleteBuffers(GLsizei n
, const GLuint
* buffers
) {
276 MojoGLES2MakeCurrent(context_
);
277 glDeleteBuffers(n
, buffers
);
279 void MojoGLES2Impl::DeleteFramebuffers(GLsizei n
, const GLuint
* framebuffers
) {
280 MojoGLES2MakeCurrent(context_
);
281 glDeleteFramebuffers(n
, framebuffers
);
283 void MojoGLES2Impl::DeleteProgram(GLuint program
) {
284 MojoGLES2MakeCurrent(context_
);
285 glDeleteProgram(program
);
287 void MojoGLES2Impl::DeleteRenderbuffers(GLsizei n
,
288 const GLuint
* renderbuffers
) {
289 MojoGLES2MakeCurrent(context_
);
290 glDeleteRenderbuffers(n
, renderbuffers
);
292 void MojoGLES2Impl::DeleteSamplers(GLsizei n
, const GLuint
* samplers
) {
293 NOTREACHED() << "Unimplemented DeleteSamplers.";
295 void MojoGLES2Impl::DeleteSync(GLsync sync
) {
296 NOTREACHED() << "Unimplemented DeleteSync.";
298 void MojoGLES2Impl::DeleteShader(GLuint shader
) {
299 MojoGLES2MakeCurrent(context_
);
300 glDeleteShader(shader
);
302 void MojoGLES2Impl::DeleteTextures(GLsizei n
, const GLuint
* textures
) {
303 MojoGLES2MakeCurrent(context_
);
304 glDeleteTextures(n
, textures
);
306 void MojoGLES2Impl::DeleteTransformFeedbacks(GLsizei n
, const GLuint
* ids
) {
307 NOTREACHED() << "Unimplemented DeleteTransformFeedbacks.";
309 void MojoGLES2Impl::DepthFunc(GLenum func
) {
310 MojoGLES2MakeCurrent(context_
);
313 void MojoGLES2Impl::DepthMask(GLboolean flag
) {
314 MojoGLES2MakeCurrent(context_
);
317 void MojoGLES2Impl::DepthRangef(GLclampf zNear
, GLclampf zFar
) {
318 MojoGLES2MakeCurrent(context_
);
319 glDepthRangef(zNear
, zFar
);
321 void MojoGLES2Impl::DetachShader(GLuint program
, GLuint shader
) {
322 MojoGLES2MakeCurrent(context_
);
323 glDetachShader(program
, shader
);
325 void MojoGLES2Impl::Disable(GLenum cap
) {
326 MojoGLES2MakeCurrent(context_
);
329 void MojoGLES2Impl::DisableVertexAttribArray(GLuint index
) {
330 MojoGLES2MakeCurrent(context_
);
331 glDisableVertexAttribArray(index
);
333 void MojoGLES2Impl::DrawArrays(GLenum mode
, GLint first
, GLsizei count
) {
334 MojoGLES2MakeCurrent(context_
);
335 glDrawArrays(mode
, first
, count
);
337 void MojoGLES2Impl::DrawElements(GLenum mode
,
340 const void* indices
) {
341 MojoGLES2MakeCurrent(context_
);
342 glDrawElements(mode
, count
, type
, indices
);
344 void MojoGLES2Impl::DrawRangeElements(GLenum mode
,
349 const void* indices
) {
350 NOTREACHED() << "Unimplemented DrawRangeElements.";
352 void MojoGLES2Impl::Enable(GLenum cap
) {
353 MojoGLES2MakeCurrent(context_
);
356 void MojoGLES2Impl::EnableVertexAttribArray(GLuint index
) {
357 MojoGLES2MakeCurrent(context_
);
358 glEnableVertexAttribArray(index
);
360 GLsync
MojoGLES2Impl::FenceSync(GLenum condition
, GLbitfield flags
) {
361 NOTREACHED() << "Unimplemented FenceSync.";
364 void MojoGLES2Impl::Finish() {
365 MojoGLES2MakeCurrent(context_
);
368 void MojoGLES2Impl::Flush() {
369 MojoGLES2MakeCurrent(context_
);
372 void MojoGLES2Impl::FramebufferRenderbuffer(GLenum target
,
374 GLenum renderbuffertarget
,
375 GLuint renderbuffer
) {
376 MojoGLES2MakeCurrent(context_
);
377 glFramebufferRenderbuffer(target
, attachment
, renderbuffertarget
,
380 void MojoGLES2Impl::FramebufferTexture2D(GLenum target
,
385 MojoGLES2MakeCurrent(context_
);
386 glFramebufferTexture2D(target
, attachment
, textarget
, texture
, level
);
388 void MojoGLES2Impl::FramebufferTextureLayer(GLenum target
,
393 NOTREACHED() << "Unimplemented FramebufferTextureLayer.";
395 void MojoGLES2Impl::FrontFace(GLenum mode
) {
396 MojoGLES2MakeCurrent(context_
);
399 void MojoGLES2Impl::GenBuffers(GLsizei n
, GLuint
* buffers
) {
400 MojoGLES2MakeCurrent(context_
);
401 glGenBuffers(n
, buffers
);
403 void MojoGLES2Impl::GenerateMipmap(GLenum target
) {
404 MojoGLES2MakeCurrent(context_
);
405 glGenerateMipmap(target
);
407 void MojoGLES2Impl::GenFramebuffers(GLsizei n
, GLuint
* framebuffers
) {
408 MojoGLES2MakeCurrent(context_
);
409 glGenFramebuffers(n
, framebuffers
);
411 void MojoGLES2Impl::GenRenderbuffers(GLsizei n
, GLuint
* renderbuffers
) {
412 MojoGLES2MakeCurrent(context_
);
413 glGenRenderbuffers(n
, renderbuffers
);
415 void MojoGLES2Impl::GenSamplers(GLsizei n
, GLuint
* samplers
) {
416 NOTREACHED() << "Unimplemented GenSamplers.";
418 void MojoGLES2Impl::GenTextures(GLsizei n
, GLuint
* textures
) {
419 MojoGLES2MakeCurrent(context_
);
420 glGenTextures(n
, textures
);
422 void MojoGLES2Impl::GenTransformFeedbacks(GLsizei n
, GLuint
* ids
) {
423 NOTREACHED() << "Unimplemented GenTransformFeedbacks.";
425 void MojoGLES2Impl::GetActiveAttrib(GLuint program
,
432 MojoGLES2MakeCurrent(context_
);
433 glGetActiveAttrib(program
, index
, bufsize
, length
, size
, type
, name
);
435 void MojoGLES2Impl::GetActiveUniform(GLuint program
,
442 MojoGLES2MakeCurrent(context_
);
443 glGetActiveUniform(program
, index
, bufsize
, length
, size
, type
, name
);
445 void MojoGLES2Impl::GetActiveUniformBlockiv(GLuint program
,
449 NOTREACHED() << "Unimplemented GetActiveUniformBlockiv.";
451 void MojoGLES2Impl::GetActiveUniformBlockName(GLuint program
,
456 NOTREACHED() << "Unimplemented GetActiveUniformBlockName.";
458 void MojoGLES2Impl::GetActiveUniformsiv(GLuint program
,
460 const GLuint
* indices
,
463 NOTREACHED() << "Unimplemented GetActiveUniformsiv.";
465 void MojoGLES2Impl::GetAttachedShaders(GLuint program
,
469 MojoGLES2MakeCurrent(context_
);
470 glGetAttachedShaders(program
, maxcount
, count
, shaders
);
472 GLint
MojoGLES2Impl::GetAttribLocation(GLuint program
, const char* name
) {
473 MojoGLES2MakeCurrent(context_
);
474 return glGetAttribLocation(program
, name
);
476 void MojoGLES2Impl::GetBooleanv(GLenum pname
, GLboolean
* params
) {
477 MojoGLES2MakeCurrent(context_
);
478 glGetBooleanv(pname
, params
);
480 void MojoGLES2Impl::GetBufferParameteri64v(GLenum target
,
483 NOTREACHED() << "Unimplemented GetBufferParameteri64v.";
485 void MojoGLES2Impl::GetBufferParameteriv(GLenum target
,
488 MojoGLES2MakeCurrent(context_
);
489 glGetBufferParameteriv(target
, pname
, params
);
491 GLenum
MojoGLES2Impl::GetError() {
492 MojoGLES2MakeCurrent(context_
);
495 void MojoGLES2Impl::GetFloatv(GLenum pname
, GLfloat
* params
) {
496 MojoGLES2MakeCurrent(context_
);
497 glGetFloatv(pname
, params
);
499 GLint
MojoGLES2Impl::GetFragDataLocation(GLuint program
, const char* name
) {
500 NOTREACHED() << "Unimplemented GetFragDataLocation.";
503 void MojoGLES2Impl::GetFramebufferAttachmentParameteriv(GLenum target
,
507 MojoGLES2MakeCurrent(context_
);
508 glGetFramebufferAttachmentParameteriv(target
, attachment
, pname
, params
);
510 void MojoGLES2Impl::GetInteger64v(GLenum pname
, GLint64
* params
) {
511 NOTREACHED() << "Unimplemented GetInteger64v.";
513 void MojoGLES2Impl::GetIntegeri_v(GLenum pname
, GLuint index
, GLint
* data
) {
514 NOTREACHED() << "Unimplemented GetIntegeri_v.";
516 void MojoGLES2Impl::GetInteger64i_v(GLenum pname
, GLuint index
, GLint64
* data
) {
517 NOTREACHED() << "Unimplemented GetInteger64i_v.";
519 void MojoGLES2Impl::GetIntegerv(GLenum pname
, GLint
* params
) {
520 MojoGLES2MakeCurrent(context_
);
521 glGetIntegerv(pname
, params
);
523 void MojoGLES2Impl::GetInternalformativ(GLenum target
,
528 NOTREACHED() << "Unimplemented GetInternalformativ.";
530 void MojoGLES2Impl::GetProgramiv(GLuint program
, GLenum pname
, GLint
* params
) {
531 MojoGLES2MakeCurrent(context_
);
532 glGetProgramiv(program
, pname
, params
);
534 void MojoGLES2Impl::GetProgramInfoLog(GLuint program
,
538 MojoGLES2MakeCurrent(context_
);
539 glGetProgramInfoLog(program
, bufsize
, length
, infolog
);
541 void MojoGLES2Impl::GetRenderbufferParameteriv(GLenum target
,
544 MojoGLES2MakeCurrent(context_
);
545 glGetRenderbufferParameteriv(target
, pname
, params
);
547 void MojoGLES2Impl::GetSamplerParameterfv(GLuint sampler
,
550 NOTREACHED() << "Unimplemented GetSamplerParameterfv.";
552 void MojoGLES2Impl::GetSamplerParameteriv(GLuint sampler
,
555 NOTREACHED() << "Unimplemented GetSamplerParameteriv.";
557 void MojoGLES2Impl::GetShaderiv(GLuint shader
, GLenum pname
, GLint
* params
) {
558 MojoGLES2MakeCurrent(context_
);
559 glGetShaderiv(shader
, pname
, params
);
561 void MojoGLES2Impl::GetShaderInfoLog(GLuint shader
,
565 MojoGLES2MakeCurrent(context_
);
566 glGetShaderInfoLog(shader
, bufsize
, length
, infolog
);
568 void MojoGLES2Impl::GetShaderPrecisionFormat(GLenum shadertype
,
569 GLenum precisiontype
,
572 MojoGLES2MakeCurrent(context_
);
573 glGetShaderPrecisionFormat(shadertype
, precisiontype
, range
, precision
);
575 void MojoGLES2Impl::GetShaderSource(GLuint shader
,
579 MojoGLES2MakeCurrent(context_
);
580 glGetShaderSource(shader
, bufsize
, length
, source
);
582 const GLubyte
* MojoGLES2Impl::GetString(GLenum name
) {
583 MojoGLES2MakeCurrent(context_
);
584 return glGetString(name
);
586 void MojoGLES2Impl::GetSynciv(GLsync sync
,
591 NOTREACHED() << "Unimplemented GetSynciv.";
593 void MojoGLES2Impl::GetTexParameterfv(GLenum target
,
596 MojoGLES2MakeCurrent(context_
);
597 glGetTexParameterfv(target
, pname
, params
);
599 void MojoGLES2Impl::GetTexParameteriv(GLenum target
,
602 MojoGLES2MakeCurrent(context_
);
603 glGetTexParameteriv(target
, pname
, params
);
605 void MojoGLES2Impl::GetTransformFeedbackVarying(GLuint program
,
612 NOTREACHED() << "Unimplemented GetTransformFeedbackVarying.";
614 GLuint
MojoGLES2Impl::GetUniformBlockIndex(GLuint program
, const char* name
) {
615 NOTREACHED() << "Unimplemented GetUniformBlockIndex.";
618 void MojoGLES2Impl::GetUniformfv(GLuint program
,
621 MojoGLES2MakeCurrent(context_
);
622 glGetUniformfv(program
, location
, params
);
624 void MojoGLES2Impl::GetUniformiv(GLuint program
,
627 MojoGLES2MakeCurrent(context_
);
628 glGetUniformiv(program
, location
, params
);
630 void MojoGLES2Impl::GetUniformuiv(GLuint program
,
633 NOTREACHED() << "Unimplemented GetUniformuiv.";
635 void MojoGLES2Impl::GetUniformIndices(GLuint program
,
637 const char* const* names
,
639 NOTREACHED() << "Unimplemented GetUniformIndices.";
641 GLint
MojoGLES2Impl::GetUniformLocation(GLuint program
, const char* name
) {
642 MojoGLES2MakeCurrent(context_
);
643 return glGetUniformLocation(program
, name
);
645 void MojoGLES2Impl::GetVertexAttribfv(GLuint index
,
648 MojoGLES2MakeCurrent(context_
);
649 glGetVertexAttribfv(index
, pname
, params
);
651 void MojoGLES2Impl::GetVertexAttribiv(GLuint index
,
654 MojoGLES2MakeCurrent(context_
);
655 glGetVertexAttribiv(index
, pname
, params
);
657 void MojoGLES2Impl::GetVertexAttribIiv(GLuint index
,
660 NOTREACHED() << "Unimplemented GetVertexAttribIiv.";
662 void MojoGLES2Impl::GetVertexAttribIuiv(GLuint index
,
665 NOTREACHED() << "Unimplemented GetVertexAttribIuiv.";
667 void MojoGLES2Impl::GetVertexAttribPointerv(GLuint index
,
670 MojoGLES2MakeCurrent(context_
);
671 glGetVertexAttribPointerv(index
, pname
, pointer
);
673 void MojoGLES2Impl::Hint(GLenum target
, GLenum mode
) {
674 MojoGLES2MakeCurrent(context_
);
675 glHint(target
, mode
);
677 void MojoGLES2Impl::InvalidateFramebuffer(GLenum target
,
679 const GLenum
* attachments
) {
680 NOTREACHED() << "Unimplemented InvalidateFramebuffer.";
682 void MojoGLES2Impl::InvalidateSubFramebuffer(GLenum target
,
684 const GLenum
* attachments
,
689 NOTREACHED() << "Unimplemented InvalidateSubFramebuffer.";
691 GLboolean
MojoGLES2Impl::IsBuffer(GLuint buffer
) {
692 MojoGLES2MakeCurrent(context_
);
693 return glIsBuffer(buffer
);
695 GLboolean
MojoGLES2Impl::IsEnabled(GLenum cap
) {
696 MojoGLES2MakeCurrent(context_
);
697 return glIsEnabled(cap
);
699 GLboolean
MojoGLES2Impl::IsFramebuffer(GLuint framebuffer
) {
700 MojoGLES2MakeCurrent(context_
);
701 return glIsFramebuffer(framebuffer
);
703 GLboolean
MojoGLES2Impl::IsProgram(GLuint program
) {
704 MojoGLES2MakeCurrent(context_
);
705 return glIsProgram(program
);
707 GLboolean
MojoGLES2Impl::IsRenderbuffer(GLuint renderbuffer
) {
708 MojoGLES2MakeCurrent(context_
);
709 return glIsRenderbuffer(renderbuffer
);
711 GLboolean
MojoGLES2Impl::IsSampler(GLuint sampler
) {
712 NOTREACHED() << "Unimplemented IsSampler.";
715 GLboolean
MojoGLES2Impl::IsShader(GLuint shader
) {
716 MojoGLES2MakeCurrent(context_
);
717 return glIsShader(shader
);
719 GLboolean
MojoGLES2Impl::IsSync(GLsync sync
) {
720 NOTREACHED() << "Unimplemented IsSync.";
723 GLboolean
MojoGLES2Impl::IsTexture(GLuint texture
) {
724 MojoGLES2MakeCurrent(context_
);
725 return glIsTexture(texture
);
727 GLboolean
MojoGLES2Impl::IsTransformFeedback(GLuint transformfeedback
) {
728 NOTREACHED() << "Unimplemented IsTransformFeedback.";
731 void MojoGLES2Impl::LineWidth(GLfloat width
) {
732 MojoGLES2MakeCurrent(context_
);
735 void MojoGLES2Impl::LinkProgram(GLuint program
) {
736 MojoGLES2MakeCurrent(context_
);
737 glLinkProgram(program
);
739 void MojoGLES2Impl::PauseTransformFeedback() {
740 NOTREACHED() << "Unimplemented PauseTransformFeedback.";
742 void MojoGLES2Impl::PixelStorei(GLenum pname
, GLint param
) {
743 MojoGLES2MakeCurrent(context_
);
744 glPixelStorei(pname
, param
);
746 void MojoGLES2Impl::PolygonOffset(GLfloat factor
, GLfloat units
) {
747 MojoGLES2MakeCurrent(context_
);
748 glPolygonOffset(factor
, units
);
750 void MojoGLES2Impl::ReadBuffer(GLenum src
) {
751 NOTREACHED() << "Unimplemented ReadBuffer.";
753 void MojoGLES2Impl::ReadPixels(GLint x
,
760 MojoGLES2MakeCurrent(context_
);
761 glReadPixels(x
, y
, width
, height
, format
, type
, pixels
);
763 void MojoGLES2Impl::ReleaseShaderCompiler() {
764 MojoGLES2MakeCurrent(context_
);
765 glReleaseShaderCompiler();
767 void MojoGLES2Impl::RenderbufferStorage(GLenum target
,
768 GLenum internalformat
,
771 MojoGLES2MakeCurrent(context_
);
772 glRenderbufferStorage(target
, internalformat
, width
, height
);
774 void MojoGLES2Impl::ResumeTransformFeedback() {
775 NOTREACHED() << "Unimplemented ResumeTransformFeedback.";
777 void MojoGLES2Impl::SampleCoverage(GLclampf value
, GLboolean invert
) {
778 MojoGLES2MakeCurrent(context_
);
779 glSampleCoverage(value
, invert
);
781 void MojoGLES2Impl::SamplerParameterf(GLuint sampler
,
784 NOTREACHED() << "Unimplemented SamplerParameterf.";
786 void MojoGLES2Impl::SamplerParameterfv(GLuint sampler
,
788 const GLfloat
* params
) {
789 NOTREACHED() << "Unimplemented SamplerParameterfv.";
791 void MojoGLES2Impl::SamplerParameteri(GLuint sampler
,
794 NOTREACHED() << "Unimplemented SamplerParameteri.";
796 void MojoGLES2Impl::SamplerParameteriv(GLuint sampler
,
798 const GLint
* params
) {
799 NOTREACHED() << "Unimplemented SamplerParameteriv.";
801 void MojoGLES2Impl::Scissor(GLint x
, GLint y
, GLsizei width
, GLsizei height
) {
802 MojoGLES2MakeCurrent(context_
);
803 glScissor(x
, y
, width
, height
);
805 void MojoGLES2Impl::ShaderBinary(GLsizei n
,
806 const GLuint
* shaders
,
810 MojoGLES2MakeCurrent(context_
);
811 glShaderBinary(n
, shaders
, binaryformat
, binary
, length
);
813 void MojoGLES2Impl::ShaderSource(GLuint shader
,
815 const GLchar
* const* str
,
816 const GLint
* length
) {
817 MojoGLES2MakeCurrent(context_
);
818 glShaderSource(shader
, count
, str
, length
);
820 void MojoGLES2Impl::ShallowFinishCHROMIUM() {
821 NOTREACHED() << "Unimplemented ShallowFinishCHROMIUM.";
823 void MojoGLES2Impl::ShallowFlushCHROMIUM() {
824 MojoGLES2MakeCurrent(context_
);
825 glShallowFlushCHROMIUM();
827 void MojoGLES2Impl::OrderingBarrierCHROMIUM() {
828 NOTREACHED() << "Unimplemented OrderingBarrierCHROMIUM.";
830 void MojoGLES2Impl::StencilFunc(GLenum func
, GLint ref
, GLuint mask
) {
831 MojoGLES2MakeCurrent(context_
);
832 glStencilFunc(func
, ref
, mask
);
834 void MojoGLES2Impl::StencilFuncSeparate(GLenum face
,
838 MojoGLES2MakeCurrent(context_
);
839 glStencilFuncSeparate(face
, func
, ref
, mask
);
841 void MojoGLES2Impl::StencilMask(GLuint mask
) {
842 MojoGLES2MakeCurrent(context_
);
845 void MojoGLES2Impl::StencilMaskSeparate(GLenum face
, GLuint mask
) {
846 MojoGLES2MakeCurrent(context_
);
847 glStencilMaskSeparate(face
, mask
);
849 void MojoGLES2Impl::StencilOp(GLenum fail
, GLenum zfail
, GLenum zpass
) {
850 MojoGLES2MakeCurrent(context_
);
851 glStencilOp(fail
, zfail
, zpass
);
853 void MojoGLES2Impl::StencilOpSeparate(GLenum face
,
857 MojoGLES2MakeCurrent(context_
);
858 glStencilOpSeparate(face
, fail
, zfail
, zpass
);
860 void MojoGLES2Impl::TexImage2D(GLenum target
,
862 GLint internalformat
,
868 const void* pixels
) {
869 MojoGLES2MakeCurrent(context_
);
870 glTexImage2D(target
, level
, internalformat
, width
, height
, border
, format
,
873 void MojoGLES2Impl::TexImage3D(GLenum target
,
875 GLint internalformat
,
882 const void* pixels
) {
883 NOTREACHED() << "Unimplemented TexImage3D.";
885 void MojoGLES2Impl::TexParameterf(GLenum target
, GLenum pname
, GLfloat param
) {
886 MojoGLES2MakeCurrent(context_
);
887 glTexParameterf(target
, pname
, param
);
889 void MojoGLES2Impl::TexParameterfv(GLenum target
,
891 const GLfloat
* params
) {
892 MojoGLES2MakeCurrent(context_
);
893 glTexParameterfv(target
, pname
, params
);
895 void MojoGLES2Impl::TexParameteri(GLenum target
, GLenum pname
, GLint param
) {
896 MojoGLES2MakeCurrent(context_
);
897 glTexParameteri(target
, pname
, param
);
899 void MojoGLES2Impl::TexParameteriv(GLenum target
,
901 const GLint
* params
) {
902 MojoGLES2MakeCurrent(context_
);
903 glTexParameteriv(target
, pname
, params
);
905 void MojoGLES2Impl::TexStorage3D(GLenum target
,
907 GLenum internalFormat
,
911 NOTREACHED() << "Unimplemented TexStorage3D.";
913 void MojoGLES2Impl::TexSubImage2D(GLenum target
,
921 const void* pixels
) {
922 MojoGLES2MakeCurrent(context_
);
923 glTexSubImage2D(target
, level
, xoffset
, yoffset
, width
, height
, format
, type
,
926 void MojoGLES2Impl::TexSubImage3D(GLenum target
,
936 const void* pixels
) {
937 NOTREACHED() << "Unimplemented TexSubImage3D.";
939 void MojoGLES2Impl::TransformFeedbackVaryings(GLuint program
,
941 const char* const* varyings
,
943 NOTREACHED() << "Unimplemented TransformFeedbackVaryings.";
945 void MojoGLES2Impl::Uniform1f(GLint location
, GLfloat x
) {
946 MojoGLES2MakeCurrent(context_
);
947 glUniform1f(location
, x
);
949 void MojoGLES2Impl::Uniform1fv(GLint location
,
952 MojoGLES2MakeCurrent(context_
);
953 glUniform1fv(location
, count
, v
);
955 void MojoGLES2Impl::Uniform1i(GLint location
, GLint x
) {
956 MojoGLES2MakeCurrent(context_
);
957 glUniform1i(location
, x
);
959 void MojoGLES2Impl::Uniform1iv(GLint location
, GLsizei count
, const GLint
* v
) {
960 MojoGLES2MakeCurrent(context_
);
961 glUniform1iv(location
, count
, v
);
963 void MojoGLES2Impl::Uniform1ui(GLint location
, GLuint x
) {
964 NOTREACHED() << "Unimplemented Uniform1ui.";
966 void MojoGLES2Impl::Uniform1uiv(GLint location
,
969 NOTREACHED() << "Unimplemented Uniform1uiv.";
971 void MojoGLES2Impl::Uniform2f(GLint location
, GLfloat x
, GLfloat y
) {
972 MojoGLES2MakeCurrent(context_
);
973 glUniform2f(location
, x
, y
);
975 void MojoGLES2Impl::Uniform2fv(GLint location
,
978 MojoGLES2MakeCurrent(context_
);
979 glUniform2fv(location
, count
, v
);
981 void MojoGLES2Impl::Uniform2i(GLint location
, GLint x
, GLint y
) {
982 MojoGLES2MakeCurrent(context_
);
983 glUniform2i(location
, x
, y
);
985 void MojoGLES2Impl::Uniform2iv(GLint location
, GLsizei count
, const GLint
* v
) {
986 MojoGLES2MakeCurrent(context_
);
987 glUniform2iv(location
, count
, v
);
989 void MojoGLES2Impl::Uniform2ui(GLint location
, GLuint x
, GLuint y
) {
990 NOTREACHED() << "Unimplemented Uniform2ui.";
992 void MojoGLES2Impl::Uniform2uiv(GLint location
,
995 NOTREACHED() << "Unimplemented Uniform2uiv.";
997 void MojoGLES2Impl::Uniform3f(GLint location
, GLfloat x
, GLfloat y
, GLfloat z
) {
998 MojoGLES2MakeCurrent(context_
);
999 glUniform3f(location
, x
, y
, z
);
1001 void MojoGLES2Impl::Uniform3fv(GLint location
,
1004 MojoGLES2MakeCurrent(context_
);
1005 glUniform3fv(location
, count
, v
);
1007 void MojoGLES2Impl::Uniform3i(GLint location
, GLint x
, GLint y
, GLint z
) {
1008 MojoGLES2MakeCurrent(context_
);
1009 glUniform3i(location
, x
, y
, z
);
1011 void MojoGLES2Impl::Uniform3iv(GLint location
, GLsizei count
, const GLint
* v
) {
1012 MojoGLES2MakeCurrent(context_
);
1013 glUniform3iv(location
, count
, v
);
1015 void MojoGLES2Impl::Uniform3ui(GLint location
, GLuint x
, GLuint y
, GLuint z
) {
1016 NOTREACHED() << "Unimplemented Uniform3ui.";
1018 void MojoGLES2Impl::Uniform3uiv(GLint location
,
1021 NOTREACHED() << "Unimplemented Uniform3uiv.";
1023 void MojoGLES2Impl::Uniform4f(GLint location
,
1028 MojoGLES2MakeCurrent(context_
);
1029 glUniform4f(location
, x
, y
, z
, w
);
1031 void MojoGLES2Impl::Uniform4fv(GLint location
,
1034 MojoGLES2MakeCurrent(context_
);
1035 glUniform4fv(location
, count
, v
);
1037 void MojoGLES2Impl::Uniform4i(GLint location
,
1042 MojoGLES2MakeCurrent(context_
);
1043 glUniform4i(location
, x
, y
, z
, w
);
1045 void MojoGLES2Impl::Uniform4iv(GLint location
, GLsizei count
, const GLint
* v
) {
1046 MojoGLES2MakeCurrent(context_
);
1047 glUniform4iv(location
, count
, v
);
1049 void MojoGLES2Impl::Uniform4ui(GLint location
,
1054 NOTREACHED() << "Unimplemented Uniform4ui.";
1056 void MojoGLES2Impl::Uniform4uiv(GLint location
,
1059 NOTREACHED() << "Unimplemented Uniform4uiv.";
1061 void MojoGLES2Impl::UniformBlockBinding(GLuint program
,
1064 NOTREACHED() << "Unimplemented UniformBlockBinding.";
1066 void MojoGLES2Impl::UniformMatrix2fv(GLint location
,
1068 GLboolean transpose
,
1069 const GLfloat
* value
) {
1070 MojoGLES2MakeCurrent(context_
);
1071 glUniformMatrix2fv(location
, count
, transpose
, value
);
1073 void MojoGLES2Impl::UniformMatrix2x3fv(GLint location
,
1075 GLboolean transpose
,
1076 const GLfloat
* value
) {
1077 NOTREACHED() << "Unimplemented UniformMatrix2x3fv.";
1079 void MojoGLES2Impl::UniformMatrix2x4fv(GLint location
,
1081 GLboolean transpose
,
1082 const GLfloat
* value
) {
1083 NOTREACHED() << "Unimplemented UniformMatrix2x4fv.";
1085 void MojoGLES2Impl::UniformMatrix3fv(GLint location
,
1087 GLboolean transpose
,
1088 const GLfloat
* value
) {
1089 MojoGLES2MakeCurrent(context_
);
1090 glUniformMatrix3fv(location
, count
, transpose
, value
);
1092 void MojoGLES2Impl::UniformMatrix3x2fv(GLint location
,
1094 GLboolean transpose
,
1095 const GLfloat
* value
) {
1096 NOTREACHED() << "Unimplemented UniformMatrix3x2fv.";
1098 void MojoGLES2Impl::UniformMatrix3x4fv(GLint location
,
1100 GLboolean transpose
,
1101 const GLfloat
* value
) {
1102 NOTREACHED() << "Unimplemented UniformMatrix3x4fv.";
1104 void MojoGLES2Impl::UniformMatrix4fv(GLint location
,
1106 GLboolean transpose
,
1107 const GLfloat
* value
) {
1108 MojoGLES2MakeCurrent(context_
);
1109 glUniformMatrix4fv(location
, count
, transpose
, value
);
1111 void MojoGLES2Impl::UniformMatrix4x2fv(GLint location
,
1113 GLboolean transpose
,
1114 const GLfloat
* value
) {
1115 NOTREACHED() << "Unimplemented UniformMatrix4x2fv.";
1117 void MojoGLES2Impl::UniformMatrix4x3fv(GLint location
,
1119 GLboolean transpose
,
1120 const GLfloat
* value
) {
1121 NOTREACHED() << "Unimplemented UniformMatrix4x3fv.";
1123 void MojoGLES2Impl::UseProgram(GLuint program
) {
1124 MojoGLES2MakeCurrent(context_
);
1125 glUseProgram(program
);
1127 void MojoGLES2Impl::ValidateProgram(GLuint program
) {
1128 MojoGLES2MakeCurrent(context_
);
1129 glValidateProgram(program
);
1131 void MojoGLES2Impl::VertexAttrib1f(GLuint indx
, GLfloat x
) {
1132 MojoGLES2MakeCurrent(context_
);
1133 glVertexAttrib1f(indx
, x
);
1135 void MojoGLES2Impl::VertexAttrib1fv(GLuint indx
, const GLfloat
* values
) {
1136 MojoGLES2MakeCurrent(context_
);
1137 glVertexAttrib1fv(indx
, values
);
1139 void MojoGLES2Impl::VertexAttrib2f(GLuint indx
, GLfloat x
, GLfloat y
) {
1140 MojoGLES2MakeCurrent(context_
);
1141 glVertexAttrib2f(indx
, x
, y
);
1143 void MojoGLES2Impl::VertexAttrib2fv(GLuint indx
, const GLfloat
* values
) {
1144 MojoGLES2MakeCurrent(context_
);
1145 glVertexAttrib2fv(indx
, values
);
1147 void MojoGLES2Impl::VertexAttrib3f(GLuint indx
,
1151 MojoGLES2MakeCurrent(context_
);
1152 glVertexAttrib3f(indx
, x
, y
, z
);
1154 void MojoGLES2Impl::VertexAttrib3fv(GLuint indx
, const GLfloat
* values
) {
1155 MojoGLES2MakeCurrent(context_
);
1156 glVertexAttrib3fv(indx
, values
);
1158 void MojoGLES2Impl::VertexAttrib4f(GLuint indx
,
1163 MojoGLES2MakeCurrent(context_
);
1164 glVertexAttrib4f(indx
, x
, y
, z
, w
);
1166 void MojoGLES2Impl::VertexAttrib4fv(GLuint indx
, const GLfloat
* values
) {
1167 MojoGLES2MakeCurrent(context_
);
1168 glVertexAttrib4fv(indx
, values
);
1170 void MojoGLES2Impl::VertexAttribI4i(GLuint indx
,
1175 NOTREACHED() << "Unimplemented VertexAttribI4i.";
1177 void MojoGLES2Impl::VertexAttribI4iv(GLuint indx
, const GLint
* values
) {
1178 NOTREACHED() << "Unimplemented VertexAttribI4iv.";
1180 void MojoGLES2Impl::VertexAttribI4ui(GLuint indx
,
1185 NOTREACHED() << "Unimplemented VertexAttribI4ui.";
1187 void MojoGLES2Impl::VertexAttribI4uiv(GLuint indx
, const GLuint
* values
) {
1188 NOTREACHED() << "Unimplemented VertexAttribI4uiv.";
1190 void MojoGLES2Impl::VertexAttribIPointer(GLuint indx
,
1195 NOTREACHED() << "Unimplemented VertexAttribIPointer.";
1197 void MojoGLES2Impl::VertexAttribPointer(GLuint indx
,
1200 GLboolean normalized
,
1203 MojoGLES2MakeCurrent(context_
);
1204 glVertexAttribPointer(indx
, size
, type
, normalized
, stride
, ptr
);
1206 void MojoGLES2Impl::Viewport(GLint x
, GLint y
, GLsizei width
, GLsizei height
) {
1207 MojoGLES2MakeCurrent(context_
);
1208 glViewport(x
, y
, width
, height
);
1210 void MojoGLES2Impl::WaitSync(GLsync sync
, GLbitfield flags
, GLuint64 timeout
) {
1211 NOTREACHED() << "Unimplemented WaitSync.";
1213 void MojoGLES2Impl::BlitFramebufferCHROMIUM(GLint srcX0
,
1223 NOTREACHED() << "Unimplemented BlitFramebufferCHROMIUM.";
1225 void MojoGLES2Impl::RenderbufferStorageMultisampleCHROMIUM(
1228 GLenum internalformat
,
1231 NOTREACHED() << "Unimplemented RenderbufferStorageMultisampleCHROMIUM.";
1233 void MojoGLES2Impl::RenderbufferStorageMultisampleEXT(GLenum target
,
1235 GLenum internalformat
,
1238 NOTREACHED() << "Unimplemented RenderbufferStorageMultisampleEXT.";
1240 void MojoGLES2Impl::FramebufferTexture2DMultisampleEXT(GLenum target
,
1246 NOTREACHED() << "Unimplemented FramebufferTexture2DMultisampleEXT.";
1248 void MojoGLES2Impl::TexStorage2DEXT(GLenum target
,
1250 GLenum internalFormat
,
1253 NOTREACHED() << "Unimplemented TexStorage2DEXT.";
1255 void MojoGLES2Impl::GenQueriesEXT(GLsizei n
, GLuint
* queries
) {
1256 MojoGLES2MakeCurrent(context_
);
1257 glGenQueriesEXT(n
, queries
);
1259 void MojoGLES2Impl::DeleteQueriesEXT(GLsizei n
, const GLuint
* queries
) {
1260 MojoGLES2MakeCurrent(context_
);
1261 glDeleteQueriesEXT(n
, queries
);
1263 void MojoGLES2Impl::QueryCounterEXT(GLuint id
, GLenum target
) {
1264 NOTREACHED() << "Unimplemented QueryCounterEXT.";
1266 GLboolean
MojoGLES2Impl::IsQueryEXT(GLuint id
) {
1267 MojoGLES2MakeCurrent(context_
);
1268 return glIsQueryEXT(id
);
1270 void MojoGLES2Impl::BeginQueryEXT(GLenum target
, GLuint id
) {
1271 MojoGLES2MakeCurrent(context_
);
1272 glBeginQueryEXT(target
, id
);
1274 void MojoGLES2Impl::BeginTransformFeedback(GLenum primitivemode
) {
1275 NOTREACHED() << "Unimplemented BeginTransformFeedback.";
1277 void MojoGLES2Impl::EndQueryEXT(GLenum target
) {
1278 MojoGLES2MakeCurrent(context_
);
1279 glEndQueryEXT(target
);
1281 void MojoGLES2Impl::EndTransformFeedback() {
1282 NOTREACHED() << "Unimplemented EndTransformFeedback.";
1284 void MojoGLES2Impl::GetQueryivEXT(GLenum target
, GLenum pname
, GLint
* params
) {
1285 MojoGLES2MakeCurrent(context_
);
1286 glGetQueryivEXT(target
, pname
, params
);
1288 void MojoGLES2Impl::GetQueryObjectuivEXT(GLuint id
,
1291 MojoGLES2MakeCurrent(context_
);
1292 glGetQueryObjectuivEXT(id
, pname
, params
);
1294 void MojoGLES2Impl::GetQueryObjectui64vEXT(GLuint id
,
1297 NOTREACHED() << "Unimplemented GetQueryObjectui64vEXT.";
1299 void MojoGLES2Impl::InsertEventMarkerEXT(GLsizei length
, const GLchar
* marker
) {
1300 NOTREACHED() << "Unimplemented InsertEventMarkerEXT.";
1302 void MojoGLES2Impl::PushGroupMarkerEXT(GLsizei length
, const GLchar
* marker
) {
1303 NOTREACHED() << "Unimplemented PushGroupMarkerEXT.";
1305 void MojoGLES2Impl::PopGroupMarkerEXT() {
1306 NOTREACHED() << "Unimplemented PopGroupMarkerEXT.";
1308 void MojoGLES2Impl::GenVertexArraysOES(GLsizei n
, GLuint
* arrays
) {
1309 NOTREACHED() << "Unimplemented GenVertexArraysOES.";
1311 void MojoGLES2Impl::DeleteVertexArraysOES(GLsizei n
, const GLuint
* arrays
) {
1312 NOTREACHED() << "Unimplemented DeleteVertexArraysOES.";
1314 GLboolean
MojoGLES2Impl::IsVertexArrayOES(GLuint array
) {
1315 NOTREACHED() << "Unimplemented IsVertexArrayOES.";
1318 void MojoGLES2Impl::BindVertexArrayOES(GLuint array
) {
1319 NOTREACHED() << "Unimplemented BindVertexArrayOES.";
1321 void MojoGLES2Impl::SwapBuffers() {
1322 NOTREACHED() << "Unimplemented SwapBuffers.";
1324 GLuint
MojoGLES2Impl::GetMaxValueInBufferCHROMIUM(GLuint buffer_id
,
1328 NOTREACHED() << "Unimplemented GetMaxValueInBufferCHROMIUM.";
1331 GLboolean
MojoGLES2Impl::EnableFeatureCHROMIUM(const char* feature
) {
1332 NOTREACHED() << "Unimplemented EnableFeatureCHROMIUM.";
1335 void* MojoGLES2Impl::MapBufferCHROMIUM(GLuint target
, GLenum access
) {
1336 MojoGLES2MakeCurrent(context_
);
1337 return glMapBufferCHROMIUM(target
, access
);
1339 GLboolean
MojoGLES2Impl::UnmapBufferCHROMIUM(GLuint target
) {
1340 MojoGLES2MakeCurrent(context_
);
1341 return glUnmapBufferCHROMIUM(target
);
1343 void* MojoGLES2Impl::MapBufferSubDataCHROMIUM(GLuint target
,
1347 NOTREACHED() << "Unimplemented MapBufferSubDataCHROMIUM.";
1350 void MojoGLES2Impl::UnmapBufferSubDataCHROMIUM(const void* mem
) {
1351 NOTREACHED() << "Unimplemented UnmapBufferSubDataCHROMIUM.";
1353 void* MojoGLES2Impl::MapBufferRange(GLenum target
,
1356 GLbitfield access
) {
1357 NOTREACHED() << "Unimplemented MapBufferRange.";
1360 GLboolean
MojoGLES2Impl::UnmapBuffer(GLenum target
) {
1361 NOTREACHED() << "Unimplemented UnmapBuffer.";
1364 void* MojoGLES2Impl::MapTexSubImage2DCHROMIUM(GLenum target
,
1373 MojoGLES2MakeCurrent(context_
);
1374 return glMapTexSubImage2DCHROMIUM(target
, level
, xoffset
, yoffset
, width
,
1375 height
, format
, type
, access
);
1377 void MojoGLES2Impl::UnmapTexSubImage2DCHROMIUM(const void* mem
) {
1378 MojoGLES2MakeCurrent(context_
);
1379 glUnmapTexSubImage2DCHROMIUM(mem
);
1381 void MojoGLES2Impl::ResizeCHROMIUM(GLuint width
,
1383 GLfloat scale_factor
) {
1384 NOTREACHED() << "Unimplemented ResizeCHROMIUM.";
1386 const GLchar
* MojoGLES2Impl::GetRequestableExtensionsCHROMIUM() {
1387 NOTREACHED() << "Unimplemented GetRequestableExtensionsCHROMIUM.";
1390 void MojoGLES2Impl::RequestExtensionCHROMIUM(const char* extension
) {
1391 NOTREACHED() << "Unimplemented RequestExtensionCHROMIUM.";
1393 void MojoGLES2Impl::RateLimitOffscreenContextCHROMIUM() {
1394 NOTREACHED() << "Unimplemented RateLimitOffscreenContextCHROMIUM.";
1396 void MojoGLES2Impl::GetProgramInfoCHROMIUM(GLuint program
,
1400 NOTREACHED() << "Unimplemented GetProgramInfoCHROMIUM.";
1402 void MojoGLES2Impl::GetUniformBlocksCHROMIUM(GLuint program
,
1406 NOTREACHED() << "Unimplemented GetUniformBlocksCHROMIUM.";
1408 void MojoGLES2Impl::GetTransformFeedbackVaryingsCHROMIUM(GLuint program
,
1412 NOTREACHED() << "Unimplemented GetTransformFeedbackVaryingsCHROMIUM.";
1414 void MojoGLES2Impl::GetUniformsES3CHROMIUM(GLuint program
,
1418 NOTREACHED() << "Unimplemented GetUniformsES3CHROMIUM.";
1420 GLuint
MojoGLES2Impl::CreateStreamTextureCHROMIUM(GLuint texture
) {
1421 NOTREACHED() << "Unimplemented CreateStreamTextureCHROMIUM.";
1424 GLuint
MojoGLES2Impl::CreateImageCHROMIUM(ClientBuffer buffer
,
1427 GLenum internalformat
) {
1428 MojoGLES2MakeCurrent(context_
);
1429 return glCreateImageCHROMIUM(buffer
, width
, height
, internalformat
);
1431 void MojoGLES2Impl::DestroyImageCHROMIUM(GLuint image_id
) {
1432 MojoGLES2MakeCurrent(context_
);
1433 glDestroyImageCHROMIUM(image_id
);
1435 GLuint
MojoGLES2Impl::CreateGpuMemoryBufferImageCHROMIUM(GLsizei width
,
1437 GLenum internalformat
,
1439 MojoGLES2MakeCurrent(context_
);
1440 return glCreateGpuMemoryBufferImageCHROMIUM(width
, height
, internalformat
,
1443 void MojoGLES2Impl::GetTranslatedShaderSourceANGLE(GLuint shader
,
1447 NOTREACHED() << "Unimplemented GetTranslatedShaderSourceANGLE.";
1449 void MojoGLES2Impl::PostSubBufferCHROMIUM(GLint x
,
1453 NOTREACHED() << "Unimplemented PostSubBufferCHROMIUM.";
1455 void MojoGLES2Impl::TexImageIOSurface2DCHROMIUM(GLenum target
,
1460 NOTREACHED() << "Unimplemented TexImageIOSurface2DCHROMIUM.";
1462 void MojoGLES2Impl::CopyTextureCHROMIUM(GLenum target
,
1465 GLint internalformat
,
1467 GLboolean unpack_flip_y
,
1468 GLboolean unpack_premultiply_alpha
,
1469 GLboolean unpack_unmultiply_alpha
) {
1470 MojoGLES2MakeCurrent(context_
);
1471 glCopyTextureCHROMIUM(target
, source_id
, dest_id
, internalformat
, dest_type
,
1472 unpack_flip_y
, unpack_premultiply_alpha
,
1473 unpack_unmultiply_alpha
);
1475 void MojoGLES2Impl::CopySubTextureCHROMIUM(GLenum target
,
1484 GLboolean unpack_flip_y
,
1485 GLboolean unpack_premultiply_alpha
,
1486 GLboolean unpack_unmultiply_alpha
) {
1487 MojoGLES2MakeCurrent(context_
);
1488 glCopySubTextureCHROMIUM(target
, source_id
, dest_id
, xoffset
, yoffset
, x
, y
,
1489 width
, height
, unpack_flip_y
,
1490 unpack_premultiply_alpha
, unpack_unmultiply_alpha
);
1492 void MojoGLES2Impl::CompressedCopyTextureCHROMIUM(GLenum target
,
1495 NOTREACHED() << "Unimplemented CompressedCopyTextureCHROMIUM.";
1497 void MojoGLES2Impl::DrawArraysInstancedANGLE(GLenum mode
,
1500 GLsizei primcount
) {
1501 NOTREACHED() << "Unimplemented DrawArraysInstancedANGLE.";
1503 void MojoGLES2Impl::DrawElementsInstancedANGLE(GLenum mode
,
1506 const void* indices
,
1507 GLsizei primcount
) {
1508 NOTREACHED() << "Unimplemented DrawElementsInstancedANGLE.";
1510 void MojoGLES2Impl::VertexAttribDivisorANGLE(GLuint index
, GLuint divisor
) {
1511 NOTREACHED() << "Unimplemented VertexAttribDivisorANGLE.";
1513 void MojoGLES2Impl::GenMailboxCHROMIUM(GLbyte
* mailbox
) {
1514 MojoGLES2MakeCurrent(context_
);
1515 glGenMailboxCHROMIUM(mailbox
);
1517 void MojoGLES2Impl::ProduceTextureCHROMIUM(GLenum target
,
1518 const GLbyte
* mailbox
) {
1519 MojoGLES2MakeCurrent(context_
);
1520 glProduceTextureCHROMIUM(target
, mailbox
);
1522 void MojoGLES2Impl::ProduceTextureDirectCHROMIUM(GLuint texture
,
1524 const GLbyte
* mailbox
) {
1525 MojoGLES2MakeCurrent(context_
);
1526 glProduceTextureDirectCHROMIUM(texture
, target
, mailbox
);
1528 void MojoGLES2Impl::ConsumeTextureCHROMIUM(GLenum target
,
1529 const GLbyte
* mailbox
) {
1530 MojoGLES2MakeCurrent(context_
);
1531 glConsumeTextureCHROMIUM(target
, mailbox
);
1533 GLuint
MojoGLES2Impl::CreateAndConsumeTextureCHROMIUM(GLenum target
,
1534 const GLbyte
* mailbox
) {
1535 MojoGLES2MakeCurrent(context_
);
1536 return glCreateAndConsumeTextureCHROMIUM(target
, mailbox
);
1538 void MojoGLES2Impl::BindUniformLocationCHROMIUM(GLuint program
,
1541 NOTREACHED() << "Unimplemented BindUniformLocationCHROMIUM.";
1543 void MojoGLES2Impl::GenValuebuffersCHROMIUM(GLsizei n
, GLuint
* buffers
) {
1544 NOTREACHED() << "Unimplemented GenValuebuffersCHROMIUM.";
1546 void MojoGLES2Impl::DeleteValuebuffersCHROMIUM(GLsizei n
,
1547 const GLuint
* valuebuffers
) {
1548 NOTREACHED() << "Unimplemented DeleteValuebuffersCHROMIUM.";
1550 GLboolean
MojoGLES2Impl::IsValuebufferCHROMIUM(GLuint valuebuffer
) {
1551 NOTREACHED() << "Unimplemented IsValuebufferCHROMIUM.";
1554 void MojoGLES2Impl::BindValuebufferCHROMIUM(GLenum target
, GLuint valuebuffer
) {
1555 NOTREACHED() << "Unimplemented BindValuebufferCHROMIUM.";
1557 void MojoGLES2Impl::SubscribeValueCHROMIUM(GLenum target
, GLenum subscription
) {
1558 NOTREACHED() << "Unimplemented SubscribeValueCHROMIUM.";
1560 void MojoGLES2Impl::PopulateSubscribedValuesCHROMIUM(GLenum target
) {
1561 NOTREACHED() << "Unimplemented PopulateSubscribedValuesCHROMIUM.";
1563 void MojoGLES2Impl::UniformValuebufferCHROMIUM(GLint location
,
1565 GLenum subscription
) {
1566 NOTREACHED() << "Unimplemented UniformValuebufferCHROMIUM.";
1568 void MojoGLES2Impl::BindTexImage2DCHROMIUM(GLenum target
, GLint imageId
) {
1569 MojoGLES2MakeCurrent(context_
);
1570 glBindTexImage2DCHROMIUM(target
, imageId
);
1572 void MojoGLES2Impl::ReleaseTexImage2DCHROMIUM(GLenum target
, GLint imageId
) {
1573 MojoGLES2MakeCurrent(context_
);
1574 glReleaseTexImage2DCHROMIUM(target
, imageId
);
1576 void MojoGLES2Impl::TraceBeginCHROMIUM(const char* category_name
,
1577 const char* trace_name
) {
1578 NOTREACHED() << "Unimplemented TraceBeginCHROMIUM.";
1580 void MojoGLES2Impl::TraceEndCHROMIUM() {
1581 NOTREACHED() << "Unimplemented TraceEndCHROMIUM.";
1583 void MojoGLES2Impl::AsyncTexSubImage2DCHROMIUM(GLenum target
,
1592 NOTREACHED() << "Unimplemented AsyncTexSubImage2DCHROMIUM.";
1594 void MojoGLES2Impl::AsyncTexImage2DCHROMIUM(GLenum target
,
1596 GLenum internalformat
,
1602 const void* pixels
) {
1603 NOTREACHED() << "Unimplemented AsyncTexImage2DCHROMIUM.";
1605 void MojoGLES2Impl::WaitAsyncTexImage2DCHROMIUM(GLenum target
) {
1606 NOTREACHED() << "Unimplemented WaitAsyncTexImage2DCHROMIUM.";
1608 void MojoGLES2Impl::WaitAllAsyncTexImage2DCHROMIUM() {
1609 NOTREACHED() << "Unimplemented WaitAllAsyncTexImage2DCHROMIUM.";
1611 void MojoGLES2Impl::DiscardFramebufferEXT(GLenum target
,
1613 const GLenum
* attachments
) {
1614 NOTREACHED() << "Unimplemented DiscardFramebufferEXT.";
1616 void MojoGLES2Impl::LoseContextCHROMIUM(GLenum current
, GLenum other
) {
1617 NOTREACHED() << "Unimplemented LoseContextCHROMIUM.";
1619 GLuint
MojoGLES2Impl::InsertSyncPointCHROMIUM() {
1620 MojoGLES2MakeCurrent(context_
);
1621 return glInsertSyncPointCHROMIUM();
1623 void MojoGLES2Impl::WaitSyncPointCHROMIUM(GLuint sync_point
) {
1624 MojoGLES2MakeCurrent(context_
);
1625 glWaitSyncPointCHROMIUM(sync_point
);
1627 void MojoGLES2Impl::DrawBuffersEXT(GLsizei count
, const GLenum
* bufs
) {
1628 NOTREACHED() << "Unimplemented DrawBuffersEXT.";
1630 void MojoGLES2Impl::DiscardBackbufferCHROMIUM() {
1631 NOTREACHED() << "Unimplemented DiscardBackbufferCHROMIUM.";
1633 void MojoGLES2Impl::ScheduleOverlayPlaneCHROMIUM(GLint plane_z_order
,
1634 GLenum plane_transform
,
1635 GLuint overlay_texture_id
,
1639 GLint bounds_height
,
1643 GLfloat uv_height
) {
1644 NOTREACHED() << "Unimplemented ScheduleOverlayPlaneCHROMIUM.";
1646 void MojoGLES2Impl::SwapInterval(GLint interval
) {
1647 NOTREACHED() << "Unimplemented SwapInterval.";
1649 void MojoGLES2Impl::FlushDriverCachesCHROMIUM() {
1650 NOTREACHED() << "Unimplemented FlushDriverCachesCHROMIUM.";
1652 void MojoGLES2Impl::MatrixLoadfCHROMIUM(GLenum matrixMode
, const GLfloat
* m
) {
1653 NOTREACHED() << "Unimplemented MatrixLoadfCHROMIUM.";
1655 void MojoGLES2Impl::MatrixLoadIdentityCHROMIUM(GLenum matrixMode
) {
1656 NOTREACHED() << "Unimplemented MatrixLoadIdentityCHROMIUM.";
1658 GLuint
MojoGLES2Impl::GenPathsCHROMIUM(GLsizei range
) {
1659 NOTREACHED() << "Unimplemented GenPathsCHROMIUM.";
1662 void MojoGLES2Impl::DeletePathsCHROMIUM(GLuint path
, GLsizei range
) {
1663 NOTREACHED() << "Unimplemented DeletePathsCHROMIUM.";
1665 GLboolean
MojoGLES2Impl::IsPathCHROMIUM(GLuint path
) {
1666 NOTREACHED() << "Unimplemented IsPathCHROMIUM.";
1669 void MojoGLES2Impl::PathCommandsCHROMIUM(GLuint path
,
1670 GLsizei numCommands
,
1671 const GLubyte
* commands
,
1674 const GLvoid
* coords
) {
1675 NOTREACHED() << "Unimplemented PathCommandsCHROMIUM.";
1677 void MojoGLES2Impl::PathParameterfCHROMIUM(GLuint path
,
1680 NOTREACHED() << "Unimplemented PathParameterfCHROMIUM.";
1682 void MojoGLES2Impl::PathParameteriCHROMIUM(GLuint path
,
1685 NOTREACHED() << "Unimplemented PathParameteriCHROMIUM.";
1687 void MojoGLES2Impl::PathStencilFuncCHROMIUM(GLenum func
,
1690 NOTREACHED() << "Unimplemented PathStencilFuncCHROMIUM.";
1692 void MojoGLES2Impl::StencilFillPathCHROMIUM(GLuint path
,
1695 NOTREACHED() << "Unimplemented StencilFillPathCHROMIUM.";
1697 void MojoGLES2Impl::StencilStrokePathCHROMIUM(GLuint path
,
1700 NOTREACHED() << "Unimplemented StencilStrokePathCHROMIUM.";
1702 void MojoGLES2Impl::CoverFillPathCHROMIUM(GLuint path
, GLenum coverMode
) {
1703 NOTREACHED() << "Unimplemented CoverFillPathCHROMIUM.";
1705 void MojoGLES2Impl::CoverStrokePathCHROMIUM(GLuint path
, GLenum coverMode
) {
1706 NOTREACHED() << "Unimplemented CoverStrokePathCHROMIUM.";
1708 void MojoGLES2Impl::StencilThenCoverFillPathCHROMIUM(GLuint path
,
1712 NOTREACHED() << "Unimplemented StencilThenCoverFillPathCHROMIUM.";
1714 void MojoGLES2Impl::StencilThenCoverStrokePathCHROMIUM(GLuint path
,
1718 NOTREACHED() << "Unimplemented StencilThenCoverStrokePathCHROMIUM.";
1720 GLenum
MojoGLES2Impl::GetGraphicsResetStatusKHR() {
1721 NOTREACHED() << "Unimplemented GetGraphicsResetStatusKHR.";
1724 void MojoGLES2Impl::BlendBarrierKHR() {
1725 NOTREACHED() << "Unimplemented BlendBarrierKHR.";