diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 00:49:54 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 00:49:54 +0000 |
commit | 4bf858f802b04c1e7a4de9ed8fd601a315aa5ce0 (patch) | |
tree | 30d488b478fc76f9ff14b4dcbcd4cc3ef02faa26 | |
parent | ee87c8becd53479fcbe4f2d66b37401d10ddae47 (diff) | |
download | chromium_src-4bf858f802b04c1e7a4de9ed8fd601a315aa5ce0.zip chromium_src-4bf858f802b04c1e7a4de9ed8fd601a315aa5ce0.tar.gz chromium_src-4bf858f802b04c1e7a4de9ed8fd601a315aa5ce0.tar.bz2 |
Format generated gpu files using clang-format.
Just reformatting, no code change.
BUG=349140
TEST=tree
R=bajones@chromium.org, dmichael@chromium.org
TBR=piman@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/181903006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254891 0039d316-1c4b-4281-b951-d872f2087c98
33 files changed, 13601 insertions, 12505 deletions
diff --git a/gpu/GLES2/gl2chromium_autogen.h b/gpu/GLES2/gl2chromium_autogen.h index 62b22d5..3acd0dc 100644 --- a/gpu/GLES2/gl2chromium_autogen.h +++ b/gpu/GLES2/gl2chromium_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file contains Chromium-specific GLES2 declarations. @@ -73,8 +75,8 @@ #define glGetBufferParameteriv GLES2_GET_FUN(GetBufferParameteriv) #define glGetError GLES2_GET_FUN(GetError) #define glGetFloatv GLES2_GET_FUN(GetFloatv) -#define glGetFramebufferAttachmentParameteriv GLES2_GET_FUN( \ - GetFramebufferAttachmentParameteriv) +#define glGetFramebufferAttachmentParameteriv \ + GLES2_GET_FUN(GetFramebufferAttachmentParameteriv) #define glGetIntegerv GLES2_GET_FUN(GetIntegerv) #define glGetProgramiv GLES2_GET_FUN(GetProgramiv) #define glGetProgramInfoLog GLES2_GET_FUN(GetProgramInfoLog) @@ -157,12 +159,12 @@ #define glVertexAttribPointer GLES2_GET_FUN(VertexAttribPointer) #define glViewport GLES2_GET_FUN(Viewport) #define glBlitFramebufferCHROMIUM GLES2_GET_FUN(BlitFramebufferCHROMIUM) -#define glRenderbufferStorageMultisampleCHROMIUM GLES2_GET_FUN( \ - RenderbufferStorageMultisampleCHROMIUM) -#define glRenderbufferStorageMultisampleEXT GLES2_GET_FUN( \ - RenderbufferStorageMultisampleEXT) -#define glFramebufferTexture2DMultisampleEXT GLES2_GET_FUN( \ - FramebufferTexture2DMultisampleEXT) +#define glRenderbufferStorageMultisampleCHROMIUM \ + GLES2_GET_FUN(RenderbufferStorageMultisampleCHROMIUM) +#define glRenderbufferStorageMultisampleEXT \ + GLES2_GET_FUN(RenderbufferStorageMultisampleEXT) +#define glFramebufferTexture2DMultisampleEXT \ + GLES2_GET_FUN(FramebufferTexture2DMultisampleEXT) #define glTexStorage2DEXT GLES2_GET_FUN(TexStorage2DEXT) #define glGenQueriesEXT GLES2_GET_FUN(GenQueriesEXT) #define glDeleteQueriesEXT GLES2_GET_FUN(DeleteQueriesEXT) @@ -179,8 +181,7 @@ #define glIsVertexArrayOES GLES2_GET_FUN(IsVertexArrayOES) #define glBindVertexArrayOES GLES2_GET_FUN(BindVertexArrayOES) #define glSwapBuffers GLES2_GET_FUN(SwapBuffers) -#define glGetMaxValueInBufferCHROMIUM GLES2_GET_FUN( \ - GetMaxValueInBufferCHROMIUM) +#define glGetMaxValueInBufferCHROMIUM GLES2_GET_FUN(GetMaxValueInBufferCHROMIUM) #define glGenSharedIdsCHROMIUM GLES2_GET_FUN(GenSharedIdsCHROMIUM) #define glDeleteSharedIdsCHROMIUM GLES2_GET_FUN(DeleteSharedIdsCHROMIUM) #define glRegisterSharedIdsCHROMIUM GLES2_GET_FUN(RegisterSharedIdsCHROMIUM) @@ -194,25 +195,21 @@ #define glMapTexSubImage2DCHROMIUM GLES2_GET_FUN(MapTexSubImage2DCHROMIUM) #define glUnmapTexSubImage2DCHROMIUM GLES2_GET_FUN(UnmapTexSubImage2DCHROMIUM) #define glResizeCHROMIUM GLES2_GET_FUN(ResizeCHROMIUM) -#define glGetRequestableExtensionsCHROMIUM GLES2_GET_FUN( \ - GetRequestableExtensionsCHROMIUM) +#define glGetRequestableExtensionsCHROMIUM \ + GLES2_GET_FUN(GetRequestableExtensionsCHROMIUM) #define glRequestExtensionCHROMIUM GLES2_GET_FUN(RequestExtensionCHROMIUM) -#define glRateLimitOffscreenContextCHROMIUM GLES2_GET_FUN( \ - RateLimitOffscreenContextCHROMIUM) -#define glGetMultipleIntegervCHROMIUM GLES2_GET_FUN( \ - GetMultipleIntegervCHROMIUM) +#define glRateLimitOffscreenContextCHROMIUM \ + GLES2_GET_FUN(RateLimitOffscreenContextCHROMIUM) +#define glGetMultipleIntegervCHROMIUM GLES2_GET_FUN(GetMultipleIntegervCHROMIUM) #define glGetProgramInfoCHROMIUM GLES2_GET_FUN(GetProgramInfoCHROMIUM) -#define glCreateStreamTextureCHROMIUM GLES2_GET_FUN( \ - CreateStreamTextureCHROMIUM) +#define glCreateStreamTextureCHROMIUM GLES2_GET_FUN(CreateStreamTextureCHROMIUM) #define glCreateImageCHROMIUM GLES2_GET_FUN(CreateImageCHROMIUM) #define glDestroyImageCHROMIUM GLES2_GET_FUN(DestroyImageCHROMIUM) -#define glGetImageParameterivCHROMIUM GLES2_GET_FUN( \ - GetImageParameterivCHROMIUM) -#define glGetTranslatedShaderSourceANGLE GLES2_GET_FUN( \ - GetTranslatedShaderSourceANGLE) +#define glGetImageParameterivCHROMIUM GLES2_GET_FUN(GetImageParameterivCHROMIUM) +#define glGetTranslatedShaderSourceANGLE \ + GLES2_GET_FUN(GetTranslatedShaderSourceANGLE) #define glPostSubBufferCHROMIUM GLES2_GET_FUN(PostSubBufferCHROMIUM) -#define glTexImageIOSurface2DCHROMIUM GLES2_GET_FUN( \ - TexImageIOSurface2DCHROMIUM) +#define glTexImageIOSurface2DCHROMIUM GLES2_GET_FUN(TexImageIOSurface2DCHROMIUM) #define glCopyTextureCHROMIUM GLES2_GET_FUN(CopyTextureCHROMIUM) #define glDrawArraysInstancedANGLE GLES2_GET_FUN(DrawArraysInstancedANGLE) #define glDrawElementsInstancedANGLE GLES2_GET_FUN(DrawElementsInstancedANGLE) @@ -220,16 +217,14 @@ #define glGenMailboxCHROMIUM GLES2_GET_FUN(GenMailboxCHROMIUM) #define glProduceTextureCHROMIUM GLES2_GET_FUN(ProduceTextureCHROMIUM) #define glConsumeTextureCHROMIUM GLES2_GET_FUN(ConsumeTextureCHROMIUM) -#define glBindUniformLocationCHROMIUM GLES2_GET_FUN( \ - BindUniformLocationCHROMIUM) +#define glBindUniformLocationCHROMIUM GLES2_GET_FUN(BindUniformLocationCHROMIUM) #define glBindTexImage2DCHROMIUM GLES2_GET_FUN(BindTexImage2DCHROMIUM) #define glReleaseTexImage2DCHROMIUM GLES2_GET_FUN(ReleaseTexImage2DCHROMIUM) #define glTraceBeginCHROMIUM GLES2_GET_FUN(TraceBeginCHROMIUM) #define glTraceEndCHROMIUM GLES2_GET_FUN(TraceEndCHROMIUM) #define glAsyncTexSubImage2DCHROMIUM GLES2_GET_FUN(AsyncTexSubImage2DCHROMIUM) #define glAsyncTexImage2DCHROMIUM GLES2_GET_FUN(AsyncTexImage2DCHROMIUM) -#define glWaitAsyncTexImage2DCHROMIUM GLES2_GET_FUN( \ - WaitAsyncTexImage2DCHROMIUM) +#define glWaitAsyncTexImage2DCHROMIUM GLES2_GET_FUN(WaitAsyncTexImage2DCHROMIUM) #define glDiscardFramebufferEXT GLES2_GET_FUN(DiscardFramebufferEXT) #define glLoseContextCHROMIUM GLES2_GET_FUN(LoseContextCHROMIUM) #define glInsertSyncPointCHROMIUM GLES2_GET_FUN(InsertSyncPointCHROMIUM) @@ -238,4 +233,3 @@ #define glDiscardBackbufferCHROMIUM GLES2_GET_FUN(DiscardBackbufferCHROMIUM) #endif // GPU_GLES2_GL2CHROMIUM_AUTOGEN_H_ - diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 924cd3c..0acd6a3 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -11,6 +11,7 @@ import os.path import sys import re from optparse import OptionParser +from subprocess import call _SIZE_OF_UINT32 = 4 _SIZE_OF_COMMAND_HEADER = 4 @@ -24,6 +25,8 @@ _LICENSE = """// Copyright (c) 2014 The Chromium Authors. All rights reserved. _DO_NOT_EDIT_WARNING = """// This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! """ @@ -7827,6 +7830,10 @@ const size_t GLES2Util::enum_to_string_table_len_ = file.Close() +def Format(generated_files): + for filename in generated_files: + call(["clang-format", "-i", "-style=chromium", filename]) + def main(argv): """This is the main function.""" parser = OptionParser() @@ -7905,6 +7912,42 @@ def main(argv): gen.WriteMojoGLCallVisitor( "../../mojo/public/gles2/gles2_call_visitor_autogen.h") + Format([ + "common/gles2_cmd_format_autogen.h", + "common/gles2_cmd_format_test_autogen.h", + "common/gles2_cmd_ids_autogen.h", + "common/gles2_cmd_utils_autogen.h", + "common/gles2_cmd_utils_implementation_autogen.h", + "client/client_context_state_autogen.h", + "client/client_context_state_impl_autogen.h", + "client/gles2_cmd_helper_autogen.h", + "client/gles2_c_lib_autogen.h", + "client/gles2_implementation_autogen.h", + "client/gles2_implementation_impl_autogen.h", + "client/gles2_implementation_unittest_autogen.h", + "client/gles2_interface_autogen.h", + "client/gles2_interface_stub_autogen.h", + "client/gles2_interface_stub_impl_autogen.h", + "client/gles2_trace_implementation_autogen.h", + "client/gles2_trace_implementation_impl_autogen.h", + "service/context_state_autogen.h", + "service/context_state_impl_autogen.h", + "service/gles2_cmd_decoder_autogen.h", + "service/gles2_cmd_decoder_unittest_0_autogen.h", + "service/gles2_cmd_decoder_unittest_1_autogen.h", + "service/gles2_cmd_decoder_unittest_2_autogen.h", + "service/gles2_cmd_decoder_unittest_3_autogen.h", + "service/gles2_cmd_validation_autogen.h", + "service/gles2_cmd_validation_implementation_autogen.h"]) + os.chdir("../..") + Format([ + "gpu/GLES2/gl2chromium_autogen.h", + "mojo/public/gles2/gles2_call_visitor_autogen.h", + "ppapi/c/dev/ppb_opengles2ext_dev.h", + "ppapi/c/ppb_opengles2.h", + "ppapi/lib/gl/gles2/gles2.c", + "ppapi/shared_impl/ppb_opengles2_shared.cc"]) + if gen.errors > 0: print "%d errors" % gen.errors return 1 diff --git a/gpu/command_buffer/client/client_context_state_autogen.h b/gpu/command_buffer/client/client_context_state_autogen.h index e11864a..2d2f401 100644 --- a/gpu/command_buffer/client/client_context_state_autogen.h +++ b/gpu/command_buffer/client/client_context_state_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by client_context_state.h @@ -24,4 +26,3 @@ struct EnableFlags { }; #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/client_context_state_impl_autogen.h b/gpu/command_buffer/client/client_context_state_impl_autogen.h index c82f1e0..52908fc 100644 --- a/gpu/command_buffer/client/client_context_state_impl_autogen.h +++ b/gpu/command_buffer/client/client_context_state_impl_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by client_context_state.cc @@ -19,74 +21,72 @@ ClientContextState::EnableFlags::EnableFlags() sample_alpha_to_coverage(false), sample_coverage(false), scissor_test(false), - stencil_test(false) { -} - + stencil_test(false) {} -bool ClientContextState::SetCapabilityState( - GLenum cap, bool enabled, bool* changed) { +bool ClientContextState::SetCapabilityState(GLenum cap, + bool enabled, + bool* changed) { *changed = false; switch (cap) { case GL_BLEND: if (enable_flags.blend != enabled) { - *changed = true; - enable_flags.blend = enabled; + *changed = true; + enable_flags.blend = enabled; } return true; case GL_CULL_FACE: if (enable_flags.cull_face != enabled) { - *changed = true; - enable_flags.cull_face = enabled; + *changed = true; + enable_flags.cull_face = enabled; } return true; case GL_DEPTH_TEST: if (enable_flags.depth_test != enabled) { - *changed = true; - enable_flags.depth_test = enabled; + *changed = true; + enable_flags.depth_test = enabled; } return true; case GL_DITHER: if (enable_flags.dither != enabled) { - *changed = true; - enable_flags.dither = enabled; + *changed = true; + enable_flags.dither = enabled; } return true; case GL_POLYGON_OFFSET_FILL: if (enable_flags.polygon_offset_fill != enabled) { - *changed = true; - enable_flags.polygon_offset_fill = enabled; + *changed = true; + enable_flags.polygon_offset_fill = enabled; } return true; case GL_SAMPLE_ALPHA_TO_COVERAGE: if (enable_flags.sample_alpha_to_coverage != enabled) { - *changed = true; - enable_flags.sample_alpha_to_coverage = enabled; + *changed = true; + enable_flags.sample_alpha_to_coverage = enabled; } return true; case GL_SAMPLE_COVERAGE: if (enable_flags.sample_coverage != enabled) { - *changed = true; - enable_flags.sample_coverage = enabled; + *changed = true; + enable_flags.sample_coverage = enabled; } return true; case GL_SCISSOR_TEST: if (enable_flags.scissor_test != enabled) { - *changed = true; - enable_flags.scissor_test = enabled; + *changed = true; + enable_flags.scissor_test = enabled; } return true; case GL_STENCIL_TEST: if (enable_flags.stencil_test != enabled) { - *changed = true; - enable_flags.stencil_test = enabled; + *changed = true; + enable_flags.stencil_test = enabled; } return true; default: return false; } } -bool ClientContextState::GetEnabled( - GLenum cap, bool* enabled) const { +bool ClientContextState::GetEnabled(GLenum cap, bool* enabled) const { switch (cap) { case GL_BLEND: *enabled = enable_flags.blend; @@ -120,4 +120,3 @@ bool ClientContextState::GetEnabled( } } #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h index 717604d..8da5441 100644 --- a/gpu/command_buffer/client/gles2_c_lib_autogen.h +++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // These functions emulate GLES2 over command buffers. @@ -31,8 +33,10 @@ void GLES2BindRenderbuffer(GLenum target, GLuint renderbuffer) { void GLES2BindTexture(GLenum target, GLuint texture) { gles2::GetGLContext()->BindTexture(target, texture); } -void GLES2BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLES2BlendColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) { gles2::GetGLContext()->BlendColor(red, green, blue, alpha); } void GLES2BlendEquation(GLenum mode) { @@ -44,74 +48,97 @@ void GLES2BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { void GLES2BlendFunc(GLenum sfactor, GLenum dfactor) { gles2::GetGLContext()->BlendFunc(sfactor, dfactor); } -void GLES2BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { +void GLES2BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) { gles2::GetGLContext()->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); } -void GLES2BufferData( - GLenum target, GLsizeiptr size, const void* data, GLenum usage) { +void GLES2BufferData(GLenum target, + GLsizeiptr size, + const void* data, + GLenum usage) { gles2::GetGLContext()->BufferData(target, size, data, usage); } -void GLES2BufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { +void GLES2BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data) { gles2::GetGLContext()->BufferSubData(target, offset, size, data); } GLenum GLES2CheckFramebufferStatus(GLenum target) { return gles2::GetGLContext()->CheckFramebufferStatus(target); } -void GLES2Clear(GLbitfield mask) { - gles2::GetGLContext()->Clear(mask); -} -void GLES2ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLES2Clear(GLbitfield mask) { gles2::GetGLContext()->Clear(mask); } +void GLES2ClearColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) { gles2::GetGLContext()->ClearColor(red, green, blue, alpha); } void GLES2ClearDepthf(GLclampf depth) { gles2::GetGLContext()->ClearDepthf(depth); } -void GLES2ClearStencil(GLint s) { - gles2::GetGLContext()->ClearStencil(s); -} -void GLES2ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { +void GLES2ClearStencil(GLint s) { gles2::GetGLContext()->ClearStencil(s); } +void GLES2ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) { gles2::GetGLContext()->ColorMask(red, green, blue, alpha); } void GLES2CompileShader(GLuint shader) { gles2::GetGLContext()->CompileShader(shader); } -void GLES2CompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, const void* data) { +void GLES2CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data) { gles2::GetGLContext()->CompressedTexImage2D( target, level, internalformat, width, height, border, imageSize, data); } -void GLES2CompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, const void* data) { +void GLES2CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data) { gles2::GetGLContext()->CompressedTexSubImage2D( target, level, xoffset, yoffset, width, height, format, imageSize, data); } -void GLES2CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) { +void GLES2CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) { gles2::GetGLContext()->CopyTexImage2D( target, level, internalformat, x, y, width, height, border); } -void GLES2CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) { +void GLES2CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) { gles2::GetGLContext()->CopyTexSubImage2D( target, level, xoffset, yoffset, x, y, width, height); } -GLuint GLES2CreateProgram() { - return gles2::GetGLContext()->CreateProgram(); -} +GLuint GLES2CreateProgram() { return gles2::GetGLContext()->CreateProgram(); } GLuint GLES2CreateShader(GLenum type) { return gles2::GetGLContext()->CreateShader(type); } -void GLES2CullFace(GLenum mode) { - gles2::GetGLContext()->CullFace(mode); -} +void GLES2CullFace(GLenum mode) { gles2::GetGLContext()->CullFace(mode); } void GLES2DeleteBuffers(GLsizei n, const GLuint* buffers) { gles2::GetGLContext()->DeleteBuffers(n, buffers); } @@ -130,58 +157,49 @@ void GLES2DeleteShader(GLuint shader) { void GLES2DeleteTextures(GLsizei n, const GLuint* textures) { gles2::GetGLContext()->DeleteTextures(n, textures); } -void GLES2DepthFunc(GLenum func) { - gles2::GetGLContext()->DepthFunc(func); -} -void GLES2DepthMask(GLboolean flag) { - gles2::GetGLContext()->DepthMask(flag); -} +void GLES2DepthFunc(GLenum func) { gles2::GetGLContext()->DepthFunc(func); } +void GLES2DepthMask(GLboolean flag) { gles2::GetGLContext()->DepthMask(flag); } void GLES2DepthRangef(GLclampf zNear, GLclampf zFar) { gles2::GetGLContext()->DepthRangef(zNear, zFar); } void GLES2DetachShader(GLuint program, GLuint shader) { gles2::GetGLContext()->DetachShader(program, shader); } -void GLES2Disable(GLenum cap) { - gles2::GetGLContext()->Disable(cap); -} +void GLES2Disable(GLenum cap) { gles2::GetGLContext()->Disable(cap); } void GLES2DisableVertexAttribArray(GLuint index) { gles2::GetGLContext()->DisableVertexAttribArray(index); } void GLES2DrawArrays(GLenum mode, GLint first, GLsizei count) { gles2::GetGLContext()->DrawArrays(mode, first, count); } -void GLES2DrawElements( - GLenum mode, GLsizei count, GLenum type, const void* indices) { +void GLES2DrawElements(GLenum mode, + GLsizei count, + GLenum type, + const void* indices) { gles2::GetGLContext()->DrawElements(mode, count, type, indices); } -void GLES2Enable(GLenum cap) { - gles2::GetGLContext()->Enable(cap); -} +void GLES2Enable(GLenum cap) { gles2::GetGLContext()->Enable(cap); } void GLES2EnableVertexAttribArray(GLuint index) { gles2::GetGLContext()->EnableVertexAttribArray(index); } -void GLES2Finish() { - gles2::GetGLContext()->Finish(); -} -void GLES2Flush() { - gles2::GetGLContext()->Flush(); -} -void GLES2FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) { +void GLES2Finish() { gles2::GetGLContext()->Finish(); } +void GLES2Flush() { gles2::GetGLContext()->Flush(); } +void GLES2FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) { gles2::GetGLContext()->FramebufferRenderbuffer( target, attachment, renderbuffertarget, renderbuffer); } -void GLES2FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) { +void GLES2FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) { gles2::GetGLContext()->FramebufferTexture2D( target, attachment, textarget, texture, level); } -void GLES2FrontFace(GLenum mode) { - gles2::GetGLContext()->FrontFace(mode); -} +void GLES2FrontFace(GLenum mode) { gles2::GetGLContext()->FrontFace(mode); } void GLES2GenBuffers(GLsizei n, GLuint* buffers) { gles2::GetGLContext()->GenBuffers(n, buffers); } @@ -197,20 +215,30 @@ void GLES2GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { void GLES2GenTextures(GLsizei n, GLuint* textures) { gles2::GetGLContext()->GenTextures(n, textures); } -void GLES2GetActiveAttrib( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) { +void GLES2GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) { gles2::GetGLContext()->GetActiveAttrib( program, index, bufsize, length, size, type, name); } -void GLES2GetActiveUniform( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) { +void GLES2GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) { gles2::GetGLContext()->GetActiveUniform( program, index, bufsize, length, size, type, name); } -void GLES2GetAttachedShaders( - GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { +void GLES2GetAttachedShaders(GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders) { gles2::GetGLContext()->GetAttachedShaders(program, maxcount, count, shaders); } GLint GLES2GetAttribLocation(GLuint program, const char* name) { @@ -222,14 +250,14 @@ void GLES2GetBooleanv(GLenum pname, GLboolean* params) { void GLES2GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { gles2::GetGLContext()->GetBufferParameteriv(target, pname, params); } -GLenum GLES2GetError() { - return gles2::GetGLContext()->GetError(); -} +GLenum GLES2GetError() { return gles2::GetGLContext()->GetError(); } void GLES2GetFloatv(GLenum pname, GLfloat* params) { gles2::GetGLContext()->GetFloatv(pname, params); } -void GLES2GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) { +void GLES2GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) { gles2::GetGLContext()->GetFramebufferAttachmentParameteriv( target, attachment, pname, params); } @@ -239,28 +267,37 @@ void GLES2GetIntegerv(GLenum pname, GLint* params) { void GLES2GetProgramiv(GLuint program, GLenum pname, GLint* params) { gles2::GetGLContext()->GetProgramiv(program, pname, params); } -void GLES2GetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { +void GLES2GetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) { gles2::GetGLContext()->GetProgramInfoLog(program, bufsize, length, infolog); } -void GLES2GetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GLES2GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint* params) { gles2::GetGLContext()->GetRenderbufferParameteriv(target, pname, params); } void GLES2GetShaderiv(GLuint shader, GLenum pname, GLint* params) { gles2::GetGLContext()->GetShaderiv(shader, pname, params); } -void GLES2GetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { +void GLES2GetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) { gles2::GetGLContext()->GetShaderInfoLog(shader, bufsize, length, infolog); } -void GLES2GetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { +void GLES2GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision) { gles2::GetGLContext()->GetShaderPrecisionFormat( shadertype, precisiontype, range, precision); } -void GLES2GetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { +void GLES2GetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) { gles2::GetGLContext()->GetShaderSource(shader, bufsize, length, source); } const GLubyte* GLES2GetString(GLenum name) { @@ -314,9 +351,7 @@ GLboolean GLES2IsShader(GLuint shader) { GLboolean GLES2IsTexture(GLuint texture) { return gles2::GetGLContext()->IsTexture(texture); } -void GLES2LineWidth(GLfloat width) { - gles2::GetGLContext()->LineWidth(width); -} +void GLES2LineWidth(GLfloat width) { gles2::GetGLContext()->LineWidth(width); } void GLES2LinkProgram(GLuint program) { gles2::GetGLContext()->LinkProgram(program); } @@ -326,16 +361,22 @@ void GLES2PixelStorei(GLenum pname, GLint param) { void GLES2PolygonOffset(GLfloat factor, GLfloat units) { gles2::GetGLContext()->PolygonOffset(factor, units); } -void GLES2ReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - void* pixels) { +void GLES2ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels) { gles2::GetGLContext()->ReadPixels(x, y, width, height, format, type, pixels); } void GLES2ReleaseShaderCompiler() { gles2::GetGLContext()->ReleaseShaderCompiler(); } -void GLES2RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { +void GLES2RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) { gles2::GetGLContext()->RenderbufferStorage( target, internalformat, width, height); } @@ -345,15 +386,17 @@ void GLES2SampleCoverage(GLclampf value, GLboolean invert) { void GLES2Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { gles2::GetGLContext()->Scissor(x, y, width, height); } -void GLES2ShaderBinary( - GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, - GLsizei length) { - gles2::GetGLContext()->ShaderBinary( - n, shaders, binaryformat, binary, length); -} -void GLES2ShaderSource( - GLuint shader, GLsizei count, const GLchar* const* str, - const GLint* length) { +void GLES2ShaderBinary(GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length) { + gles2::GetGLContext()->ShaderBinary(n, shaders, binaryformat, binary, length); +} +void GLES2ShaderSource(GLuint shader, + GLsizei count, + const GLchar* const* str, + const GLint* length) { gles2::GetGLContext()->ShaderSource(shader, count, str, length); } void GLES2ShallowFinishCHROMIUM() { @@ -365,30 +408,43 @@ void GLES2ShallowFlushCHROMIUM() { void GLES2StencilFunc(GLenum func, GLint ref, GLuint mask) { gles2::GetGLContext()->StencilFunc(func, ref, mask); } -void GLES2StencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) { +void GLES2StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask) { gles2::GetGLContext()->StencilFuncSeparate(face, func, ref, mask); } -void GLES2StencilMask(GLuint mask) { - gles2::GetGLContext()->StencilMask(mask); -} +void GLES2StencilMask(GLuint mask) { gles2::GetGLContext()->StencilMask(mask); } void GLES2StencilMaskSeparate(GLenum face, GLuint mask) { gles2::GetGLContext()->StencilMaskSeparate(face, mask); } void GLES2StencilOp(GLenum fail, GLenum zfail, GLenum zpass) { gles2::GetGLContext()->StencilOp(fail, zfail, zpass); } -void GLES2StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { +void GLES2StencilOpSeparate(GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass) { gles2::GetGLContext()->StencilOpSeparate(face, fail, zfail, zpass); } -void GLES2TexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) { - gles2::GetGLContext()->TexImage2D( - target, level, internalformat, width, height, border, format, type, - pixels); +void GLES2TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) { + gles2::GetGLContext()->TexImage2D(target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } void GLES2TexParameterf(GLenum target, GLenum pname, GLfloat param) { gles2::GetGLContext()->TexParameterf(target, pname, param); @@ -402,9 +458,15 @@ void GLES2TexParameteri(GLenum target, GLenum pname, GLint param) { void GLES2TexParameteriv(GLenum target, GLenum pname, const GLint* params) { gles2::GetGLContext()->TexParameteriv(target, pname, params); } -void GLES2TexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) { +void GLES2TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels) { gles2::GetGLContext()->TexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels); } @@ -444,8 +506,11 @@ void GLES2Uniform3i(GLint location, GLint x, GLint y, GLint z) { void GLES2Uniform3iv(GLint location, GLsizei count, const GLint* v) { gles2::GetGLContext()->Uniform3iv(location, count, v); } -void GLES2Uniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GLES2Uniform4f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) { gles2::GetGLContext()->Uniform4f(location, x, y, z, w); } void GLES2Uniform4fv(GLint location, GLsizei count, const GLfloat* v) { @@ -457,16 +522,22 @@ void GLES2Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { void GLES2Uniform4iv(GLint location, GLsizei count, const GLint* v) { gles2::GetGLContext()->Uniform4iv(location, count, v); } -void GLES2UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { gles2::GetGLContext()->UniformMatrix2fv(location, count, transpose, value); } -void GLES2UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { gles2::GetGLContext()->UniformMatrix3fv(location, count, transpose, value); } -void GLES2UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { gles2::GetGLContext()->UniformMatrix4fv(location, count, transpose, value); } void GLES2UseProgram(GLuint program) { @@ -493,49 +564,71 @@ void GLES2VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { void GLES2VertexAttrib3fv(GLuint indx, const GLfloat* values) { gles2::GetGLContext()->VertexAttrib3fv(indx, values); } -void GLES2VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GLES2VertexAttrib4f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) { gles2::GetGLContext()->VertexAttrib4f(indx, x, y, z, w); } void GLES2VertexAttrib4fv(GLuint indx, const GLfloat* values) { gles2::GetGLContext()->VertexAttrib4fv(indx, values); } -void GLES2VertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, - const void* ptr) { +void GLES2VertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr) { gles2::GetGLContext()->VertexAttribPointer( indx, size, type, normalized, stride, ptr); } void GLES2Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { gles2::GetGLContext()->Viewport(x, y, width, height); } -void GLES2BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { +void GLES2BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) { gles2::GetGLContext()->BlitFramebufferCHROMIUM( srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } -void GLES2RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) { +void GLES2RenderbufferStorageMultisampleCHROMIUM(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) { gles2::GetGLContext()->RenderbufferStorageMultisampleCHROMIUM( target, samples, internalformat, width, height); } -void GLES2RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) { +void GLES2RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) { gles2::GetGLContext()->RenderbufferStorageMultisampleEXT( target, samples, internalformat, width, height); } -void GLES2FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) { +void GLES2FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) { gles2::GetGLContext()->FramebufferTexture2DMultisampleEXT( target, attachment, textarget, texture, level, samples); } -void GLES2TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) { +void GLES2TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) { gles2::GetGLContext()->TexStorage2DEXT( target, levels, internalFormat, width, height); } @@ -566,9 +659,7 @@ void GLES2InsertEventMarkerEXT(GLsizei length, const GLchar* marker) { void GLES2PushGroupMarkerEXT(GLsizei length, const GLchar* marker) { gles2::GetGLContext()->PushGroupMarkerEXT(length, marker); } -void GLES2PopGroupMarkerEXT() { - gles2::GetGLContext()->PopGroupMarkerEXT(); -} +void GLES2PopGroupMarkerEXT() { gles2::GetGLContext()->PopGroupMarkerEXT(); } void GLES2GenVertexArraysOES(GLsizei n, GLuint* arrays) { gles2::GetGLContext()->GenVertexArraysOES(n, arrays); } @@ -581,24 +672,28 @@ GLboolean GLES2IsVertexArrayOES(GLuint array) { void GLES2BindVertexArrayOES(GLuint array) { gles2::GetGLContext()->BindVertexArrayOES(array); } -void GLES2SwapBuffers() { - gles2::GetGLContext()->SwapBuffers(); -} -GLuint GLES2GetMaxValueInBufferCHROMIUM( - GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) { +void GLES2SwapBuffers() { gles2::GetGLContext()->SwapBuffers(); } +GLuint GLES2GetMaxValueInBufferCHROMIUM(GLuint buffer_id, + GLsizei count, + GLenum type, + GLuint offset) { return gles2::GetGLContext()->GetMaxValueInBufferCHROMIUM( buffer_id, count, type, offset); } -void GLES2GenSharedIdsCHROMIUM( - GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) { +void GLES2GenSharedIdsCHROMIUM(GLuint namespace_id, + GLuint id_offset, + GLsizei n, + GLuint* ids) { gles2::GetGLContext()->GenSharedIdsCHROMIUM(namespace_id, id_offset, n, ids); } -void GLES2DeleteSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) { +void GLES2DeleteSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) { gles2::GetGLContext()->DeleteSharedIdsCHROMIUM(namespace_id, n, ids); } -void GLES2RegisterSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) { +void GLES2RegisterSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) { gles2::GetGLContext()->RegisterSharedIdsCHROMIUM(namespace_id, n, ids); } GLboolean GLES2EnableFeatureCHROMIUM(const char* feature) { @@ -616,17 +711,25 @@ void* GLES2MapImageCHROMIUM(GLuint image_id, GLenum access) { void GLES2UnmapImageCHROMIUM(GLuint image_id) { gles2::GetGLContext()->UnmapImageCHROMIUM(image_id); } -void* GLES2MapBufferSubDataCHROMIUM( - GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) { +void* GLES2MapBufferSubDataCHROMIUM(GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access) { return gles2::GetGLContext()->MapBufferSubDataCHROMIUM( target, offset, size, access); } void GLES2UnmapBufferSubDataCHROMIUM(const void* mem) { gles2::GetGLContext()->UnmapBufferSubDataCHROMIUM(mem); } -void* GLES2MapTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLenum access) { +void* GLES2MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) { return gles2::GetGLContext()->MapTexSubImage2DCHROMIUM( target, level, xoffset, yoffset, width, height, format, type, access); } @@ -645,58 +748,75 @@ void GLES2RequestExtensionCHROMIUM(const char* extension) { void GLES2RateLimitOffscreenContextCHROMIUM() { gles2::GetGLContext()->RateLimitOffscreenContextCHROMIUM(); } -void GLES2GetMultipleIntegervCHROMIUM( - const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size) { +void GLES2GetMultipleIntegervCHROMIUM(const GLenum* pnames, + GLuint count, + GLint* results, + GLsizeiptr size) { gles2::GetGLContext()->GetMultipleIntegervCHROMIUM( pnames, count, results, size); } -void GLES2GetProgramInfoCHROMIUM( - GLuint program, GLsizei bufsize, GLsizei* size, void* info) { +void GLES2GetProgramInfoCHROMIUM(GLuint program, + GLsizei bufsize, + GLsizei* size, + void* info) { gles2::GetGLContext()->GetProgramInfoCHROMIUM(program, bufsize, size, info); } GLuint GLES2CreateStreamTextureCHROMIUM(GLuint texture) { return gles2::GetGLContext()->CreateStreamTextureCHROMIUM(texture); } -GLuint GLES2CreateImageCHROMIUM( - GLsizei width, GLsizei height, GLenum internalformat) { +GLuint GLES2CreateImageCHROMIUM(GLsizei width, + GLsizei height, + GLenum internalformat) { return gles2::GetGLContext()->CreateImageCHROMIUM( width, height, internalformat); } void GLES2DestroyImageCHROMIUM(GLuint image_id) { gles2::GetGLContext()->DestroyImageCHROMIUM(image_id); } -void GLES2GetImageParameterivCHROMIUM( - GLuint image_id, GLenum pname, GLint* params) { +void GLES2GetImageParameterivCHROMIUM(GLuint image_id, + GLenum pname, + GLint* params) { gles2::GetGLContext()->GetImageParameterivCHROMIUM(image_id, pname, params); } -void GLES2GetTranslatedShaderSourceANGLE( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { +void GLES2GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) { gles2::GetGLContext()->GetTranslatedShaderSourceANGLE( shader, bufsize, length, source); } void GLES2PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) { gles2::GetGLContext()->PostSubBufferCHROMIUM(x, y, width, height); } -void GLES2TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) { +void GLES2TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) { gles2::GetGLContext()->TexImageIOSurface2DCHROMIUM( target, width, height, ioSurfaceId, plane); } -void GLES2CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) { +void GLES2CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) { gles2::GetGLContext()->CopyTextureCHROMIUM( target, source_id, dest_id, level, internalformat, dest_type); } -void GLES2DrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) { +void GLES2DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) { gles2::GetGLContext()->DrawArraysInstancedANGLE( mode, first, count, primcount); } -void GLES2DrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, const void* indices, - GLsizei primcount) { +void GLES2DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount) { gles2::GetGLContext()->DrawElementsInstancedANGLE( mode, count, type, indices, primcount); } @@ -712,8 +832,9 @@ void GLES2ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) { void GLES2ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) { gles2::GetGLContext()->ConsumeTextureCHROMIUM(target, mailbox); } -void GLES2BindUniformLocationCHROMIUM( - GLuint program, GLint location, const char* name) { +void GLES2BindUniformLocationCHROMIUM(GLuint program, + GLint location, + const char* name) { gles2::GetGLContext()->BindUniformLocationCHROMIUM(program, location, name); } void GLES2BindTexImage2DCHROMIUM(GLenum target, GLint imageId) { @@ -725,28 +846,44 @@ void GLES2ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) { void GLES2TraceBeginCHROMIUM(const char* name) { gles2::GetGLContext()->TraceBeginCHROMIUM(name); } -void GLES2TraceEndCHROMIUM() { - gles2::GetGLContext()->TraceEndCHROMIUM(); -} -void GLES2AsyncTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* data) { +void GLES2TraceEndCHROMIUM() { gles2::GetGLContext()->TraceEndCHROMIUM(); } +void GLES2AsyncTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* data) { gles2::GetGLContext()->AsyncTexSubImage2DCHROMIUM( target, level, xoffset, yoffset, width, height, format, type, data); } -void GLES2AsyncTexImage2DCHROMIUM( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) { - gles2::GetGLContext()->AsyncTexImage2DCHROMIUM( - target, level, internalformat, width, height, border, format, type, - pixels); +void GLES2AsyncTexImage2DCHROMIUM(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) { + gles2::GetGLContext()->AsyncTexImage2DCHROMIUM(target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } void GLES2WaitAsyncTexImage2DCHROMIUM(GLenum target) { gles2::GetGLContext()->WaitAsyncTexImage2DCHROMIUM(target); } -void GLES2DiscardFramebufferEXT( - GLenum target, GLsizei count, const GLenum* attachments) { +void GLES2DiscardFramebufferEXT(GLenum target, + GLsizei count, + const GLenum* attachments) { gles2::GetGLContext()->DiscardFramebufferEXT(target, count, attachments); } void GLES2LoseContextCHROMIUM(GLenum current, GLenum other) { @@ -768,362 +905,373 @@ void GLES2DiscardBackbufferCHROMIUM() { namespace gles2 { extern const NameToFunc g_gles2_function_table[] = { - { "glActiveTexture", reinterpret_cast<GLES2FunctionPointer>( - glActiveTexture), }, - { "glAttachShader", reinterpret_cast<GLES2FunctionPointer>( - glAttachShader), }, - { "glBindAttribLocation", reinterpret_cast<GLES2FunctionPointer>( - glBindAttribLocation), }, - { "glBindBuffer", reinterpret_cast<GLES2FunctionPointer>(glBindBuffer), }, - { "glBindFramebuffer", reinterpret_cast<GLES2FunctionPointer>( - glBindFramebuffer), }, - { "glBindRenderbuffer", reinterpret_cast<GLES2FunctionPointer>( - glBindRenderbuffer), }, - { "glBindTexture", reinterpret_cast<GLES2FunctionPointer>(glBindTexture), }, - { "glBlendColor", reinterpret_cast<GLES2FunctionPointer>(glBlendColor), }, - { "glBlendEquation", reinterpret_cast<GLES2FunctionPointer>( - glBlendEquation), }, - { "glBlendEquationSeparate", reinterpret_cast<GLES2FunctionPointer>( - glBlendEquationSeparate), }, - { "glBlendFunc", reinterpret_cast<GLES2FunctionPointer>(glBlendFunc), }, - { "glBlendFuncSeparate", reinterpret_cast<GLES2FunctionPointer>( - glBlendFuncSeparate), }, - { "glBufferData", reinterpret_cast<GLES2FunctionPointer>(glBufferData), }, - { "glBufferSubData", reinterpret_cast<GLES2FunctionPointer>( - glBufferSubData), }, - { "glCheckFramebufferStatus", reinterpret_cast<GLES2FunctionPointer>( - glCheckFramebufferStatus), }, - { "glClear", reinterpret_cast<GLES2FunctionPointer>(glClear), }, - { "glClearColor", reinterpret_cast<GLES2FunctionPointer>(glClearColor), }, - { "glClearDepthf", reinterpret_cast<GLES2FunctionPointer>(glClearDepthf), }, - { "glClearStencil", reinterpret_cast<GLES2FunctionPointer>( - glClearStencil), }, - { "glColorMask", reinterpret_cast<GLES2FunctionPointer>(glColorMask), }, - { "glCompileShader", reinterpret_cast<GLES2FunctionPointer>( - glCompileShader), }, - { "glCompressedTexImage2D", reinterpret_cast<GLES2FunctionPointer>( - glCompressedTexImage2D), }, - { "glCompressedTexSubImage2D", reinterpret_cast<GLES2FunctionPointer>( - glCompressedTexSubImage2D), }, - { "glCopyTexImage2D", reinterpret_cast<GLES2FunctionPointer>( - glCopyTexImage2D), }, - { "glCopyTexSubImage2D", reinterpret_cast<GLES2FunctionPointer>( - glCopyTexSubImage2D), }, - { "glCreateProgram", reinterpret_cast<GLES2FunctionPointer>( - glCreateProgram), }, - { "glCreateShader", reinterpret_cast<GLES2FunctionPointer>( - glCreateShader), }, - { "glCullFace", reinterpret_cast<GLES2FunctionPointer>(glCullFace), }, - { "glDeleteBuffers", reinterpret_cast<GLES2FunctionPointer>( - glDeleteBuffers), }, - { "glDeleteFramebuffers", reinterpret_cast<GLES2FunctionPointer>( - glDeleteFramebuffers), }, - { "glDeleteProgram", reinterpret_cast<GLES2FunctionPointer>( - glDeleteProgram), }, - { "glDeleteRenderbuffers", reinterpret_cast<GLES2FunctionPointer>( - glDeleteRenderbuffers), }, - { "glDeleteShader", reinterpret_cast<GLES2FunctionPointer>( - glDeleteShader), }, - { "glDeleteTextures", reinterpret_cast<GLES2FunctionPointer>( - glDeleteTextures), }, - { "glDepthFunc", reinterpret_cast<GLES2FunctionPointer>(glDepthFunc), }, - { "glDepthMask", reinterpret_cast<GLES2FunctionPointer>(glDepthMask), }, - { "glDepthRangef", reinterpret_cast<GLES2FunctionPointer>(glDepthRangef), }, - { "glDetachShader", reinterpret_cast<GLES2FunctionPointer>( - glDetachShader), }, - { "glDisable", reinterpret_cast<GLES2FunctionPointer>(glDisable), }, - { "glDisableVertexAttribArray", reinterpret_cast<GLES2FunctionPointer>( - glDisableVertexAttribArray), }, - { "glDrawArrays", reinterpret_cast<GLES2FunctionPointer>(glDrawArrays), }, - { "glDrawElements", reinterpret_cast<GLES2FunctionPointer>( - glDrawElements), }, - { "glEnable", reinterpret_cast<GLES2FunctionPointer>(glEnable), }, - { "glEnableVertexAttribArray", reinterpret_cast<GLES2FunctionPointer>( - glEnableVertexAttribArray), }, - { "glFinish", reinterpret_cast<GLES2FunctionPointer>(glFinish), }, - { "glFlush", reinterpret_cast<GLES2FunctionPointer>(glFlush), }, - { "glFramebufferRenderbuffer", reinterpret_cast<GLES2FunctionPointer>( - glFramebufferRenderbuffer), }, - { "glFramebufferTexture2D", reinterpret_cast<GLES2FunctionPointer>( - glFramebufferTexture2D), }, - { "glFrontFace", reinterpret_cast<GLES2FunctionPointer>(glFrontFace), }, - { "glGenBuffers", reinterpret_cast<GLES2FunctionPointer>(glGenBuffers), }, - { "glGenerateMipmap", reinterpret_cast<GLES2FunctionPointer>( - glGenerateMipmap), }, - { "glGenFramebuffers", reinterpret_cast<GLES2FunctionPointer>( - glGenFramebuffers), }, - { "glGenRenderbuffers", reinterpret_cast<GLES2FunctionPointer>( - glGenRenderbuffers), }, - { "glGenTextures", reinterpret_cast<GLES2FunctionPointer>(glGenTextures), }, - { "glGetActiveAttrib", reinterpret_cast<GLES2FunctionPointer>( - glGetActiveAttrib), }, - { "glGetActiveUniform", reinterpret_cast<GLES2FunctionPointer>( - glGetActiveUniform), }, - { "glGetAttachedShaders", reinterpret_cast<GLES2FunctionPointer>( - glGetAttachedShaders), }, - { "glGetAttribLocation", reinterpret_cast<GLES2FunctionPointer>( - glGetAttribLocation), }, - { "glGetBooleanv", reinterpret_cast<GLES2FunctionPointer>(glGetBooleanv), }, - { "glGetBufferParameteriv", reinterpret_cast<GLES2FunctionPointer>( - glGetBufferParameteriv), }, - { "glGetError", reinterpret_cast<GLES2FunctionPointer>(glGetError), }, - { "glGetFloatv", reinterpret_cast<GLES2FunctionPointer>(glGetFloatv), }, - { "glGetFramebufferAttachmentParameteriv", reinterpret_cast<GLES2FunctionPointer>(glGetFramebufferAttachmentParameteriv), }, // NOLINT - { "glGetIntegerv", reinterpret_cast<GLES2FunctionPointer>(glGetIntegerv), }, - { "glGetProgramiv", reinterpret_cast<GLES2FunctionPointer>( - glGetProgramiv), }, - { "glGetProgramInfoLog", reinterpret_cast<GLES2FunctionPointer>( - glGetProgramInfoLog), }, - { "glGetRenderbufferParameteriv", reinterpret_cast<GLES2FunctionPointer>( - glGetRenderbufferParameteriv), }, - { "glGetShaderiv", reinterpret_cast<GLES2FunctionPointer>(glGetShaderiv), }, - { "glGetShaderInfoLog", reinterpret_cast<GLES2FunctionPointer>( - glGetShaderInfoLog), }, - { "glGetShaderPrecisionFormat", reinterpret_cast<GLES2FunctionPointer>( - glGetShaderPrecisionFormat), }, - { "glGetShaderSource", reinterpret_cast<GLES2FunctionPointer>( - glGetShaderSource), }, - { "glGetString", reinterpret_cast<GLES2FunctionPointer>(glGetString), }, - { "glGetTexParameterfv", reinterpret_cast<GLES2FunctionPointer>( - glGetTexParameterfv), }, - { "glGetTexParameteriv", reinterpret_cast<GLES2FunctionPointer>( - glGetTexParameteriv), }, - { "glGetUniformfv", reinterpret_cast<GLES2FunctionPointer>( - glGetUniformfv), }, - { "glGetUniformiv", reinterpret_cast<GLES2FunctionPointer>( - glGetUniformiv), }, - { "glGetUniformLocation", reinterpret_cast<GLES2FunctionPointer>( - glGetUniformLocation), }, - { "glGetVertexAttribfv", reinterpret_cast<GLES2FunctionPointer>( - glGetVertexAttribfv), }, - { "glGetVertexAttribiv", reinterpret_cast<GLES2FunctionPointer>( - glGetVertexAttribiv), }, - { "glGetVertexAttribPointerv", reinterpret_cast<GLES2FunctionPointer>( - glGetVertexAttribPointerv), }, - { "glHint", reinterpret_cast<GLES2FunctionPointer>(glHint), }, - { "glIsBuffer", reinterpret_cast<GLES2FunctionPointer>(glIsBuffer), }, - { "glIsEnabled", reinterpret_cast<GLES2FunctionPointer>(glIsEnabled), }, - { "glIsFramebuffer", reinterpret_cast<GLES2FunctionPointer>( - glIsFramebuffer), }, - { "glIsProgram", reinterpret_cast<GLES2FunctionPointer>(glIsProgram), }, - { "glIsRenderbuffer", reinterpret_cast<GLES2FunctionPointer>( - glIsRenderbuffer), }, - { "glIsShader", reinterpret_cast<GLES2FunctionPointer>(glIsShader), }, - { "glIsTexture", reinterpret_cast<GLES2FunctionPointer>(glIsTexture), }, - { "glLineWidth", reinterpret_cast<GLES2FunctionPointer>(glLineWidth), }, - { "glLinkProgram", reinterpret_cast<GLES2FunctionPointer>(glLinkProgram), }, - { "glPixelStorei", reinterpret_cast<GLES2FunctionPointer>(glPixelStorei), }, - { "glPolygonOffset", reinterpret_cast<GLES2FunctionPointer>( - glPolygonOffset), }, - { "glReadPixels", reinterpret_cast<GLES2FunctionPointer>(glReadPixels), }, - { "glReleaseShaderCompiler", reinterpret_cast<GLES2FunctionPointer>( - glReleaseShaderCompiler), }, - { "glRenderbufferStorage", reinterpret_cast<GLES2FunctionPointer>( - glRenderbufferStorage), }, - { "glSampleCoverage", reinterpret_cast<GLES2FunctionPointer>( - glSampleCoverage), }, - { "glScissor", reinterpret_cast<GLES2FunctionPointer>(glScissor), }, - { "glShaderBinary", reinterpret_cast<GLES2FunctionPointer>( - glShaderBinary), }, - { "glShaderSource", reinterpret_cast<GLES2FunctionPointer>( - glShaderSource), }, - { "glShallowFinishCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glShallowFinishCHROMIUM), }, - { "glShallowFlushCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glShallowFlushCHROMIUM), }, - { "glStencilFunc", reinterpret_cast<GLES2FunctionPointer>(glStencilFunc), }, - { "glStencilFuncSeparate", reinterpret_cast<GLES2FunctionPointer>( - glStencilFuncSeparate), }, - { "glStencilMask", reinterpret_cast<GLES2FunctionPointer>(glStencilMask), }, - { "glStencilMaskSeparate", reinterpret_cast<GLES2FunctionPointer>( - glStencilMaskSeparate), }, - { "glStencilOp", reinterpret_cast<GLES2FunctionPointer>(glStencilOp), }, - { "glStencilOpSeparate", reinterpret_cast<GLES2FunctionPointer>( - glStencilOpSeparate), }, - { "glTexImage2D", reinterpret_cast<GLES2FunctionPointer>(glTexImage2D), }, - { "glTexParameterf", reinterpret_cast<GLES2FunctionPointer>( - glTexParameterf), }, - { "glTexParameterfv", reinterpret_cast<GLES2FunctionPointer>( - glTexParameterfv), }, - { "glTexParameteri", reinterpret_cast<GLES2FunctionPointer>( - glTexParameteri), }, - { "glTexParameteriv", reinterpret_cast<GLES2FunctionPointer>( - glTexParameteriv), }, - { "glTexSubImage2D", reinterpret_cast<GLES2FunctionPointer>( - glTexSubImage2D), }, - { "glUniform1f", reinterpret_cast<GLES2FunctionPointer>(glUniform1f), }, - { "glUniform1fv", reinterpret_cast<GLES2FunctionPointer>(glUniform1fv), }, - { "glUniform1i", reinterpret_cast<GLES2FunctionPointer>(glUniform1i), }, - { "glUniform1iv", reinterpret_cast<GLES2FunctionPointer>(glUniform1iv), }, - { "glUniform2f", reinterpret_cast<GLES2FunctionPointer>(glUniform2f), }, - { "glUniform2fv", reinterpret_cast<GLES2FunctionPointer>(glUniform2fv), }, - { "glUniform2i", reinterpret_cast<GLES2FunctionPointer>(glUniform2i), }, - { "glUniform2iv", reinterpret_cast<GLES2FunctionPointer>(glUniform2iv), }, - { "glUniform3f", reinterpret_cast<GLES2FunctionPointer>(glUniform3f), }, - { "glUniform3fv", reinterpret_cast<GLES2FunctionPointer>(glUniform3fv), }, - { "glUniform3i", reinterpret_cast<GLES2FunctionPointer>(glUniform3i), }, - { "glUniform3iv", reinterpret_cast<GLES2FunctionPointer>(glUniform3iv), }, - { "glUniform4f", reinterpret_cast<GLES2FunctionPointer>(glUniform4f), }, - { "glUniform4fv", reinterpret_cast<GLES2FunctionPointer>(glUniform4fv), }, - { "glUniform4i", reinterpret_cast<GLES2FunctionPointer>(glUniform4i), }, - { "glUniform4iv", reinterpret_cast<GLES2FunctionPointer>(glUniform4iv), }, - { "glUniformMatrix2fv", reinterpret_cast<GLES2FunctionPointer>( - glUniformMatrix2fv), }, - { "glUniformMatrix3fv", reinterpret_cast<GLES2FunctionPointer>( - glUniformMatrix3fv), }, - { "glUniformMatrix4fv", reinterpret_cast<GLES2FunctionPointer>( - glUniformMatrix4fv), }, - { "glUseProgram", reinterpret_cast<GLES2FunctionPointer>(glUseProgram), }, - { "glValidateProgram", reinterpret_cast<GLES2FunctionPointer>( - glValidateProgram), }, - { "glVertexAttrib1f", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib1f), }, - { "glVertexAttrib1fv", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib1fv), }, - { "glVertexAttrib2f", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib2f), }, - { "glVertexAttrib2fv", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib2fv), }, - { "glVertexAttrib3f", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib3f), }, - { "glVertexAttrib3fv", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib3fv), }, - { "glVertexAttrib4f", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib4f), }, - { "glVertexAttrib4fv", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttrib4fv), }, - { "glVertexAttribPointer", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttribPointer), }, - { "glViewport", reinterpret_cast<GLES2FunctionPointer>(glViewport), }, - { "glBlitFramebufferCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glBlitFramebufferCHROMIUM), }, - { "glRenderbufferStorageMultisampleCHROMIUM", reinterpret_cast<GLES2FunctionPointer>(glRenderbufferStorageMultisampleCHROMIUM), }, // NOLINT - { "glRenderbufferStorageMultisampleEXT", reinterpret_cast<GLES2FunctionPointer>(glRenderbufferStorageMultisampleEXT), }, // NOLINT - { "glFramebufferTexture2DMultisampleEXT", reinterpret_cast<GLES2FunctionPointer>(glFramebufferTexture2DMultisampleEXT), }, // NOLINT - { "glTexStorage2DEXT", reinterpret_cast<GLES2FunctionPointer>( - glTexStorage2DEXT), }, - { "glGenQueriesEXT", reinterpret_cast<GLES2FunctionPointer>( - glGenQueriesEXT), }, - { "glDeleteQueriesEXT", reinterpret_cast<GLES2FunctionPointer>( - glDeleteQueriesEXT), }, - { "glIsQueryEXT", reinterpret_cast<GLES2FunctionPointer>(glIsQueryEXT), }, - { "glBeginQueryEXT", reinterpret_cast<GLES2FunctionPointer>( - glBeginQueryEXT), }, - { "glEndQueryEXT", reinterpret_cast<GLES2FunctionPointer>(glEndQueryEXT), }, - { "glGetQueryivEXT", reinterpret_cast<GLES2FunctionPointer>( - glGetQueryivEXT), }, - { "glGetQueryObjectuivEXT", reinterpret_cast<GLES2FunctionPointer>( - glGetQueryObjectuivEXT), }, - { "glInsertEventMarkerEXT", reinterpret_cast<GLES2FunctionPointer>( - glInsertEventMarkerEXT), }, - { "glPushGroupMarkerEXT", reinterpret_cast<GLES2FunctionPointer>( - glPushGroupMarkerEXT), }, - { "glPopGroupMarkerEXT", reinterpret_cast<GLES2FunctionPointer>( - glPopGroupMarkerEXT), }, - { "glGenVertexArraysOES", reinterpret_cast<GLES2FunctionPointer>( - glGenVertexArraysOES), }, - { "glDeleteVertexArraysOES", reinterpret_cast<GLES2FunctionPointer>( - glDeleteVertexArraysOES), }, - { "glIsVertexArrayOES", reinterpret_cast<GLES2FunctionPointer>( - glIsVertexArrayOES), }, - { "glBindVertexArrayOES", reinterpret_cast<GLES2FunctionPointer>( - glBindVertexArrayOES), }, - { "glSwapBuffers", reinterpret_cast<GLES2FunctionPointer>(glSwapBuffers), }, - { "glGetMaxValueInBufferCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glGetMaxValueInBufferCHROMIUM), }, - { "glGenSharedIdsCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glGenSharedIdsCHROMIUM), }, - { "glDeleteSharedIdsCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glDeleteSharedIdsCHROMIUM), }, - { "glRegisterSharedIdsCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glRegisterSharedIdsCHROMIUM), }, - { "glEnableFeatureCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glEnableFeatureCHROMIUM), }, - { "glMapBufferCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glMapBufferCHROMIUM), }, - { "glUnmapBufferCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glUnmapBufferCHROMIUM), }, - { "glMapImageCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glMapImageCHROMIUM), }, - { "glUnmapImageCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glUnmapImageCHROMIUM), }, - { "glMapBufferSubDataCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glMapBufferSubDataCHROMIUM), }, - { "glUnmapBufferSubDataCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glUnmapBufferSubDataCHROMIUM), }, - { "glMapTexSubImage2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glMapTexSubImage2DCHROMIUM), }, - { "glUnmapTexSubImage2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glUnmapTexSubImage2DCHROMIUM), }, - { "glResizeCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glResizeCHROMIUM), }, - { "glGetRequestableExtensionsCHROMIUM", reinterpret_cast<GLES2FunctionPointer>(glGetRequestableExtensionsCHROMIUM), }, // NOLINT - { "glRequestExtensionCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glRequestExtensionCHROMIUM), }, - { "glRateLimitOffscreenContextCHROMIUM", reinterpret_cast<GLES2FunctionPointer>(glRateLimitOffscreenContextCHROMIUM), }, // NOLINT - { "glGetMultipleIntegervCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glGetMultipleIntegervCHROMIUM), }, - { "glGetProgramInfoCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glGetProgramInfoCHROMIUM), }, - { "glCreateStreamTextureCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glCreateStreamTextureCHROMIUM), }, - { "glCreateImageCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glCreateImageCHROMIUM), }, - { "glDestroyImageCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glDestroyImageCHROMIUM), }, - { "glGetImageParameterivCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glGetImageParameterivCHROMIUM), }, - { "glGetTranslatedShaderSourceANGLE", reinterpret_cast<GLES2FunctionPointer>( - glGetTranslatedShaderSourceANGLE), }, - { "glPostSubBufferCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glPostSubBufferCHROMIUM), }, - { "glTexImageIOSurface2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glTexImageIOSurface2DCHROMIUM), }, - { "glCopyTextureCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glCopyTextureCHROMIUM), }, - { "glDrawArraysInstancedANGLE", reinterpret_cast<GLES2FunctionPointer>( - glDrawArraysInstancedANGLE), }, - { "glDrawElementsInstancedANGLE", reinterpret_cast<GLES2FunctionPointer>( - glDrawElementsInstancedANGLE), }, - { "glVertexAttribDivisorANGLE", reinterpret_cast<GLES2FunctionPointer>( - glVertexAttribDivisorANGLE), }, - { "glGenMailboxCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glGenMailboxCHROMIUM), }, - { "glProduceTextureCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glProduceTextureCHROMIUM), }, - { "glConsumeTextureCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glConsumeTextureCHROMIUM), }, - { "glBindUniformLocationCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glBindUniformLocationCHROMIUM), }, - { "glBindTexImage2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glBindTexImage2DCHROMIUM), }, - { "glReleaseTexImage2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glReleaseTexImage2DCHROMIUM), }, - { "glTraceBeginCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glTraceBeginCHROMIUM), }, - { "glTraceEndCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glTraceEndCHROMIUM), }, - { "glAsyncTexSubImage2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glAsyncTexSubImage2DCHROMIUM), }, - { "glAsyncTexImage2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glAsyncTexImage2DCHROMIUM), }, - { "glWaitAsyncTexImage2DCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glWaitAsyncTexImage2DCHROMIUM), }, - { "glDiscardFramebufferEXT", reinterpret_cast<GLES2FunctionPointer>( - glDiscardFramebufferEXT), }, - { "glLoseContextCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glLoseContextCHROMIUM), }, - { "glInsertSyncPointCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glInsertSyncPointCHROMIUM), }, - { "glWaitSyncPointCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glWaitSyncPointCHROMIUM), }, - { "glDrawBuffersEXT", reinterpret_cast<GLES2FunctionPointer>( - glDrawBuffersEXT), }, - { "glDiscardBackbufferCHROMIUM", reinterpret_cast<GLES2FunctionPointer>( - glDiscardBackbufferCHROMIUM), }, - { NULL, NULL, }, -}; + {"glActiveTexture", + reinterpret_cast<GLES2FunctionPointer>(glActiveTexture), }, + {"glAttachShader", + reinterpret_cast<GLES2FunctionPointer>(glAttachShader), }, + {"glBindAttribLocation", + reinterpret_cast<GLES2FunctionPointer>(glBindAttribLocation), }, + {"glBindBuffer", reinterpret_cast<GLES2FunctionPointer>(glBindBuffer), }, + {"glBindFramebuffer", + reinterpret_cast<GLES2FunctionPointer>(glBindFramebuffer), }, + {"glBindRenderbuffer", + reinterpret_cast<GLES2FunctionPointer>(glBindRenderbuffer), }, + {"glBindTexture", reinterpret_cast<GLES2FunctionPointer>(glBindTexture), }, + {"glBlendColor", reinterpret_cast<GLES2FunctionPointer>(glBlendColor), }, + {"glBlendEquation", + reinterpret_cast<GLES2FunctionPointer>(glBlendEquation), }, + {"glBlendEquationSeparate", + reinterpret_cast<GLES2FunctionPointer>(glBlendEquationSeparate), }, + {"glBlendFunc", reinterpret_cast<GLES2FunctionPointer>(glBlendFunc), }, + {"glBlendFuncSeparate", + reinterpret_cast<GLES2FunctionPointer>(glBlendFuncSeparate), }, + {"glBufferData", reinterpret_cast<GLES2FunctionPointer>(glBufferData), }, + {"glBufferSubData", + reinterpret_cast<GLES2FunctionPointer>(glBufferSubData), }, + {"glCheckFramebufferStatus", + reinterpret_cast<GLES2FunctionPointer>(glCheckFramebufferStatus), }, + {"glClear", reinterpret_cast<GLES2FunctionPointer>(glClear), }, + {"glClearColor", reinterpret_cast<GLES2FunctionPointer>(glClearColor), }, + {"glClearDepthf", reinterpret_cast<GLES2FunctionPointer>(glClearDepthf), }, + {"glClearStencil", + reinterpret_cast<GLES2FunctionPointer>(glClearStencil), }, + {"glColorMask", reinterpret_cast<GLES2FunctionPointer>(glColorMask), }, + {"glCompileShader", + reinterpret_cast<GLES2FunctionPointer>(glCompileShader), }, + {"glCompressedTexImage2D", + reinterpret_cast<GLES2FunctionPointer>(glCompressedTexImage2D), }, + {"glCompressedTexSubImage2D", + reinterpret_cast<GLES2FunctionPointer>(glCompressedTexSubImage2D), }, + {"glCopyTexImage2D", + reinterpret_cast<GLES2FunctionPointer>(glCopyTexImage2D), }, + {"glCopyTexSubImage2D", + reinterpret_cast<GLES2FunctionPointer>(glCopyTexSubImage2D), }, + {"glCreateProgram", + reinterpret_cast<GLES2FunctionPointer>(glCreateProgram), }, + {"glCreateShader", + reinterpret_cast<GLES2FunctionPointer>(glCreateShader), }, + {"glCullFace", reinterpret_cast<GLES2FunctionPointer>(glCullFace), }, + {"glDeleteBuffers", + reinterpret_cast<GLES2FunctionPointer>(glDeleteBuffers), }, + {"glDeleteFramebuffers", + reinterpret_cast<GLES2FunctionPointer>(glDeleteFramebuffers), }, + {"glDeleteProgram", + reinterpret_cast<GLES2FunctionPointer>(glDeleteProgram), }, + {"glDeleteRenderbuffers", + reinterpret_cast<GLES2FunctionPointer>(glDeleteRenderbuffers), }, + {"glDeleteShader", + reinterpret_cast<GLES2FunctionPointer>(glDeleteShader), }, + {"glDeleteTextures", + reinterpret_cast<GLES2FunctionPointer>(glDeleteTextures), }, + {"glDepthFunc", reinterpret_cast<GLES2FunctionPointer>(glDepthFunc), }, + {"glDepthMask", reinterpret_cast<GLES2FunctionPointer>(glDepthMask), }, + {"glDepthRangef", reinterpret_cast<GLES2FunctionPointer>(glDepthRangef), }, + {"glDetachShader", + reinterpret_cast<GLES2FunctionPointer>(glDetachShader), }, + {"glDisable", reinterpret_cast<GLES2FunctionPointer>(glDisable), }, + {"glDisableVertexAttribArray", + reinterpret_cast<GLES2FunctionPointer>(glDisableVertexAttribArray), }, + {"glDrawArrays", reinterpret_cast<GLES2FunctionPointer>(glDrawArrays), }, + {"glDrawElements", + reinterpret_cast<GLES2FunctionPointer>(glDrawElements), }, + {"glEnable", reinterpret_cast<GLES2FunctionPointer>(glEnable), }, + {"glEnableVertexAttribArray", + reinterpret_cast<GLES2FunctionPointer>(glEnableVertexAttribArray), }, + {"glFinish", reinterpret_cast<GLES2FunctionPointer>(glFinish), }, + {"glFlush", reinterpret_cast<GLES2FunctionPointer>(glFlush), }, + {"glFramebufferRenderbuffer", + reinterpret_cast<GLES2FunctionPointer>(glFramebufferRenderbuffer), }, + {"glFramebufferTexture2D", + reinterpret_cast<GLES2FunctionPointer>(glFramebufferTexture2D), }, + {"glFrontFace", reinterpret_cast<GLES2FunctionPointer>(glFrontFace), }, + {"glGenBuffers", reinterpret_cast<GLES2FunctionPointer>(glGenBuffers), }, + {"glGenerateMipmap", + reinterpret_cast<GLES2FunctionPointer>(glGenerateMipmap), }, + {"glGenFramebuffers", + reinterpret_cast<GLES2FunctionPointer>(glGenFramebuffers), }, + {"glGenRenderbuffers", + reinterpret_cast<GLES2FunctionPointer>(glGenRenderbuffers), }, + {"glGenTextures", reinterpret_cast<GLES2FunctionPointer>(glGenTextures), }, + {"glGetActiveAttrib", + reinterpret_cast<GLES2FunctionPointer>(glGetActiveAttrib), }, + {"glGetActiveUniform", + reinterpret_cast<GLES2FunctionPointer>(glGetActiveUniform), }, + {"glGetAttachedShaders", + reinterpret_cast<GLES2FunctionPointer>(glGetAttachedShaders), }, + {"glGetAttribLocation", + reinterpret_cast<GLES2FunctionPointer>(glGetAttribLocation), }, + {"glGetBooleanv", reinterpret_cast<GLES2FunctionPointer>(glGetBooleanv), }, + {"glGetBufferParameteriv", + reinterpret_cast<GLES2FunctionPointer>(glGetBufferParameteriv), }, + {"glGetError", reinterpret_cast<GLES2FunctionPointer>(glGetError), }, + {"glGetFloatv", reinterpret_cast<GLES2FunctionPointer>(glGetFloatv), }, + {"glGetFramebufferAttachmentParameteriv", + reinterpret_cast<GLES2FunctionPointer>( + glGetFramebufferAttachmentParameteriv), }, // NOLINT + {"glGetIntegerv", reinterpret_cast<GLES2FunctionPointer>(glGetIntegerv), }, + {"glGetProgramiv", + reinterpret_cast<GLES2FunctionPointer>(glGetProgramiv), }, + {"glGetProgramInfoLog", + reinterpret_cast<GLES2FunctionPointer>(glGetProgramInfoLog), }, + {"glGetRenderbufferParameteriv", + reinterpret_cast<GLES2FunctionPointer>(glGetRenderbufferParameteriv), }, + {"glGetShaderiv", reinterpret_cast<GLES2FunctionPointer>(glGetShaderiv), }, + {"glGetShaderInfoLog", + reinterpret_cast<GLES2FunctionPointer>(glGetShaderInfoLog), }, + {"glGetShaderPrecisionFormat", + reinterpret_cast<GLES2FunctionPointer>(glGetShaderPrecisionFormat), }, + {"glGetShaderSource", + reinterpret_cast<GLES2FunctionPointer>(glGetShaderSource), }, + {"glGetString", reinterpret_cast<GLES2FunctionPointer>(glGetString), }, + {"glGetTexParameterfv", + reinterpret_cast<GLES2FunctionPointer>(glGetTexParameterfv), }, + {"glGetTexParameteriv", + reinterpret_cast<GLES2FunctionPointer>(glGetTexParameteriv), }, + {"glGetUniformfv", + reinterpret_cast<GLES2FunctionPointer>(glGetUniformfv), }, + {"glGetUniformiv", + reinterpret_cast<GLES2FunctionPointer>(glGetUniformiv), }, + {"glGetUniformLocation", + reinterpret_cast<GLES2FunctionPointer>(glGetUniformLocation), }, + {"glGetVertexAttribfv", + reinterpret_cast<GLES2FunctionPointer>(glGetVertexAttribfv), }, + {"glGetVertexAttribiv", + reinterpret_cast<GLES2FunctionPointer>(glGetVertexAttribiv), }, + {"glGetVertexAttribPointerv", + reinterpret_cast<GLES2FunctionPointer>(glGetVertexAttribPointerv), }, + {"glHint", reinterpret_cast<GLES2FunctionPointer>(glHint), }, + {"glIsBuffer", reinterpret_cast<GLES2FunctionPointer>(glIsBuffer), }, + {"glIsEnabled", reinterpret_cast<GLES2FunctionPointer>(glIsEnabled), }, + {"glIsFramebuffer", + reinterpret_cast<GLES2FunctionPointer>(glIsFramebuffer), }, + {"glIsProgram", reinterpret_cast<GLES2FunctionPointer>(glIsProgram), }, + {"glIsRenderbuffer", + reinterpret_cast<GLES2FunctionPointer>(glIsRenderbuffer), }, + {"glIsShader", reinterpret_cast<GLES2FunctionPointer>(glIsShader), }, + {"glIsTexture", reinterpret_cast<GLES2FunctionPointer>(glIsTexture), }, + {"glLineWidth", reinterpret_cast<GLES2FunctionPointer>(glLineWidth), }, + {"glLinkProgram", reinterpret_cast<GLES2FunctionPointer>(glLinkProgram), }, + {"glPixelStorei", reinterpret_cast<GLES2FunctionPointer>(glPixelStorei), }, + {"glPolygonOffset", + reinterpret_cast<GLES2FunctionPointer>(glPolygonOffset), }, + {"glReadPixels", reinterpret_cast<GLES2FunctionPointer>(glReadPixels), }, + {"glReleaseShaderCompiler", + reinterpret_cast<GLES2FunctionPointer>(glReleaseShaderCompiler), }, + {"glRenderbufferStorage", + reinterpret_cast<GLES2FunctionPointer>(glRenderbufferStorage), }, + {"glSampleCoverage", + reinterpret_cast<GLES2FunctionPointer>(glSampleCoverage), }, + {"glScissor", reinterpret_cast<GLES2FunctionPointer>(glScissor), }, + {"glShaderBinary", + reinterpret_cast<GLES2FunctionPointer>(glShaderBinary), }, + {"glShaderSource", + reinterpret_cast<GLES2FunctionPointer>(glShaderSource), }, + {"glShallowFinishCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glShallowFinishCHROMIUM), }, + {"glShallowFlushCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glShallowFlushCHROMIUM), }, + {"glStencilFunc", reinterpret_cast<GLES2FunctionPointer>(glStencilFunc), }, + {"glStencilFuncSeparate", + reinterpret_cast<GLES2FunctionPointer>(glStencilFuncSeparate), }, + {"glStencilMask", reinterpret_cast<GLES2FunctionPointer>(glStencilMask), }, + {"glStencilMaskSeparate", + reinterpret_cast<GLES2FunctionPointer>(glStencilMaskSeparate), }, + {"glStencilOp", reinterpret_cast<GLES2FunctionPointer>(glStencilOp), }, + {"glStencilOpSeparate", + reinterpret_cast<GLES2FunctionPointer>(glStencilOpSeparate), }, + {"glTexImage2D", reinterpret_cast<GLES2FunctionPointer>(glTexImage2D), }, + {"glTexParameterf", + reinterpret_cast<GLES2FunctionPointer>(glTexParameterf), }, + {"glTexParameterfv", + reinterpret_cast<GLES2FunctionPointer>(glTexParameterfv), }, + {"glTexParameteri", + reinterpret_cast<GLES2FunctionPointer>(glTexParameteri), }, + {"glTexParameteriv", + reinterpret_cast<GLES2FunctionPointer>(glTexParameteriv), }, + {"glTexSubImage2D", + reinterpret_cast<GLES2FunctionPointer>(glTexSubImage2D), }, + {"glUniform1f", reinterpret_cast<GLES2FunctionPointer>(glUniform1f), }, + {"glUniform1fv", reinterpret_cast<GLES2FunctionPointer>(glUniform1fv), }, + {"glUniform1i", reinterpret_cast<GLES2FunctionPointer>(glUniform1i), }, + {"glUniform1iv", reinterpret_cast<GLES2FunctionPointer>(glUniform1iv), }, + {"glUniform2f", reinterpret_cast<GLES2FunctionPointer>(glUniform2f), }, + {"glUniform2fv", reinterpret_cast<GLES2FunctionPointer>(glUniform2fv), }, + {"glUniform2i", reinterpret_cast<GLES2FunctionPointer>(glUniform2i), }, + {"glUniform2iv", reinterpret_cast<GLES2FunctionPointer>(glUniform2iv), }, + {"glUniform3f", reinterpret_cast<GLES2FunctionPointer>(glUniform3f), }, + {"glUniform3fv", reinterpret_cast<GLES2FunctionPointer>(glUniform3fv), }, + {"glUniform3i", reinterpret_cast<GLES2FunctionPointer>(glUniform3i), }, + {"glUniform3iv", reinterpret_cast<GLES2FunctionPointer>(glUniform3iv), }, + {"glUniform4f", reinterpret_cast<GLES2FunctionPointer>(glUniform4f), }, + {"glUniform4fv", reinterpret_cast<GLES2FunctionPointer>(glUniform4fv), }, + {"glUniform4i", reinterpret_cast<GLES2FunctionPointer>(glUniform4i), }, + {"glUniform4iv", reinterpret_cast<GLES2FunctionPointer>(glUniform4iv), }, + {"glUniformMatrix2fv", + reinterpret_cast<GLES2FunctionPointer>(glUniformMatrix2fv), }, + {"glUniformMatrix3fv", + reinterpret_cast<GLES2FunctionPointer>(glUniformMatrix3fv), }, + {"glUniformMatrix4fv", + reinterpret_cast<GLES2FunctionPointer>(glUniformMatrix4fv), }, + {"glUseProgram", reinterpret_cast<GLES2FunctionPointer>(glUseProgram), }, + {"glValidateProgram", + reinterpret_cast<GLES2FunctionPointer>(glValidateProgram), }, + {"glVertexAttrib1f", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib1f), }, + {"glVertexAttrib1fv", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib1fv), }, + {"glVertexAttrib2f", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib2f), }, + {"glVertexAttrib2fv", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib2fv), }, + {"glVertexAttrib3f", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib3f), }, + {"glVertexAttrib3fv", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib3fv), }, + {"glVertexAttrib4f", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib4f), }, + {"glVertexAttrib4fv", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttrib4fv), }, + {"glVertexAttribPointer", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttribPointer), }, + {"glViewport", reinterpret_cast<GLES2FunctionPointer>(glViewport), }, + {"glBlitFramebufferCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glBlitFramebufferCHROMIUM), }, + {"glRenderbufferStorageMultisampleCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>( + glRenderbufferStorageMultisampleCHROMIUM), }, // NOLINT + {"glRenderbufferStorageMultisampleEXT", + reinterpret_cast<GLES2FunctionPointer>( + glRenderbufferStorageMultisampleEXT), }, // NOLINT + {"glFramebufferTexture2DMultisampleEXT", + reinterpret_cast<GLES2FunctionPointer>( + glFramebufferTexture2DMultisampleEXT), }, // NOLINT + {"glTexStorage2DEXT", + reinterpret_cast<GLES2FunctionPointer>(glTexStorage2DEXT), }, + {"glGenQueriesEXT", + reinterpret_cast<GLES2FunctionPointer>(glGenQueriesEXT), }, + {"glDeleteQueriesEXT", + reinterpret_cast<GLES2FunctionPointer>(glDeleteQueriesEXT), }, + {"glIsQueryEXT", reinterpret_cast<GLES2FunctionPointer>(glIsQueryEXT), }, + {"glBeginQueryEXT", + reinterpret_cast<GLES2FunctionPointer>(glBeginQueryEXT), }, + {"glEndQueryEXT", reinterpret_cast<GLES2FunctionPointer>(glEndQueryEXT), }, + {"glGetQueryivEXT", + reinterpret_cast<GLES2FunctionPointer>(glGetQueryivEXT), }, + {"glGetQueryObjectuivEXT", + reinterpret_cast<GLES2FunctionPointer>(glGetQueryObjectuivEXT), }, + {"glInsertEventMarkerEXT", + reinterpret_cast<GLES2FunctionPointer>(glInsertEventMarkerEXT), }, + {"glPushGroupMarkerEXT", + reinterpret_cast<GLES2FunctionPointer>(glPushGroupMarkerEXT), }, + {"glPopGroupMarkerEXT", + reinterpret_cast<GLES2FunctionPointer>(glPopGroupMarkerEXT), }, + {"glGenVertexArraysOES", + reinterpret_cast<GLES2FunctionPointer>(glGenVertexArraysOES), }, + {"glDeleteVertexArraysOES", + reinterpret_cast<GLES2FunctionPointer>(glDeleteVertexArraysOES), }, + {"glIsVertexArrayOES", + reinterpret_cast<GLES2FunctionPointer>(glIsVertexArrayOES), }, + {"glBindVertexArrayOES", + reinterpret_cast<GLES2FunctionPointer>(glBindVertexArrayOES), }, + {"glSwapBuffers", reinterpret_cast<GLES2FunctionPointer>(glSwapBuffers), }, + {"glGetMaxValueInBufferCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glGetMaxValueInBufferCHROMIUM), }, + {"glGenSharedIdsCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glGenSharedIdsCHROMIUM), }, + {"glDeleteSharedIdsCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glDeleteSharedIdsCHROMIUM), }, + {"glRegisterSharedIdsCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glRegisterSharedIdsCHROMIUM), }, + {"glEnableFeatureCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glEnableFeatureCHROMIUM), }, + {"glMapBufferCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glMapBufferCHROMIUM), }, + {"glUnmapBufferCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glUnmapBufferCHROMIUM), }, + {"glMapImageCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glMapImageCHROMIUM), }, + {"glUnmapImageCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glUnmapImageCHROMIUM), }, + {"glMapBufferSubDataCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glMapBufferSubDataCHROMIUM), }, + {"glUnmapBufferSubDataCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glUnmapBufferSubDataCHROMIUM), }, + {"glMapTexSubImage2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glMapTexSubImage2DCHROMIUM), }, + {"glUnmapTexSubImage2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glUnmapTexSubImage2DCHROMIUM), }, + {"glResizeCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glResizeCHROMIUM), }, + {"glGetRequestableExtensionsCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>( + glGetRequestableExtensionsCHROMIUM), }, // NOLINT + {"glRequestExtensionCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glRequestExtensionCHROMIUM), }, + {"glRateLimitOffscreenContextCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>( + glRateLimitOffscreenContextCHROMIUM), }, // NOLINT + {"glGetMultipleIntegervCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glGetMultipleIntegervCHROMIUM), }, + {"glGetProgramInfoCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glGetProgramInfoCHROMIUM), }, + {"glCreateStreamTextureCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glCreateStreamTextureCHROMIUM), }, + {"glCreateImageCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glCreateImageCHROMIUM), }, + {"glDestroyImageCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glDestroyImageCHROMIUM), }, + {"glGetImageParameterivCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glGetImageParameterivCHROMIUM), }, + {"glGetTranslatedShaderSourceANGLE", + reinterpret_cast<GLES2FunctionPointer>( + glGetTranslatedShaderSourceANGLE), }, + {"glPostSubBufferCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glPostSubBufferCHROMIUM), }, + {"glTexImageIOSurface2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glTexImageIOSurface2DCHROMIUM), }, + {"glCopyTextureCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glCopyTextureCHROMIUM), }, + {"glDrawArraysInstancedANGLE", + reinterpret_cast<GLES2FunctionPointer>(glDrawArraysInstancedANGLE), }, + {"glDrawElementsInstancedANGLE", + reinterpret_cast<GLES2FunctionPointer>(glDrawElementsInstancedANGLE), }, + {"glVertexAttribDivisorANGLE", + reinterpret_cast<GLES2FunctionPointer>(glVertexAttribDivisorANGLE), }, + {"glGenMailboxCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glGenMailboxCHROMIUM), }, + {"glProduceTextureCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glProduceTextureCHROMIUM), }, + {"glConsumeTextureCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glConsumeTextureCHROMIUM), }, + {"glBindUniformLocationCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glBindUniformLocationCHROMIUM), }, + {"glBindTexImage2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glBindTexImage2DCHROMIUM), }, + {"glReleaseTexImage2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glReleaseTexImage2DCHROMIUM), }, + {"glTraceBeginCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glTraceBeginCHROMIUM), }, + {"glTraceEndCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glTraceEndCHROMIUM), }, + {"glAsyncTexSubImage2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glAsyncTexSubImage2DCHROMIUM), }, + {"glAsyncTexImage2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glAsyncTexImage2DCHROMIUM), }, + {"glWaitAsyncTexImage2DCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glWaitAsyncTexImage2DCHROMIUM), }, + {"glDiscardFramebufferEXT", + reinterpret_cast<GLES2FunctionPointer>(glDiscardFramebufferEXT), }, + {"glLoseContextCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glLoseContextCHROMIUM), }, + {"glInsertSyncPointCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glInsertSyncPointCHROMIUM), }, + {"glWaitSyncPointCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glWaitSyncPointCHROMIUM), }, + {"glDrawBuffersEXT", + reinterpret_cast<GLES2FunctionPointer>(glDrawBuffersEXT), }, + {"glDiscardBackbufferCHROMIUM", + reinterpret_cast<GLES2FunctionPointer>(glDiscardBackbufferCHROMIUM), }, + {NULL, NULL, }, }; } // namespace gles2 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h index 1ff6dc4..b956a9e 100644 --- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h +++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h @@ -4,2006 +4,2212 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ - void ActiveTexture(GLenum texture) { - gles2::cmds::ActiveTexture* c = GetCmdSpace<gles2::cmds::ActiveTexture>(); - if (c) { - c->Init(texture); - } +void ActiveTexture(GLenum texture) { + gles2::cmds::ActiveTexture* c = GetCmdSpace<gles2::cmds::ActiveTexture>(); + if (c) { + c->Init(texture); } +} - void AttachShader(GLuint program, GLuint shader) { - gles2::cmds::AttachShader* c = GetCmdSpace<gles2::cmds::AttachShader>(); - if (c) { - c->Init(program, shader); - } - } - - void BindAttribLocation( - GLuint program, GLuint index, uint32 name_shm_id, uint32 name_shm_offset, - uint32 data_size) { - gles2::cmds::BindAttribLocation* c = - GetCmdSpace<gles2::cmds::BindAttribLocation>(); - if (c) { - c->Init(program, index, name_shm_id, name_shm_offset, data_size); - } - } - - void BindAttribLocationBucket( - GLuint program, GLuint index, uint32 name_bucket_id) { - gles2::cmds::BindAttribLocationBucket* c = - GetCmdSpace<gles2::cmds::BindAttribLocationBucket>(); - if (c) { - c->Init(program, index, name_bucket_id); - } - } - - void BindBuffer(GLenum target, GLuint buffer) { - gles2::cmds::BindBuffer* c = GetCmdSpace<gles2::cmds::BindBuffer>(); - if (c) { - c->Init(target, buffer); - } - } - - void BindFramebuffer(GLenum target, GLuint framebuffer) { - gles2::cmds::BindFramebuffer* c = - GetCmdSpace<gles2::cmds::BindFramebuffer>(); - if (c) { - c->Init(target, framebuffer); - } - } - - void BindRenderbuffer(GLenum target, GLuint renderbuffer) { - gles2::cmds::BindRenderbuffer* c = - GetCmdSpace<gles2::cmds::BindRenderbuffer>(); - if (c) { - c->Init(target, renderbuffer); - } - } - - void BindTexture(GLenum target, GLuint texture) { - gles2::cmds::BindTexture* c = GetCmdSpace<gles2::cmds::BindTexture>(); - if (c) { - c->Init(target, texture); - } - } - - void BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - gles2::cmds::BlendColor* c = GetCmdSpace<gles2::cmds::BlendColor>(); - if (c) { - c->Init(red, green, blue, alpha); - } - } - - void BlendEquation(GLenum mode) { - gles2::cmds::BlendEquation* c = GetCmdSpace<gles2::cmds::BlendEquation>(); - if (c) { - c->Init(mode); - } - } - - void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { - gles2::cmds::BlendEquationSeparate* c = - GetCmdSpace<gles2::cmds::BlendEquationSeparate>(); - if (c) { - c->Init(modeRGB, modeAlpha); - } - } - - void BlendFunc(GLenum sfactor, GLenum dfactor) { - gles2::cmds::BlendFunc* c = GetCmdSpace<gles2::cmds::BlendFunc>(); - if (c) { - c->Init(sfactor, dfactor); - } - } - - void BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - gles2::cmds::BlendFuncSeparate* c = - GetCmdSpace<gles2::cmds::BlendFuncSeparate>(); - if (c) { - c->Init(srcRGB, dstRGB, srcAlpha, dstAlpha); - } - } - - void BufferData( - GLenum target, GLsizeiptr size, uint32 data_shm_id, - uint32 data_shm_offset, GLenum usage) { - gles2::cmds::BufferData* c = GetCmdSpace<gles2::cmds::BufferData>(); - if (c) { - c->Init(target, size, data_shm_id, data_shm_offset, usage); - } - } - - void BufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, uint32 data_shm_id, - uint32 data_shm_offset) { - gles2::cmds::BufferSubData* c = GetCmdSpace<gles2::cmds::BufferSubData>(); - if (c) { - c->Init(target, offset, size, data_shm_id, data_shm_offset); - } - } - - void CheckFramebufferStatus( - GLenum target, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::CheckFramebufferStatus* c = - GetCmdSpace<gles2::cmds::CheckFramebufferStatus>(); - if (c) { - c->Init(target, result_shm_id, result_shm_offset); - } - } - - void Clear(GLbitfield mask) { - gles2::cmds::Clear* c = GetCmdSpace<gles2::cmds::Clear>(); - if (c) { - c->Init(mask); - } - } - - void ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - gles2::cmds::ClearColor* c = GetCmdSpace<gles2::cmds::ClearColor>(); - if (c) { - c->Init(red, green, blue, alpha); - } - } - - void ClearDepthf(GLclampf depth) { - gles2::cmds::ClearDepthf* c = GetCmdSpace<gles2::cmds::ClearDepthf>(); - if (c) { - c->Init(depth); - } - } - - void ClearStencil(GLint s) { - gles2::cmds::ClearStencil* c = GetCmdSpace<gles2::cmds::ClearStencil>(); - if (c) { - c->Init(s); - } - } - - void ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - gles2::cmds::ColorMask* c = GetCmdSpace<gles2::cmds::ColorMask>(); - if (c) { - c->Init(red, green, blue, alpha); - } - } - - void CompileShader(GLuint shader) { - gles2::cmds::CompileShader* c = GetCmdSpace<gles2::cmds::CompileShader>(); - if (c) { - c->Init(shader); - } - } - - void CompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, uint32 data_shm_id, - uint32 data_shm_offset) { - gles2::cmds::CompressedTexImage2D* c = - GetCmdSpace<gles2::cmds::CompressedTexImage2D>(); - if (c) { - c->Init( - target, level, internalformat, width, height, border, imageSize, - data_shm_id, data_shm_offset); - } - } - - void CompressedTexImage2DBucket( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLuint bucket_id) { - gles2::cmds::CompressedTexImage2DBucket* c = - GetCmdSpace<gles2::cmds::CompressedTexImage2DBucket>(); - if (c) { - c->Init(target, level, internalformat, width, height, border, bucket_id); - } - } - - void CompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, uint32 data_shm_id, - uint32 data_shm_offset) { - gles2::cmds::CompressedTexSubImage2D* c = - GetCmdSpace<gles2::cmds::CompressedTexSubImage2D>(); - if (c) { - c->Init( - target, level, xoffset, yoffset, width, height, format, imageSize, - data_shm_id, data_shm_offset); - } - } - - void CompressedTexSubImage2DBucket( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLuint bucket_id) { - gles2::cmds::CompressedTexSubImage2DBucket* c = - GetCmdSpace<gles2::cmds::CompressedTexSubImage2DBucket>(); - if (c) { - c->Init( - target, level, xoffset, yoffset, width, height, format, bucket_id); - } - } - - void CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) { - gles2::cmds::CopyTexImage2D* c = - GetCmdSpace<gles2::cmds::CopyTexImage2D>(); - if (c) { - c->Init(target, level, internalformat, x, y, width, height, border); - } - } - - void CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, - GLint y, GLsizei width, GLsizei height) { - gles2::cmds::CopyTexSubImage2D* c = - GetCmdSpace<gles2::cmds::CopyTexSubImage2D>(); - if (c) { - c->Init(target, level, xoffset, yoffset, x, y, width, height); - } - } - - void CreateProgram(uint32 client_id) { - gles2::cmds::CreateProgram* c = GetCmdSpace<gles2::cmds::CreateProgram>(); - if (c) { - c->Init(client_id); - } - } - - void CreateShader(GLenum type, uint32 client_id) { - gles2::cmds::CreateShader* c = GetCmdSpace<gles2::cmds::CreateShader>(); - if (c) { - c->Init(type, client_id); - } - } - - void CullFace(GLenum mode) { - gles2::cmds::CullFace* c = GetCmdSpace<gles2::cmds::CullFace>(); - if (c) { - c->Init(mode); - } - } - - void DeleteBuffers( - GLsizei n, uint32 buffers_shm_id, uint32 buffers_shm_offset) { - gles2::cmds::DeleteBuffers* c = GetCmdSpace<gles2::cmds::DeleteBuffers>(); - if (c) { - c->Init(n, buffers_shm_id, buffers_shm_offset); - } - } - - void DeleteBuffersImmediate(GLsizei n, const GLuint* buffers) { - const uint32 size = gles2::cmds::DeleteBuffersImmediate::ComputeSize(n); - gles2::cmds::DeleteBuffersImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteBuffersImmediate>( - size); - if (c) { - c->Init(n, buffers); - } - } - - void DeleteFramebuffers( - GLsizei n, uint32 framebuffers_shm_id, uint32 framebuffers_shm_offset) { - gles2::cmds::DeleteFramebuffers* c = - GetCmdSpace<gles2::cmds::DeleteFramebuffers>(); - if (c) { - c->Init(n, framebuffers_shm_id, framebuffers_shm_offset); - } - } - - void DeleteFramebuffersImmediate(GLsizei n, const GLuint* framebuffers) { - const uint32 size = - gles2::cmds::DeleteFramebuffersImmediate::ComputeSize(n); - gles2::cmds::DeleteFramebuffersImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteFramebuffersImmediate>( - size); - if (c) { - c->Init(n, framebuffers); - } - } - - void DeleteProgram(GLuint program) { - gles2::cmds::DeleteProgram* c = GetCmdSpace<gles2::cmds::DeleteProgram>(); - if (c) { - c->Init(program); - } - } - - void DeleteRenderbuffers( - GLsizei n, uint32 renderbuffers_shm_id, - uint32 renderbuffers_shm_offset) { - gles2::cmds::DeleteRenderbuffers* c = - GetCmdSpace<gles2::cmds::DeleteRenderbuffers>(); - if (c) { - c->Init(n, renderbuffers_shm_id, renderbuffers_shm_offset); - } - } - - void DeleteRenderbuffersImmediate(GLsizei n, const GLuint* renderbuffers) { - const uint32 size = - gles2::cmds::DeleteRenderbuffersImmediate::ComputeSize(n); - gles2::cmds::DeleteRenderbuffersImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteRenderbuffersImmediate>(size); // NOLINT - if (c) { - c->Init(n, renderbuffers); - } - } - - void DeleteShader(GLuint shader) { - gles2::cmds::DeleteShader* c = GetCmdSpace<gles2::cmds::DeleteShader>(); - if (c) { - c->Init(shader); - } - } - - void DeleteTextures( - GLsizei n, uint32 textures_shm_id, uint32 textures_shm_offset) { - gles2::cmds::DeleteTextures* c = - GetCmdSpace<gles2::cmds::DeleteTextures>(); - if (c) { - c->Init(n, textures_shm_id, textures_shm_offset); - } - } - - void DeleteTexturesImmediate(GLsizei n, const GLuint* textures) { - const uint32 size = gles2::cmds::DeleteTexturesImmediate::ComputeSize(n); - gles2::cmds::DeleteTexturesImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteTexturesImmediate>( - size); - if (c) { - c->Init(n, textures); - } - } - - void DepthFunc(GLenum func) { - gles2::cmds::DepthFunc* c = GetCmdSpace<gles2::cmds::DepthFunc>(); - if (c) { - c->Init(func); - } - } - - void DepthMask(GLboolean flag) { - gles2::cmds::DepthMask* c = GetCmdSpace<gles2::cmds::DepthMask>(); - if (c) { - c->Init(flag); - } - } - - void DepthRangef(GLclampf zNear, GLclampf zFar) { - gles2::cmds::DepthRangef* c = GetCmdSpace<gles2::cmds::DepthRangef>(); - if (c) { - c->Init(zNear, zFar); - } - } - - void DetachShader(GLuint program, GLuint shader) { - gles2::cmds::DetachShader* c = GetCmdSpace<gles2::cmds::DetachShader>(); - if (c) { - c->Init(program, shader); - } - } - - void Disable(GLenum cap) { - gles2::cmds::Disable* c = GetCmdSpace<gles2::cmds::Disable>(); - if (c) { - c->Init(cap); - } - } - - void DisableVertexAttribArray(GLuint index) { - gles2::cmds::DisableVertexAttribArray* c = - GetCmdSpace<gles2::cmds::DisableVertexAttribArray>(); - if (c) { - c->Init(index); - } - } - - void DrawArrays(GLenum mode, GLint first, GLsizei count) { - gles2::cmds::DrawArrays* c = GetCmdSpace<gles2::cmds::DrawArrays>(); - if (c) { - c->Init(mode, first, count); - } - } - - void DrawElements( - GLenum mode, GLsizei count, GLenum type, GLuint index_offset) { - gles2::cmds::DrawElements* c = GetCmdSpace<gles2::cmds::DrawElements>(); - if (c) { - c->Init(mode, count, type, index_offset); - } - } - - void Enable(GLenum cap) { - gles2::cmds::Enable* c = GetCmdSpace<gles2::cmds::Enable>(); - if (c) { - c->Init(cap); - } - } - - void EnableVertexAttribArray(GLuint index) { - gles2::cmds::EnableVertexAttribArray* c = - GetCmdSpace<gles2::cmds::EnableVertexAttribArray>(); - if (c) { - c->Init(index); - } - } - - void Finish() { - gles2::cmds::Finish* c = GetCmdSpace<gles2::cmds::Finish>(); - if (c) { - c->Init(); - } - } - - void Flush() { - gles2::cmds::Flush* c = GetCmdSpace<gles2::cmds::Flush>(); - if (c) { - c->Init(); - } - } - - void FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) { - gles2::cmds::FramebufferRenderbuffer* c = - GetCmdSpace<gles2::cmds::FramebufferRenderbuffer>(); - if (c) { - c->Init(target, attachment, renderbuffertarget, renderbuffer); - } - } - - void FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) { - gles2::cmds::FramebufferTexture2D* c = - GetCmdSpace<gles2::cmds::FramebufferTexture2D>(); - if (c) { - c->Init(target, attachment, textarget, texture, level); - } - } - - void FrontFace(GLenum mode) { - gles2::cmds::FrontFace* c = GetCmdSpace<gles2::cmds::FrontFace>(); - if (c) { - c->Init(mode); - } - } - - void GenBuffers( - GLsizei n, uint32 buffers_shm_id, uint32 buffers_shm_offset) { - gles2::cmds::GenBuffers* c = GetCmdSpace<gles2::cmds::GenBuffers>(); - if (c) { - c->Init(n, buffers_shm_id, buffers_shm_offset); - } - } - - void GenBuffersImmediate(GLsizei n, GLuint* buffers) { - const uint32 size = gles2::cmds::GenBuffersImmediate::ComputeSize(n); - gles2::cmds::GenBuffersImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::GenBuffersImmediate>(size); - if (c) { - c->Init(n, buffers); - } - } - - void GenerateMipmap(GLenum target) { - gles2::cmds::GenerateMipmap* c = - GetCmdSpace<gles2::cmds::GenerateMipmap>(); - if (c) { - c->Init(target); - } - } - - void GenFramebuffers( - GLsizei n, uint32 framebuffers_shm_id, uint32 framebuffers_shm_offset) { - gles2::cmds::GenFramebuffers* c = - GetCmdSpace<gles2::cmds::GenFramebuffers>(); - if (c) { - c->Init(n, framebuffers_shm_id, framebuffers_shm_offset); - } - } - - void GenFramebuffersImmediate(GLsizei n, GLuint* framebuffers) { - const uint32 size = gles2::cmds::GenFramebuffersImmediate::ComputeSize(n); - gles2::cmds::GenFramebuffersImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::GenFramebuffersImmediate>( - size); - if (c) { - c->Init(n, framebuffers); - } - } - - void GenRenderbuffers( - GLsizei n, uint32 renderbuffers_shm_id, - uint32 renderbuffers_shm_offset) { - gles2::cmds::GenRenderbuffers* c = - GetCmdSpace<gles2::cmds::GenRenderbuffers>(); - if (c) { - c->Init(n, renderbuffers_shm_id, renderbuffers_shm_offset); - } - } - - void GenRenderbuffersImmediate(GLsizei n, GLuint* renderbuffers) { - const uint32 size = gles2::cmds::GenRenderbuffersImmediate::ComputeSize(n); - gles2::cmds::GenRenderbuffersImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::GenRenderbuffersImmediate>( - size); - if (c) { - c->Init(n, renderbuffers); - } - } - - void GenTextures( - GLsizei n, uint32 textures_shm_id, uint32 textures_shm_offset) { - gles2::cmds::GenTextures* c = GetCmdSpace<gles2::cmds::GenTextures>(); - if (c) { - c->Init(n, textures_shm_id, textures_shm_offset); - } - } - - void GenTexturesImmediate(GLsizei n, GLuint* textures) { - const uint32 size = gles2::cmds::GenTexturesImmediate::ComputeSize(n); - gles2::cmds::GenTexturesImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::GenTexturesImmediate>(size); - if (c) { - c->Init(n, textures); - } - } - - void GetActiveAttrib( - GLuint program, GLuint index, uint32 name_bucket_id, uint32 result_shm_id, - uint32 result_shm_offset) { - gles2::cmds::GetActiveAttrib* c = - GetCmdSpace<gles2::cmds::GetActiveAttrib>(); - if (c) { - c->Init( - program, index, name_bucket_id, result_shm_id, result_shm_offset); - } - } - - void GetActiveUniform( - GLuint program, GLuint index, uint32 name_bucket_id, uint32 result_shm_id, - uint32 result_shm_offset) { - gles2::cmds::GetActiveUniform* c = - GetCmdSpace<gles2::cmds::GetActiveUniform>(); - if (c) { - c->Init( - program, index, name_bucket_id, result_shm_id, result_shm_offset); - } - } - - void GetAttachedShaders( - GLuint program, uint32 result_shm_id, uint32 result_shm_offset, - uint32 result_size) { - gles2::cmds::GetAttachedShaders* c = - GetCmdSpace<gles2::cmds::GetAttachedShaders>(); - if (c) { - c->Init(program, result_shm_id, result_shm_offset, result_size); - } - } - - void GetBooleanv( - GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) { - gles2::cmds::GetBooleanv* c = GetCmdSpace<gles2::cmds::GetBooleanv>(); - if (c) { - c->Init(pname, params_shm_id, params_shm_offset); - } - } - - void GetBufferParameteriv( - GLenum target, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetBufferParameteriv* c = - GetCmdSpace<gles2::cmds::GetBufferParameteriv>(); - if (c) { - c->Init(target, pname, params_shm_id, params_shm_offset); - } - } - - void GetError(uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::GetError* c = GetCmdSpace<gles2::cmds::GetError>(); - if (c) { - c->Init(result_shm_id, result_shm_offset); - } - } - - void GetFloatv( - GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) { - gles2::cmds::GetFloatv* c = GetCmdSpace<gles2::cmds::GetFloatv>(); - if (c) { - c->Init(pname, params_shm_id, params_shm_offset); - } - } - - void GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetFramebufferAttachmentParameteriv* c = - GetCmdSpace<gles2::cmds::GetFramebufferAttachmentParameteriv>(); - if (c) { - c->Init(target, attachment, pname, params_shm_id, params_shm_offset); - } - } - - void GetIntegerv( - GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) { - gles2::cmds::GetIntegerv* c = GetCmdSpace<gles2::cmds::GetIntegerv>(); - if (c) { - c->Init(pname, params_shm_id, params_shm_offset); - } - } - - void GetProgramiv( - GLuint program, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetProgramiv* c = GetCmdSpace<gles2::cmds::GetProgramiv>(); - if (c) { - c->Init(program, pname, params_shm_id, params_shm_offset); - } - } - - void GetProgramInfoLog(GLuint program, uint32 bucket_id) { - gles2::cmds::GetProgramInfoLog* c = - GetCmdSpace<gles2::cmds::GetProgramInfoLog>(); - if (c) { - c->Init(program, bucket_id); - } - } - - void GetRenderbufferParameteriv( - GLenum target, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetRenderbufferParameteriv* c = - GetCmdSpace<gles2::cmds::GetRenderbufferParameteriv>(); - if (c) { - c->Init(target, pname, params_shm_id, params_shm_offset); - } - } - - void GetShaderiv( - GLuint shader, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetShaderiv* c = GetCmdSpace<gles2::cmds::GetShaderiv>(); - if (c) { - c->Init(shader, pname, params_shm_id, params_shm_offset); - } - } - - void GetShaderInfoLog(GLuint shader, uint32 bucket_id) { - gles2::cmds::GetShaderInfoLog* c = - GetCmdSpace<gles2::cmds::GetShaderInfoLog>(); - if (c) { - c->Init(shader, bucket_id); - } - } - - void GetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, uint32 result_shm_id, - uint32 result_shm_offset) { - gles2::cmds::GetShaderPrecisionFormat* c = - GetCmdSpace<gles2::cmds::GetShaderPrecisionFormat>(); - if (c) { - c->Init(shadertype, precisiontype, result_shm_id, result_shm_offset); - } - } - - void GetShaderSource(GLuint shader, uint32 bucket_id) { - gles2::cmds::GetShaderSource* c = - GetCmdSpace<gles2::cmds::GetShaderSource>(); - if (c) { - c->Init(shader, bucket_id); - } - } - - void GetString(GLenum name, uint32 bucket_id) { - gles2::cmds::GetString* c = GetCmdSpace<gles2::cmds::GetString>(); - if (c) { - c->Init(name, bucket_id); - } - } - - void GetTexParameterfv( - GLenum target, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetTexParameterfv* c = - GetCmdSpace<gles2::cmds::GetTexParameterfv>(); - if (c) { - c->Init(target, pname, params_shm_id, params_shm_offset); - } - } - - void GetTexParameteriv( - GLenum target, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetTexParameteriv* c = - GetCmdSpace<gles2::cmds::GetTexParameteriv>(); - if (c) { - c->Init(target, pname, params_shm_id, params_shm_offset); - } - } - - void GetUniformfv( - GLuint program, GLint location, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetUniformfv* c = GetCmdSpace<gles2::cmds::GetUniformfv>(); - if (c) { - c->Init(program, location, params_shm_id, params_shm_offset); - } - } - - void GetUniformiv( - GLuint program, GLint location, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetUniformiv* c = GetCmdSpace<gles2::cmds::GetUniformiv>(); - if (c) { - c->Init(program, location, params_shm_id, params_shm_offset); - } - } - - void GetVertexAttribfv( - GLuint index, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetVertexAttribfv* c = - GetCmdSpace<gles2::cmds::GetVertexAttribfv>(); - if (c) { - c->Init(index, pname, params_shm_id, params_shm_offset); - } - } - - void GetVertexAttribiv( - GLuint index, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::GetVertexAttribiv* c = - GetCmdSpace<gles2::cmds::GetVertexAttribiv>(); - if (c) { - c->Init(index, pname, params_shm_id, params_shm_offset); - } - } - - void GetVertexAttribPointerv( - GLuint index, GLenum pname, uint32 pointer_shm_id, - uint32 pointer_shm_offset) { - gles2::cmds::GetVertexAttribPointerv* c = - GetCmdSpace<gles2::cmds::GetVertexAttribPointerv>(); - if (c) { - c->Init(index, pname, pointer_shm_id, pointer_shm_offset); - } - } - - void Hint(GLenum target, GLenum mode) { - gles2::cmds::Hint* c = GetCmdSpace<gles2::cmds::Hint>(); - if (c) { - c->Init(target, mode); - } - } - - void IsBuffer( - GLuint buffer, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsBuffer* c = GetCmdSpace<gles2::cmds::IsBuffer>(); - if (c) { - c->Init(buffer, result_shm_id, result_shm_offset); - } - } - - void IsEnabled(GLenum cap, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsEnabled* c = GetCmdSpace<gles2::cmds::IsEnabled>(); - if (c) { - c->Init(cap, result_shm_id, result_shm_offset); - } - } - - void IsFramebuffer( - GLuint framebuffer, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsFramebuffer* c = GetCmdSpace<gles2::cmds::IsFramebuffer>(); - if (c) { - c->Init(framebuffer, result_shm_id, result_shm_offset); - } - } - - void IsProgram( - GLuint program, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsProgram* c = GetCmdSpace<gles2::cmds::IsProgram>(); - if (c) { - c->Init(program, result_shm_id, result_shm_offset); - } - } - - void IsRenderbuffer( - GLuint renderbuffer, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsRenderbuffer* c = - GetCmdSpace<gles2::cmds::IsRenderbuffer>(); - if (c) { - c->Init(renderbuffer, result_shm_id, result_shm_offset); - } - } - - void IsShader( - GLuint shader, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsShader* c = GetCmdSpace<gles2::cmds::IsShader>(); - if (c) { - c->Init(shader, result_shm_id, result_shm_offset); - } - } - - void IsTexture( - GLuint texture, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsTexture* c = GetCmdSpace<gles2::cmds::IsTexture>(); - if (c) { - c->Init(texture, result_shm_id, result_shm_offset); - } - } - - void LineWidth(GLfloat width) { - gles2::cmds::LineWidth* c = GetCmdSpace<gles2::cmds::LineWidth>(); - if (c) { - c->Init(width); - } - } - - void LinkProgram(GLuint program) { - gles2::cmds::LinkProgram* c = GetCmdSpace<gles2::cmds::LinkProgram>(); - if (c) { - c->Init(program); - } - } - - void PixelStorei(GLenum pname, GLint param) { - gles2::cmds::PixelStorei* c = GetCmdSpace<gles2::cmds::PixelStorei>(); - if (c) { - c->Init(pname, param); - } - } - - void PolygonOffset(GLfloat factor, GLfloat units) { - gles2::cmds::PolygonOffset* c = GetCmdSpace<gles2::cmds::PolygonOffset>(); - if (c) { - c->Init(factor, units); - } - } - - void ReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, - GLenum type, uint32 pixels_shm_id, uint32 pixels_shm_offset, - uint32 result_shm_id, uint32 result_shm_offset, GLboolean async) { - gles2::cmds::ReadPixels* c = GetCmdSpace<gles2::cmds::ReadPixels>(); - if (c) { - c->Init( - x, y, width, height, format, type, pixels_shm_id, pixels_shm_offset, - result_shm_id, result_shm_offset, async); - } - } +void AttachShader(GLuint program, GLuint shader) { + gles2::cmds::AttachShader* c = GetCmdSpace<gles2::cmds::AttachShader>(); + if (c) { + c->Init(program, shader); + } +} - void ReleaseShaderCompiler() { - gles2::cmds::ReleaseShaderCompiler* c = - GetCmdSpace<gles2::cmds::ReleaseShaderCompiler>(); - if (c) { - c->Init(); - } - } - - void RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - gles2::cmds::RenderbufferStorage* c = - GetCmdSpace<gles2::cmds::RenderbufferStorage>(); - if (c) { - c->Init(target, internalformat, width, height); - } - } - - void SampleCoverage(GLclampf value, GLboolean invert) { - gles2::cmds::SampleCoverage* c = - GetCmdSpace<gles2::cmds::SampleCoverage>(); - if (c) { - c->Init(value, invert); - } - } - - void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { - gles2::cmds::Scissor* c = GetCmdSpace<gles2::cmds::Scissor>(); - if (c) { - c->Init(x, y, width, height); - } - } - - void ShaderBinary( - GLsizei n, uint32 shaders_shm_id, uint32 shaders_shm_offset, - GLenum binaryformat, uint32 binary_shm_id, uint32 binary_shm_offset, - GLsizei length) { - gles2::cmds::ShaderBinary* c = GetCmdSpace<gles2::cmds::ShaderBinary>(); - if (c) { - c->Init( - n, shaders_shm_id, shaders_shm_offset, binaryformat, binary_shm_id, - binary_shm_offset, length); - } - } - - void ShaderSource( - GLuint shader, uint32 data_shm_id, uint32 data_shm_offset, - uint32 data_size) { - gles2::cmds::ShaderSource* c = GetCmdSpace<gles2::cmds::ShaderSource>(); - if (c) { - c->Init(shader, data_shm_id, data_shm_offset, data_size); - } - } - - void ShaderSourceBucket(GLuint shader, uint32 data_bucket_id) { - gles2::cmds::ShaderSourceBucket* c = - GetCmdSpace<gles2::cmds::ShaderSourceBucket>(); - if (c) { - c->Init(shader, data_bucket_id); - } - } - - void StencilFunc(GLenum func, GLint ref, GLuint mask) { - gles2::cmds::StencilFunc* c = GetCmdSpace<gles2::cmds::StencilFunc>(); - if (c) { - c->Init(func, ref, mask); - } - } - - void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { - gles2::cmds::StencilFuncSeparate* c = - GetCmdSpace<gles2::cmds::StencilFuncSeparate>(); - if (c) { - c->Init(face, func, ref, mask); - } - } - - void StencilMask(GLuint mask) { - gles2::cmds::StencilMask* c = GetCmdSpace<gles2::cmds::StencilMask>(); - if (c) { - c->Init(mask); - } - } - - void StencilMaskSeparate(GLenum face, GLuint mask) { - gles2::cmds::StencilMaskSeparate* c = - GetCmdSpace<gles2::cmds::StencilMaskSeparate>(); - if (c) { - c->Init(face, mask); - } - } - - void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) { - gles2::cmds::StencilOp* c = GetCmdSpace<gles2::cmds::StencilOp>(); - if (c) { - c->Init(fail, zfail, zpass); - } - } - - void StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { - gles2::cmds::StencilOpSeparate* c = - GetCmdSpace<gles2::cmds::StencilOpSeparate>(); - if (c) { - c->Init(face, fail, zfail, zpass); - } - } - - void TexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - uint32 pixels_shm_id, uint32 pixels_shm_offset) { - gles2::cmds::TexImage2D* c = GetCmdSpace<gles2::cmds::TexImage2D>(); - if (c) { - c->Init( - target, level, internalformat, width, height, border, format, type, - pixels_shm_id, pixels_shm_offset); - } - } - - void TexParameterf(GLenum target, GLenum pname, GLfloat param) { - gles2::cmds::TexParameterf* c = GetCmdSpace<gles2::cmds::TexParameterf>(); - if (c) { - c->Init(target, pname, param); - } - } - - void TexParameterfv( - GLenum target, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::TexParameterfv* c = - GetCmdSpace<gles2::cmds::TexParameterfv>(); - if (c) { - c->Init(target, pname, params_shm_id, params_shm_offset); - } - } - - void TexParameterfvImmediate( - GLenum target, GLenum pname, const GLfloat* params) { - const uint32 size = gles2::cmds::TexParameterfvImmediate::ComputeSize(); - gles2::cmds::TexParameterfvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterfvImmediate>( - size); - if (c) { - c->Init(target, pname, params); - } - } - - void TexParameteri(GLenum target, GLenum pname, GLint param) { - gles2::cmds::TexParameteri* c = GetCmdSpace<gles2::cmds::TexParameteri>(); - if (c) { - c->Init(target, pname, param); - } - } - - void TexParameteriv( - GLenum target, GLenum pname, uint32 params_shm_id, - uint32 params_shm_offset) { - gles2::cmds::TexParameteriv* c = - GetCmdSpace<gles2::cmds::TexParameteriv>(); - if (c) { - c->Init(target, pname, params_shm_id, params_shm_offset); - } - } - - void TexParameterivImmediate( - GLenum target, GLenum pname, const GLint* params) { - const uint32 size = gles2::cmds::TexParameterivImmediate::ComputeSize(); - gles2::cmds::TexParameterivImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterivImmediate>( - size); - if (c) { - c->Init(target, pname, params); - } - } - - void TexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, uint32 pixels_shm_id, - uint32 pixels_shm_offset, GLboolean internal) { - gles2::cmds::TexSubImage2D* c = GetCmdSpace<gles2::cmds::TexSubImage2D>(); - if (c) { - c->Init( - target, level, xoffset, yoffset, width, height, format, type, - pixels_shm_id, pixels_shm_offset, internal); - } - } - - void Uniform1f(GLint location, GLfloat x) { - gles2::cmds::Uniform1f* c = GetCmdSpace<gles2::cmds::Uniform1f>(); - if (c) { - c->Init(location, x); - } - } - - void Uniform1fv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform1fv* c = GetCmdSpace<gles2::cmds::Uniform1fv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform1fvImmediate(GLint location, GLsizei count, const GLfloat* v) { - const uint32 size = gles2::cmds::Uniform1fvImmediate::ComputeSize(count); - gles2::cmds::Uniform1fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1fvImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void Uniform1i(GLint location, GLint x) { - gles2::cmds::Uniform1i* c = GetCmdSpace<gles2::cmds::Uniform1i>(); - if (c) { - c->Init(location, x); - } - } - - void Uniform1iv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform1iv* c = GetCmdSpace<gles2::cmds::Uniform1iv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform1ivImmediate(GLint location, GLsizei count, const GLint* v) { - const uint32 size = gles2::cmds::Uniform1ivImmediate::ComputeSize(count); - gles2::cmds::Uniform1ivImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1ivImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void Uniform2f(GLint location, GLfloat x, GLfloat y) { - gles2::cmds::Uniform2f* c = GetCmdSpace<gles2::cmds::Uniform2f>(); - if (c) { - c->Init(location, x, y); - } - } - - void Uniform2fv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform2fv* c = GetCmdSpace<gles2::cmds::Uniform2fv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform2fvImmediate(GLint location, GLsizei count, const GLfloat* v) { - const uint32 size = gles2::cmds::Uniform2fvImmediate::ComputeSize(count); - gles2::cmds::Uniform2fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2fvImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void Uniform2i(GLint location, GLint x, GLint y) { - gles2::cmds::Uniform2i* c = GetCmdSpace<gles2::cmds::Uniform2i>(); - if (c) { - c->Init(location, x, y); - } - } - - void Uniform2iv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform2iv* c = GetCmdSpace<gles2::cmds::Uniform2iv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform2ivImmediate(GLint location, GLsizei count, const GLint* v) { - const uint32 size = gles2::cmds::Uniform2ivImmediate::ComputeSize(count); - gles2::cmds::Uniform2ivImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2ivImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) { - gles2::cmds::Uniform3f* c = GetCmdSpace<gles2::cmds::Uniform3f>(); - if (c) { - c->Init(location, x, y, z); - } - } - - void Uniform3fv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform3fv* c = GetCmdSpace<gles2::cmds::Uniform3fv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform3fvImmediate(GLint location, GLsizei count, const GLfloat* v) { - const uint32 size = gles2::cmds::Uniform3fvImmediate::ComputeSize(count); - gles2::cmds::Uniform3fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3fvImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void Uniform3i(GLint location, GLint x, GLint y, GLint z) { - gles2::cmds::Uniform3i* c = GetCmdSpace<gles2::cmds::Uniform3i>(); - if (c) { - c->Init(location, x, y, z); - } - } - - void Uniform3iv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform3iv* c = GetCmdSpace<gles2::cmds::Uniform3iv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform3ivImmediate(GLint location, GLsizei count, const GLint* v) { - const uint32 size = gles2::cmds::Uniform3ivImmediate::ComputeSize(count); - gles2::cmds::Uniform3ivImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3ivImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - gles2::cmds::Uniform4f* c = GetCmdSpace<gles2::cmds::Uniform4f>(); - if (c) { - c->Init(location, x, y, z, w); - } - } - - void Uniform4fv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform4fv* c = GetCmdSpace<gles2::cmds::Uniform4fv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform4fvImmediate(GLint location, GLsizei count, const GLfloat* v) { - const uint32 size = gles2::cmds::Uniform4fvImmediate::ComputeSize(count); - gles2::cmds::Uniform4fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4fvImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { - gles2::cmds::Uniform4i* c = GetCmdSpace<gles2::cmds::Uniform4i>(); - if (c) { - c->Init(location, x, y, z, w); - } - } - - void Uniform4iv( - GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) { - gles2::cmds::Uniform4iv* c = GetCmdSpace<gles2::cmds::Uniform4iv>(); - if (c) { - c->Init(location, count, v_shm_id, v_shm_offset); - } - } - - void Uniform4ivImmediate(GLint location, GLsizei count, const GLint* v) { - const uint32 size = gles2::cmds::Uniform4ivImmediate::ComputeSize(count); - gles2::cmds::Uniform4ivImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4ivImmediate>(size); - if (c) { - c->Init(location, count, v); - } - } - - void UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, uint32 value_shm_id, - uint32 value_shm_offset) { - gles2::cmds::UniformMatrix2fv* c = - GetCmdSpace<gles2::cmds::UniformMatrix2fv>(); - if (c) { - c->Init(location, count, transpose, value_shm_id, value_shm_offset); - } - } - - void UniformMatrix2fvImmediate( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) { - const uint32 size = - gles2::cmds::UniformMatrix2fvImmediate::ComputeSize(count); - gles2::cmds::UniformMatrix2fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix2fvImmediate>( - size); - if (c) { - c->Init(location, count, transpose, value); - } - } - - void UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, uint32 value_shm_id, - uint32 value_shm_offset) { - gles2::cmds::UniformMatrix3fv* c = - GetCmdSpace<gles2::cmds::UniformMatrix3fv>(); - if (c) { - c->Init(location, count, transpose, value_shm_id, value_shm_offset); - } - } - - void UniformMatrix3fvImmediate( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) { - const uint32 size = - gles2::cmds::UniformMatrix3fvImmediate::ComputeSize(count); - gles2::cmds::UniformMatrix3fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix3fvImmediate>( - size); - if (c) { - c->Init(location, count, transpose, value); - } - } - - void UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, uint32 value_shm_id, - uint32 value_shm_offset) { - gles2::cmds::UniformMatrix4fv* c = - GetCmdSpace<gles2::cmds::UniformMatrix4fv>(); - if (c) { - c->Init(location, count, transpose, value_shm_id, value_shm_offset); - } - } - - void UniformMatrix4fvImmediate( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) { - const uint32 size = - gles2::cmds::UniformMatrix4fvImmediate::ComputeSize(count); - gles2::cmds::UniformMatrix4fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix4fvImmediate>( - size); - if (c) { - c->Init(location, count, transpose, value); - } - } - - void UseProgram(GLuint program) { - gles2::cmds::UseProgram* c = GetCmdSpace<gles2::cmds::UseProgram>(); - if (c) { - c->Init(program); - } - } - - void ValidateProgram(GLuint program) { - gles2::cmds::ValidateProgram* c = - GetCmdSpace<gles2::cmds::ValidateProgram>(); - if (c) { - c->Init(program); - } - } - - void VertexAttrib1f(GLuint indx, GLfloat x) { - gles2::cmds::VertexAttrib1f* c = - GetCmdSpace<gles2::cmds::VertexAttrib1f>(); - if (c) { - c->Init(indx, x); - } - } - - void VertexAttrib1fv( - GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) { - gles2::cmds::VertexAttrib1fv* c = - GetCmdSpace<gles2::cmds::VertexAttrib1fv>(); - if (c) { - c->Init(indx, values_shm_id, values_shm_offset); - } - } +void BindAttribLocation(GLuint program, + GLuint index, + uint32 name_shm_id, + uint32 name_shm_offset, + uint32 data_size) { + gles2::cmds::BindAttribLocation* c = + GetCmdSpace<gles2::cmds::BindAttribLocation>(); + if (c) { + c->Init(program, index, name_shm_id, name_shm_offset, data_size); + } +} + +void BindAttribLocationBucket(GLuint program, + GLuint index, + uint32 name_bucket_id) { + gles2::cmds::BindAttribLocationBucket* c = + GetCmdSpace<gles2::cmds::BindAttribLocationBucket>(); + if (c) { + c->Init(program, index, name_bucket_id); + } +} + +void BindBuffer(GLenum target, GLuint buffer) { + gles2::cmds::BindBuffer* c = GetCmdSpace<gles2::cmds::BindBuffer>(); + if (c) { + c->Init(target, buffer); + } +} + +void BindFramebuffer(GLenum target, GLuint framebuffer) { + gles2::cmds::BindFramebuffer* c = GetCmdSpace<gles2::cmds::BindFramebuffer>(); + if (c) { + c->Init(target, framebuffer); + } +} + +void BindRenderbuffer(GLenum target, GLuint renderbuffer) { + gles2::cmds::BindRenderbuffer* c = + GetCmdSpace<gles2::cmds::BindRenderbuffer>(); + if (c) { + c->Init(target, renderbuffer); + } +} - void VertexAttrib1fvImmediate(GLuint indx, const GLfloat* values) { - const uint32 size = gles2::cmds::VertexAttrib1fvImmediate::ComputeSize(); - gles2::cmds::VertexAttrib1fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib1fvImmediate>( - size); - if (c) { - c->Init(indx, values); - } - } +void BindTexture(GLenum target, GLuint texture) { + gles2::cmds::BindTexture* c = GetCmdSpace<gles2::cmds::BindTexture>(); + if (c) { + c->Init(target, texture); + } +} - void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { - gles2::cmds::VertexAttrib2f* c = - GetCmdSpace<gles2::cmds::VertexAttrib2f>(); - if (c) { - c->Init(indx, x, y); - } - } - - void VertexAttrib2fv( - GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) { - gles2::cmds::VertexAttrib2fv* c = - GetCmdSpace<gles2::cmds::VertexAttrib2fv>(); - if (c) { - c->Init(indx, values_shm_id, values_shm_offset); - } - } +void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { + gles2::cmds::BlendColor* c = GetCmdSpace<gles2::cmds::BlendColor>(); + if (c) { + c->Init(red, green, blue, alpha); + } +} + +void BlendEquation(GLenum mode) { + gles2::cmds::BlendEquation* c = GetCmdSpace<gles2::cmds::BlendEquation>(); + if (c) { + c->Init(mode); + } +} + +void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { + gles2::cmds::BlendEquationSeparate* c = + GetCmdSpace<gles2::cmds::BlendEquationSeparate>(); + if (c) { + c->Init(modeRGB, modeAlpha); + } +} + +void BlendFunc(GLenum sfactor, GLenum dfactor) { + gles2::cmds::BlendFunc* c = GetCmdSpace<gles2::cmds::BlendFunc>(); + if (c) { + c->Init(sfactor, dfactor); + } +} + +void BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) { + gles2::cmds::BlendFuncSeparate* c = + GetCmdSpace<gles2::cmds::BlendFuncSeparate>(); + if (c) { + c->Init(srcRGB, dstRGB, srcAlpha, dstAlpha); + } +} + +void BufferData(GLenum target, + GLsizeiptr size, + uint32 data_shm_id, + uint32 data_shm_offset, + GLenum usage) { + gles2::cmds::BufferData* c = GetCmdSpace<gles2::cmds::BufferData>(); + if (c) { + c->Init(target, size, data_shm_id, data_shm_offset, usage); + } +} + +void BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + uint32 data_shm_id, + uint32 data_shm_offset) { + gles2::cmds::BufferSubData* c = GetCmdSpace<gles2::cmds::BufferSubData>(); + if (c) { + c->Init(target, offset, size, data_shm_id, data_shm_offset); + } +} + +void CheckFramebufferStatus(GLenum target, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::CheckFramebufferStatus* c = + GetCmdSpace<gles2::cmds::CheckFramebufferStatus>(); + if (c) { + c->Init(target, result_shm_id, result_shm_offset); + } +} + +void Clear(GLbitfield mask) { + gles2::cmds::Clear* c = GetCmdSpace<gles2::cmds::Clear>(); + if (c) { + c->Init(mask); + } +} + +void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { + gles2::cmds::ClearColor* c = GetCmdSpace<gles2::cmds::ClearColor>(); + if (c) { + c->Init(red, green, blue, alpha); + } +} + +void ClearDepthf(GLclampf depth) { + gles2::cmds::ClearDepthf* c = GetCmdSpace<gles2::cmds::ClearDepthf>(); + if (c) { + c->Init(depth); + } +} + +void ClearStencil(GLint s) { + gles2::cmds::ClearStencil* c = GetCmdSpace<gles2::cmds::ClearStencil>(); + if (c) { + c->Init(s); + } +} + +void ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) { + gles2::cmds::ColorMask* c = GetCmdSpace<gles2::cmds::ColorMask>(); + if (c) { + c->Init(red, green, blue, alpha); + } +} + +void CompileShader(GLuint shader) { + gles2::cmds::CompileShader* c = GetCmdSpace<gles2::cmds::CompileShader>(); + if (c) { + c->Init(shader); + } +} + +void CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + uint32 data_shm_id, + uint32 data_shm_offset) { + gles2::cmds::CompressedTexImage2D* c = + GetCmdSpace<gles2::cmds::CompressedTexImage2D>(); + if (c) { + c->Init(target, + level, + internalformat, + width, + height, + border, + imageSize, + data_shm_id, + data_shm_offset); + } +} + +void CompressedTexImage2DBucket(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLuint bucket_id) { + gles2::cmds::CompressedTexImage2DBucket* c = + GetCmdSpace<gles2::cmds::CompressedTexImage2DBucket>(); + if (c) { + c->Init(target, level, internalformat, width, height, border, bucket_id); + } +} + +void CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + uint32 data_shm_id, + uint32 data_shm_offset) { + gles2::cmds::CompressedTexSubImage2D* c = + GetCmdSpace<gles2::cmds::CompressedTexSubImage2D>(); + if (c) { + c->Init(target, + level, + xoffset, + yoffset, + width, + height, + format, + imageSize, + data_shm_id, + data_shm_offset); + } +} + +void CompressedTexSubImage2DBucket(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLuint bucket_id) { + gles2::cmds::CompressedTexSubImage2DBucket* c = + GetCmdSpace<gles2::cmds::CompressedTexSubImage2DBucket>(); + if (c) { + c->Init(target, level, xoffset, yoffset, width, height, format, bucket_id); + } +} + +void CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) { + gles2::cmds::CopyTexImage2D* c = GetCmdSpace<gles2::cmds::CopyTexImage2D>(); + if (c) { + c->Init(target, level, internalformat, x, y, width, height, border); + } +} + +void CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) { + gles2::cmds::CopyTexSubImage2D* c = + GetCmdSpace<gles2::cmds::CopyTexSubImage2D>(); + if (c) { + c->Init(target, level, xoffset, yoffset, x, y, width, height); + } +} + +void CreateProgram(uint32 client_id) { + gles2::cmds::CreateProgram* c = GetCmdSpace<gles2::cmds::CreateProgram>(); + if (c) { + c->Init(client_id); + } +} + +void CreateShader(GLenum type, uint32 client_id) { + gles2::cmds::CreateShader* c = GetCmdSpace<gles2::cmds::CreateShader>(); + if (c) { + c->Init(type, client_id); + } +} + +void CullFace(GLenum mode) { + gles2::cmds::CullFace* c = GetCmdSpace<gles2::cmds::CullFace>(); + if (c) { + c->Init(mode); + } +} + +void DeleteBuffers(GLsizei n, + uint32 buffers_shm_id, + uint32 buffers_shm_offset) { + gles2::cmds::DeleteBuffers* c = GetCmdSpace<gles2::cmds::DeleteBuffers>(); + if (c) { + c->Init(n, buffers_shm_id, buffers_shm_offset); + } +} + +void DeleteBuffersImmediate(GLsizei n, const GLuint* buffers) { + const uint32 size = gles2::cmds::DeleteBuffersImmediate::ComputeSize(n); + gles2::cmds::DeleteBuffersImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteBuffersImmediate>(size); + if (c) { + c->Init(n, buffers); + } +} + +void DeleteFramebuffers(GLsizei n, + uint32 framebuffers_shm_id, + uint32 framebuffers_shm_offset) { + gles2::cmds::DeleteFramebuffers* c = + GetCmdSpace<gles2::cmds::DeleteFramebuffers>(); + if (c) { + c->Init(n, framebuffers_shm_id, framebuffers_shm_offset); + } +} + +void DeleteFramebuffersImmediate(GLsizei n, const GLuint* framebuffers) { + const uint32 size = gles2::cmds::DeleteFramebuffersImmediate::ComputeSize(n); + gles2::cmds::DeleteFramebuffersImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteFramebuffersImmediate>( + size); + if (c) { + c->Init(n, framebuffers); + } +} + +void DeleteProgram(GLuint program) { + gles2::cmds::DeleteProgram* c = GetCmdSpace<gles2::cmds::DeleteProgram>(); + if (c) { + c->Init(program); + } +} + +void DeleteRenderbuffers(GLsizei n, + uint32 renderbuffers_shm_id, + uint32 renderbuffers_shm_offset) { + gles2::cmds::DeleteRenderbuffers* c = + GetCmdSpace<gles2::cmds::DeleteRenderbuffers>(); + if (c) { + c->Init(n, renderbuffers_shm_id, renderbuffers_shm_offset); + } +} + +void DeleteRenderbuffersImmediate(GLsizei n, const GLuint* renderbuffers) { + const uint32 size = gles2::cmds::DeleteRenderbuffersImmediate::ComputeSize(n); + gles2::cmds::DeleteRenderbuffersImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteRenderbuffersImmediate>( + size); // NOLINT + if (c) { + c->Init(n, renderbuffers); + } +} + +void DeleteShader(GLuint shader) { + gles2::cmds::DeleteShader* c = GetCmdSpace<gles2::cmds::DeleteShader>(); + if (c) { + c->Init(shader); + } +} - void VertexAttrib2fvImmediate(GLuint indx, const GLfloat* values) { - const uint32 size = gles2::cmds::VertexAttrib2fvImmediate::ComputeSize(); - gles2::cmds::VertexAttrib2fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib2fvImmediate>( - size); - if (c) { - c->Init(indx, values); - } +void DeleteTextures(GLsizei n, + uint32 textures_shm_id, + uint32 textures_shm_offset) { + gles2::cmds::DeleteTextures* c = GetCmdSpace<gles2::cmds::DeleteTextures>(); + if (c) { + c->Init(n, textures_shm_id, textures_shm_offset); } +} - void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { - gles2::cmds::VertexAttrib3f* c = - GetCmdSpace<gles2::cmds::VertexAttrib3f>(); - if (c) { - c->Init(indx, x, y, z); - } - } +void DeleteTexturesImmediate(GLsizei n, const GLuint* textures) { + const uint32 size = gles2::cmds::DeleteTexturesImmediate::ComputeSize(n); + gles2::cmds::DeleteTexturesImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteTexturesImmediate>(size); + if (c) { + c->Init(n, textures); + } +} - void VertexAttrib3fv( - GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) { - gles2::cmds::VertexAttrib3fv* c = - GetCmdSpace<gles2::cmds::VertexAttrib3fv>(); - if (c) { - c->Init(indx, values_shm_id, values_shm_offset); - } +void DepthFunc(GLenum func) { + gles2::cmds::DepthFunc* c = GetCmdSpace<gles2::cmds::DepthFunc>(); + if (c) { + c->Init(func); + } +} + +void DepthMask(GLboolean flag) { + gles2::cmds::DepthMask* c = GetCmdSpace<gles2::cmds::DepthMask>(); + if (c) { + c->Init(flag); + } +} + +void DepthRangef(GLclampf zNear, GLclampf zFar) { + gles2::cmds::DepthRangef* c = GetCmdSpace<gles2::cmds::DepthRangef>(); + if (c) { + c->Init(zNear, zFar); + } +} + +void DetachShader(GLuint program, GLuint shader) { + gles2::cmds::DetachShader* c = GetCmdSpace<gles2::cmds::DetachShader>(); + if (c) { + c->Init(program, shader); } +} + +void Disable(GLenum cap) { + gles2::cmds::Disable* c = GetCmdSpace<gles2::cmds::Disable>(); + if (c) { + c->Init(cap); + } +} - void VertexAttrib3fvImmediate(GLuint indx, const GLfloat* values) { - const uint32 size = gles2::cmds::VertexAttrib3fvImmediate::ComputeSize(); - gles2::cmds::VertexAttrib3fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib3fvImmediate>( - size); - if (c) { - c->Init(indx, values); - } - } +void DisableVertexAttribArray(GLuint index) { + gles2::cmds::DisableVertexAttribArray* c = + GetCmdSpace<gles2::cmds::DisableVertexAttribArray>(); + if (c) { + c->Init(index); + } +} - void VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - gles2::cmds::VertexAttrib4f* c = - GetCmdSpace<gles2::cmds::VertexAttrib4f>(); - if (c) { - c->Init(indx, x, y, z, w); - } +void DrawArrays(GLenum mode, GLint first, GLsizei count) { + gles2::cmds::DrawArrays* c = GetCmdSpace<gles2::cmds::DrawArrays>(); + if (c) { + c->Init(mode, first, count); + } +} + +void DrawElements(GLenum mode, + GLsizei count, + GLenum type, + GLuint index_offset) { + gles2::cmds::DrawElements* c = GetCmdSpace<gles2::cmds::DrawElements>(); + if (c) { + c->Init(mode, count, type, index_offset); + } +} + +void Enable(GLenum cap) { + gles2::cmds::Enable* c = GetCmdSpace<gles2::cmds::Enable>(); + if (c) { + c->Init(cap); + } +} + +void EnableVertexAttribArray(GLuint index) { + gles2::cmds::EnableVertexAttribArray* c = + GetCmdSpace<gles2::cmds::EnableVertexAttribArray>(); + if (c) { + c->Init(index); } - - void VertexAttrib4fv( - GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) { - gles2::cmds::VertexAttrib4fv* c = - GetCmdSpace<gles2::cmds::VertexAttrib4fv>(); - if (c) { - c->Init(indx, values_shm_id, values_shm_offset); - } - } - - void VertexAttrib4fvImmediate(GLuint indx, const GLfloat* values) { - const uint32 size = gles2::cmds::VertexAttrib4fvImmediate::ComputeSize(); - gles2::cmds::VertexAttrib4fvImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib4fvImmediate>( - size); - if (c) { - c->Init(indx, values); - } - } - - void VertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, - GLsizei stride, GLuint offset) { - gles2::cmds::VertexAttribPointer* c = - GetCmdSpace<gles2::cmds::VertexAttribPointer>(); - if (c) { - c->Init(indx, size, type, normalized, stride, offset); - } - } - - void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { - gles2::cmds::Viewport* c = GetCmdSpace<gles2::cmds::Viewport>(); - if (c) { - c->Init(x, y, width, height); - } - } - - void BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { - gles2::cmds::BlitFramebufferCHROMIUM* c = - GetCmdSpace<gles2::cmds::BlitFramebufferCHROMIUM>(); - if (c) { - c->Init( - srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, - filter); - } - } - - void RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) { - gles2::cmds::RenderbufferStorageMultisampleCHROMIUM* c = - GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleCHROMIUM>(); - if (c) { - c->Init(target, samples, internalformat, width, height); - } - } - - void RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) { - gles2::cmds::RenderbufferStorageMultisampleEXT* c = - GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleEXT>(); - if (c) { - c->Init(target, samples, internalformat, width, height); - } - } - - void FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) { - gles2::cmds::FramebufferTexture2DMultisampleEXT* c = - GetCmdSpace<gles2::cmds::FramebufferTexture2DMultisampleEXT>(); - if (c) { - c->Init(target, attachment, textarget, texture, level, samples); - } - } - - void TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) { - gles2::cmds::TexStorage2DEXT* c = - GetCmdSpace<gles2::cmds::TexStorage2DEXT>(); - if (c) { - c->Init(target, levels, internalFormat, width, height); - } - } - - void GenQueriesEXT( - GLsizei n, uint32 queries_shm_id, uint32 queries_shm_offset) { - gles2::cmds::GenQueriesEXT* c = GetCmdSpace<gles2::cmds::GenQueriesEXT>(); - if (c) { - c->Init(n, queries_shm_id, queries_shm_offset); - } - } - - void GenQueriesEXTImmediate(GLsizei n, GLuint* queries) { - const uint32 size = gles2::cmds::GenQueriesEXTImmediate::ComputeSize(n); - gles2::cmds::GenQueriesEXTImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::GenQueriesEXTImmediate>( +} + +void Finish() { + gles2::cmds::Finish* c = GetCmdSpace<gles2::cmds::Finish>(); + if (c) { + c->Init(); + } +} + +void Flush() { + gles2::cmds::Flush* c = GetCmdSpace<gles2::cmds::Flush>(); + if (c) { + c->Init(); + } +} + +void FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) { + gles2::cmds::FramebufferRenderbuffer* c = + GetCmdSpace<gles2::cmds::FramebufferRenderbuffer>(); + if (c) { + c->Init(target, attachment, renderbuffertarget, renderbuffer); + } +} + +void FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) { + gles2::cmds::FramebufferTexture2D* c = + GetCmdSpace<gles2::cmds::FramebufferTexture2D>(); + if (c) { + c->Init(target, attachment, textarget, texture, level); + } +} + +void FrontFace(GLenum mode) { + gles2::cmds::FrontFace* c = GetCmdSpace<gles2::cmds::FrontFace>(); + if (c) { + c->Init(mode); + } +} + +void GenBuffers(GLsizei n, uint32 buffers_shm_id, uint32 buffers_shm_offset) { + gles2::cmds::GenBuffers* c = GetCmdSpace<gles2::cmds::GenBuffers>(); + if (c) { + c->Init(n, buffers_shm_id, buffers_shm_offset); + } +} + +void GenBuffersImmediate(GLsizei n, GLuint* buffers) { + const uint32 size = gles2::cmds::GenBuffersImmediate::ComputeSize(n); + gles2::cmds::GenBuffersImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::GenBuffersImmediate>(size); + if (c) { + c->Init(n, buffers); + } +} + +void GenerateMipmap(GLenum target) { + gles2::cmds::GenerateMipmap* c = GetCmdSpace<gles2::cmds::GenerateMipmap>(); + if (c) { + c->Init(target); + } +} + +void GenFramebuffers(GLsizei n, + uint32 framebuffers_shm_id, + uint32 framebuffers_shm_offset) { + gles2::cmds::GenFramebuffers* c = GetCmdSpace<gles2::cmds::GenFramebuffers>(); + if (c) { + c->Init(n, framebuffers_shm_id, framebuffers_shm_offset); + } +} + +void GenFramebuffersImmediate(GLsizei n, GLuint* framebuffers) { + const uint32 size = gles2::cmds::GenFramebuffersImmediate::ComputeSize(n); + gles2::cmds::GenFramebuffersImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::GenFramebuffersImmediate>( + size); + if (c) { + c->Init(n, framebuffers); + } +} + +void GenRenderbuffers(GLsizei n, + uint32 renderbuffers_shm_id, + uint32 renderbuffers_shm_offset) { + gles2::cmds::GenRenderbuffers* c = + GetCmdSpace<gles2::cmds::GenRenderbuffers>(); + if (c) { + c->Init(n, renderbuffers_shm_id, renderbuffers_shm_offset); + } +} + +void GenRenderbuffersImmediate(GLsizei n, GLuint* renderbuffers) { + const uint32 size = gles2::cmds::GenRenderbuffersImmediate::ComputeSize(n); + gles2::cmds::GenRenderbuffersImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::GenRenderbuffersImmediate>( + size); + if (c) { + c->Init(n, renderbuffers); + } +} + +void GenTextures(GLsizei n, + uint32 textures_shm_id, + uint32 textures_shm_offset) { + gles2::cmds::GenTextures* c = GetCmdSpace<gles2::cmds::GenTextures>(); + if (c) { + c->Init(n, textures_shm_id, textures_shm_offset); + } +} + +void GenTexturesImmediate(GLsizei n, GLuint* textures) { + const uint32 size = gles2::cmds::GenTexturesImmediate::ComputeSize(n); + gles2::cmds::GenTexturesImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::GenTexturesImmediate>(size); + if (c) { + c->Init(n, textures); + } +} + +void GetActiveAttrib(GLuint program, + GLuint index, + uint32 name_bucket_id, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::GetActiveAttrib* c = GetCmdSpace<gles2::cmds::GetActiveAttrib>(); + if (c) { + c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset); + } +} + +void GetActiveUniform(GLuint program, + GLuint index, + uint32 name_bucket_id, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::GetActiveUniform* c = + GetCmdSpace<gles2::cmds::GetActiveUniform>(); + if (c) { + c->Init(program, index, name_bucket_id, result_shm_id, result_shm_offset); + } +} + +void GetAttachedShaders(GLuint program, + uint32 result_shm_id, + uint32 result_shm_offset, + uint32 result_size) { + gles2::cmds::GetAttachedShaders* c = + GetCmdSpace<gles2::cmds::GetAttachedShaders>(); + if (c) { + c->Init(program, result_shm_id, result_shm_offset, result_size); + } +} + +void GetBooleanv(GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) { + gles2::cmds::GetBooleanv* c = GetCmdSpace<gles2::cmds::GetBooleanv>(); + if (c) { + c->Init(pname, params_shm_id, params_shm_offset); + } +} + +void GetBufferParameteriv(GLenum target, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetBufferParameteriv* c = + GetCmdSpace<gles2::cmds::GetBufferParameteriv>(); + if (c) { + c->Init(target, pname, params_shm_id, params_shm_offset); + } +} + +void GetError(uint32 result_shm_id, uint32 result_shm_offset) { + gles2::cmds::GetError* c = GetCmdSpace<gles2::cmds::GetError>(); + if (c) { + c->Init(result_shm_id, result_shm_offset); + } +} + +void GetFloatv(GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) { + gles2::cmds::GetFloatv* c = GetCmdSpace<gles2::cmds::GetFloatv>(); + if (c) { + c->Init(pname, params_shm_id, params_shm_offset); + } +} + +void GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetFramebufferAttachmentParameteriv* c = + GetCmdSpace<gles2::cmds::GetFramebufferAttachmentParameteriv>(); + if (c) { + c->Init(target, attachment, pname, params_shm_id, params_shm_offset); + } +} + +void GetIntegerv(GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) { + gles2::cmds::GetIntegerv* c = GetCmdSpace<gles2::cmds::GetIntegerv>(); + if (c) { + c->Init(pname, params_shm_id, params_shm_offset); + } +} + +void GetProgramiv(GLuint program, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetProgramiv* c = GetCmdSpace<gles2::cmds::GetProgramiv>(); + if (c) { + c->Init(program, pname, params_shm_id, params_shm_offset); + } +} + +void GetProgramInfoLog(GLuint program, uint32 bucket_id) { + gles2::cmds::GetProgramInfoLog* c = + GetCmdSpace<gles2::cmds::GetProgramInfoLog>(); + if (c) { + c->Init(program, bucket_id); + } +} + +void GetRenderbufferParameteriv(GLenum target, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetRenderbufferParameteriv* c = + GetCmdSpace<gles2::cmds::GetRenderbufferParameteriv>(); + if (c) { + c->Init(target, pname, params_shm_id, params_shm_offset); + } +} + +void GetShaderiv(GLuint shader, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetShaderiv* c = GetCmdSpace<gles2::cmds::GetShaderiv>(); + if (c) { + c->Init(shader, pname, params_shm_id, params_shm_offset); + } +} + +void GetShaderInfoLog(GLuint shader, uint32 bucket_id) { + gles2::cmds::GetShaderInfoLog* c = + GetCmdSpace<gles2::cmds::GetShaderInfoLog>(); + if (c) { + c->Init(shader, bucket_id); + } +} + +void GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::GetShaderPrecisionFormat* c = + GetCmdSpace<gles2::cmds::GetShaderPrecisionFormat>(); + if (c) { + c->Init(shadertype, precisiontype, result_shm_id, result_shm_offset); + } +} + +void GetShaderSource(GLuint shader, uint32 bucket_id) { + gles2::cmds::GetShaderSource* c = GetCmdSpace<gles2::cmds::GetShaderSource>(); + if (c) { + c->Init(shader, bucket_id); + } +} + +void GetString(GLenum name, uint32 bucket_id) { + gles2::cmds::GetString* c = GetCmdSpace<gles2::cmds::GetString>(); + if (c) { + c->Init(name, bucket_id); + } +} + +void GetTexParameterfv(GLenum target, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetTexParameterfv* c = + GetCmdSpace<gles2::cmds::GetTexParameterfv>(); + if (c) { + c->Init(target, pname, params_shm_id, params_shm_offset); + } +} + +void GetTexParameteriv(GLenum target, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetTexParameteriv* c = + GetCmdSpace<gles2::cmds::GetTexParameteriv>(); + if (c) { + c->Init(target, pname, params_shm_id, params_shm_offset); + } +} + +void GetUniformfv(GLuint program, + GLint location, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetUniformfv* c = GetCmdSpace<gles2::cmds::GetUniformfv>(); + if (c) { + c->Init(program, location, params_shm_id, params_shm_offset); + } +} + +void GetUniformiv(GLuint program, + GLint location, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetUniformiv* c = GetCmdSpace<gles2::cmds::GetUniformiv>(); + if (c) { + c->Init(program, location, params_shm_id, params_shm_offset); + } +} + +void GetVertexAttribfv(GLuint index, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetVertexAttribfv* c = + GetCmdSpace<gles2::cmds::GetVertexAttribfv>(); + if (c) { + c->Init(index, pname, params_shm_id, params_shm_offset); + } +} + +void GetVertexAttribiv(GLuint index, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::GetVertexAttribiv* c = + GetCmdSpace<gles2::cmds::GetVertexAttribiv>(); + if (c) { + c->Init(index, pname, params_shm_id, params_shm_offset); + } +} + +void GetVertexAttribPointerv(GLuint index, + GLenum pname, + uint32 pointer_shm_id, + uint32 pointer_shm_offset) { + gles2::cmds::GetVertexAttribPointerv* c = + GetCmdSpace<gles2::cmds::GetVertexAttribPointerv>(); + if (c) { + c->Init(index, pname, pointer_shm_id, pointer_shm_offset); + } +} + +void Hint(GLenum target, GLenum mode) { + gles2::cmds::Hint* c = GetCmdSpace<gles2::cmds::Hint>(); + if (c) { + c->Init(target, mode); + } +} + +void IsBuffer(GLuint buffer, uint32 result_shm_id, uint32 result_shm_offset) { + gles2::cmds::IsBuffer* c = GetCmdSpace<gles2::cmds::IsBuffer>(); + if (c) { + c->Init(buffer, result_shm_id, result_shm_offset); + } +} + +void IsEnabled(GLenum cap, uint32 result_shm_id, uint32 result_shm_offset) { + gles2::cmds::IsEnabled* c = GetCmdSpace<gles2::cmds::IsEnabled>(); + if (c) { + c->Init(cap, result_shm_id, result_shm_offset); + } +} + +void IsFramebuffer(GLuint framebuffer, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::IsFramebuffer* c = GetCmdSpace<gles2::cmds::IsFramebuffer>(); + if (c) { + c->Init(framebuffer, result_shm_id, result_shm_offset); + } +} + +void IsProgram(GLuint program, uint32 result_shm_id, uint32 result_shm_offset) { + gles2::cmds::IsProgram* c = GetCmdSpace<gles2::cmds::IsProgram>(); + if (c) { + c->Init(program, result_shm_id, result_shm_offset); + } +} + +void IsRenderbuffer(GLuint renderbuffer, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::IsRenderbuffer* c = GetCmdSpace<gles2::cmds::IsRenderbuffer>(); + if (c) { + c->Init(renderbuffer, result_shm_id, result_shm_offset); + } +} + +void IsShader(GLuint shader, uint32 result_shm_id, uint32 result_shm_offset) { + gles2::cmds::IsShader* c = GetCmdSpace<gles2::cmds::IsShader>(); + if (c) { + c->Init(shader, result_shm_id, result_shm_offset); + } +} + +void IsTexture(GLuint texture, uint32 result_shm_id, uint32 result_shm_offset) { + gles2::cmds::IsTexture* c = GetCmdSpace<gles2::cmds::IsTexture>(); + if (c) { + c->Init(texture, result_shm_id, result_shm_offset); + } +} + +void LineWidth(GLfloat width) { + gles2::cmds::LineWidth* c = GetCmdSpace<gles2::cmds::LineWidth>(); + if (c) { + c->Init(width); + } +} + +void LinkProgram(GLuint program) { + gles2::cmds::LinkProgram* c = GetCmdSpace<gles2::cmds::LinkProgram>(); + if (c) { + c->Init(program); + } +} + +void PixelStorei(GLenum pname, GLint param) { + gles2::cmds::PixelStorei* c = GetCmdSpace<gles2::cmds::PixelStorei>(); + if (c) { + c->Init(pname, param); + } +} + +void PolygonOffset(GLfloat factor, GLfloat units) { + gles2::cmds::PolygonOffset* c = GetCmdSpace<gles2::cmds::PolygonOffset>(); + if (c) { + c->Init(factor, units); + } +} + +void ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + uint32 pixels_shm_id, + uint32 pixels_shm_offset, + uint32 result_shm_id, + uint32 result_shm_offset, + GLboolean async) { + gles2::cmds::ReadPixels* c = GetCmdSpace<gles2::cmds::ReadPixels>(); + if (c) { + c->Init(x, + y, + width, + height, + format, + type, + pixels_shm_id, + pixels_shm_offset, + result_shm_id, + result_shm_offset, + async); + } +} + +void ReleaseShaderCompiler() { + gles2::cmds::ReleaseShaderCompiler* c = + GetCmdSpace<gles2::cmds::ReleaseShaderCompiler>(); + if (c) { + c->Init(); + } +} + +void RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) { + gles2::cmds::RenderbufferStorage* c = + GetCmdSpace<gles2::cmds::RenderbufferStorage>(); + if (c) { + c->Init(target, internalformat, width, height); + } +} + +void SampleCoverage(GLclampf value, GLboolean invert) { + gles2::cmds::SampleCoverage* c = GetCmdSpace<gles2::cmds::SampleCoverage>(); + if (c) { + c->Init(value, invert); + } +} + +void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { + gles2::cmds::Scissor* c = GetCmdSpace<gles2::cmds::Scissor>(); + if (c) { + c->Init(x, y, width, height); + } +} + +void ShaderBinary(GLsizei n, + uint32 shaders_shm_id, + uint32 shaders_shm_offset, + GLenum binaryformat, + uint32 binary_shm_id, + uint32 binary_shm_offset, + GLsizei length) { + gles2::cmds::ShaderBinary* c = GetCmdSpace<gles2::cmds::ShaderBinary>(); + if (c) { + c->Init(n, + shaders_shm_id, + shaders_shm_offset, + binaryformat, + binary_shm_id, + binary_shm_offset, + length); + } +} + +void ShaderSource(GLuint shader, + uint32 data_shm_id, + uint32 data_shm_offset, + uint32 data_size) { + gles2::cmds::ShaderSource* c = GetCmdSpace<gles2::cmds::ShaderSource>(); + if (c) { + c->Init(shader, data_shm_id, data_shm_offset, data_size); + } +} + +void ShaderSourceBucket(GLuint shader, uint32 data_bucket_id) { + gles2::cmds::ShaderSourceBucket* c = + GetCmdSpace<gles2::cmds::ShaderSourceBucket>(); + if (c) { + c->Init(shader, data_bucket_id); + } +} + +void StencilFunc(GLenum func, GLint ref, GLuint mask) { + gles2::cmds::StencilFunc* c = GetCmdSpace<gles2::cmds::StencilFunc>(); + if (c) { + c->Init(func, ref, mask); + } +} + +void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { + gles2::cmds::StencilFuncSeparate* c = + GetCmdSpace<gles2::cmds::StencilFuncSeparate>(); + if (c) { + c->Init(face, func, ref, mask); + } +} + +void StencilMask(GLuint mask) { + gles2::cmds::StencilMask* c = GetCmdSpace<gles2::cmds::StencilMask>(); + if (c) { + c->Init(mask); + } +} + +void StencilMaskSeparate(GLenum face, GLuint mask) { + gles2::cmds::StencilMaskSeparate* c = + GetCmdSpace<gles2::cmds::StencilMaskSeparate>(); + if (c) { + c->Init(face, mask); + } +} + +void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) { + gles2::cmds::StencilOp* c = GetCmdSpace<gles2::cmds::StencilOp>(); + if (c) { + c->Init(fail, zfail, zpass); + } +} + +void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { + gles2::cmds::StencilOpSeparate* c = + GetCmdSpace<gles2::cmds::StencilOpSeparate>(); + if (c) { + c->Init(face, fail, zfail, zpass); + } +} + +void TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + uint32 pixels_shm_id, + uint32 pixels_shm_offset) { + gles2::cmds::TexImage2D* c = GetCmdSpace<gles2::cmds::TexImage2D>(); + if (c) { + c->Init(target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels_shm_id, + pixels_shm_offset); + } +} + +void TexParameterf(GLenum target, GLenum pname, GLfloat param) { + gles2::cmds::TexParameterf* c = GetCmdSpace<gles2::cmds::TexParameterf>(); + if (c) { + c->Init(target, pname, param); + } +} + +void TexParameterfv(GLenum target, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::TexParameterfv* c = GetCmdSpace<gles2::cmds::TexParameterfv>(); + if (c) { + c->Init(target, pname, params_shm_id, params_shm_offset); + } +} + +void TexParameterfvImmediate(GLenum target, + GLenum pname, + const GLfloat* params) { + const uint32 size = gles2::cmds::TexParameterfvImmediate::ComputeSize(); + gles2::cmds::TexParameterfvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterfvImmediate>(size); + if (c) { + c->Init(target, pname, params); + } +} + +void TexParameteri(GLenum target, GLenum pname, GLint param) { + gles2::cmds::TexParameteri* c = GetCmdSpace<gles2::cmds::TexParameteri>(); + if (c) { + c->Init(target, pname, param); + } +} + +void TexParameteriv(GLenum target, + GLenum pname, + uint32 params_shm_id, + uint32 params_shm_offset) { + gles2::cmds::TexParameteriv* c = GetCmdSpace<gles2::cmds::TexParameteriv>(); + if (c) { + c->Init(target, pname, params_shm_id, params_shm_offset); + } +} + +void TexParameterivImmediate(GLenum target, GLenum pname, const GLint* params) { + const uint32 size = gles2::cmds::TexParameterivImmediate::ComputeSize(); + gles2::cmds::TexParameterivImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterivImmediate>(size); + if (c) { + c->Init(target, pname, params); + } +} + +void TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + uint32 pixels_shm_id, + uint32 pixels_shm_offset, + GLboolean internal) { + gles2::cmds::TexSubImage2D* c = GetCmdSpace<gles2::cmds::TexSubImage2D>(); + if (c) { + c->Init(target, + level, + xoffset, + yoffset, + width, + height, + format, + type, + pixels_shm_id, + pixels_shm_offset, + internal); + } +} + +void Uniform1f(GLint location, GLfloat x) { + gles2::cmds::Uniform1f* c = GetCmdSpace<gles2::cmds::Uniform1f>(); + if (c) { + c->Init(location, x); + } +} + +void Uniform1fv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform1fv* c = GetCmdSpace<gles2::cmds::Uniform1fv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform1fvImmediate(GLint location, GLsizei count, const GLfloat* v) { + const uint32 size = gles2::cmds::Uniform1fvImmediate::ComputeSize(count); + gles2::cmds::Uniform1fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1fvImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void Uniform1i(GLint location, GLint x) { + gles2::cmds::Uniform1i* c = GetCmdSpace<gles2::cmds::Uniform1i>(); + if (c) { + c->Init(location, x); + } +} + +void Uniform1iv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform1iv* c = GetCmdSpace<gles2::cmds::Uniform1iv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform1ivImmediate(GLint location, GLsizei count, const GLint* v) { + const uint32 size = gles2::cmds::Uniform1ivImmediate::ComputeSize(count); + gles2::cmds::Uniform1ivImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1ivImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void Uniform2f(GLint location, GLfloat x, GLfloat y) { + gles2::cmds::Uniform2f* c = GetCmdSpace<gles2::cmds::Uniform2f>(); + if (c) { + c->Init(location, x, y); + } +} + +void Uniform2fv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform2fv* c = GetCmdSpace<gles2::cmds::Uniform2fv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform2fvImmediate(GLint location, GLsizei count, const GLfloat* v) { + const uint32 size = gles2::cmds::Uniform2fvImmediate::ComputeSize(count); + gles2::cmds::Uniform2fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2fvImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void Uniform2i(GLint location, GLint x, GLint y) { + gles2::cmds::Uniform2i* c = GetCmdSpace<gles2::cmds::Uniform2i>(); + if (c) { + c->Init(location, x, y); + } +} + +void Uniform2iv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform2iv* c = GetCmdSpace<gles2::cmds::Uniform2iv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform2ivImmediate(GLint location, GLsizei count, const GLint* v) { + const uint32 size = gles2::cmds::Uniform2ivImmediate::ComputeSize(count); + gles2::cmds::Uniform2ivImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2ivImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) { + gles2::cmds::Uniform3f* c = GetCmdSpace<gles2::cmds::Uniform3f>(); + if (c) { + c->Init(location, x, y, z); + } +} + +void Uniform3fv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform3fv* c = GetCmdSpace<gles2::cmds::Uniform3fv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform3fvImmediate(GLint location, GLsizei count, const GLfloat* v) { + const uint32 size = gles2::cmds::Uniform3fvImmediate::ComputeSize(count); + gles2::cmds::Uniform3fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3fvImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void Uniform3i(GLint location, GLint x, GLint y, GLint z) { + gles2::cmds::Uniform3i* c = GetCmdSpace<gles2::cmds::Uniform3i>(); + if (c) { + c->Init(location, x, y, z); + } +} + +void Uniform3iv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform3iv* c = GetCmdSpace<gles2::cmds::Uniform3iv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform3ivImmediate(GLint location, GLsizei count, const GLint* v) { + const uint32 size = gles2::cmds::Uniform3ivImmediate::ComputeSize(count); + gles2::cmds::Uniform3ivImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3ivImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { + gles2::cmds::Uniform4f* c = GetCmdSpace<gles2::cmds::Uniform4f>(); + if (c) { + c->Init(location, x, y, z, w); + } +} + +void Uniform4fv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform4fv* c = GetCmdSpace<gles2::cmds::Uniform4fv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform4fvImmediate(GLint location, GLsizei count, const GLfloat* v) { + const uint32 size = gles2::cmds::Uniform4fvImmediate::ComputeSize(count); + gles2::cmds::Uniform4fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4fvImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { + gles2::cmds::Uniform4i* c = GetCmdSpace<gles2::cmds::Uniform4i>(); + if (c) { + c->Init(location, x, y, z, w); + } +} + +void Uniform4iv(GLint location, + GLsizei count, + uint32 v_shm_id, + uint32 v_shm_offset) { + gles2::cmds::Uniform4iv* c = GetCmdSpace<gles2::cmds::Uniform4iv>(); + if (c) { + c->Init(location, count, v_shm_id, v_shm_offset); + } +} + +void Uniform4ivImmediate(GLint location, GLsizei count, const GLint* v) { + const uint32 size = gles2::cmds::Uniform4ivImmediate::ComputeSize(count); + gles2::cmds::Uniform4ivImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4ivImmediate>(size); + if (c) { + c->Init(location, count, v); + } +} + +void UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + uint32 value_shm_id, + uint32 value_shm_offset) { + gles2::cmds::UniformMatrix2fv* c = + GetCmdSpace<gles2::cmds::UniformMatrix2fv>(); + if (c) { + c->Init(location, count, transpose, value_shm_id, value_shm_offset); + } +} + +void UniformMatrix2fvImmediate(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { + const uint32 size = + gles2::cmds::UniformMatrix2fvImmediate::ComputeSize(count); + gles2::cmds::UniformMatrix2fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix2fvImmediate>( + size); + if (c) { + c->Init(location, count, transpose, value); + } +} + +void UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + uint32 value_shm_id, + uint32 value_shm_offset) { + gles2::cmds::UniformMatrix3fv* c = + GetCmdSpace<gles2::cmds::UniformMatrix3fv>(); + if (c) { + c->Init(location, count, transpose, value_shm_id, value_shm_offset); + } +} + +void UniformMatrix3fvImmediate(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { + const uint32 size = + gles2::cmds::UniformMatrix3fvImmediate::ComputeSize(count); + gles2::cmds::UniformMatrix3fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix3fvImmediate>( + size); + if (c) { + c->Init(location, count, transpose, value); + } +} + +void UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + uint32 value_shm_id, + uint32 value_shm_offset) { + gles2::cmds::UniformMatrix4fv* c = + GetCmdSpace<gles2::cmds::UniformMatrix4fv>(); + if (c) { + c->Init(location, count, transpose, value_shm_id, value_shm_offset); + } +} + +void UniformMatrix4fvImmediate(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { + const uint32 size = + gles2::cmds::UniformMatrix4fvImmediate::ComputeSize(count); + gles2::cmds::UniformMatrix4fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix4fvImmediate>( + size); + if (c) { + c->Init(location, count, transpose, value); + } +} + +void UseProgram(GLuint program) { + gles2::cmds::UseProgram* c = GetCmdSpace<gles2::cmds::UseProgram>(); + if (c) { + c->Init(program); + } +} + +void ValidateProgram(GLuint program) { + gles2::cmds::ValidateProgram* c = GetCmdSpace<gles2::cmds::ValidateProgram>(); + if (c) { + c->Init(program); + } +} + +void VertexAttrib1f(GLuint indx, GLfloat x) { + gles2::cmds::VertexAttrib1f* c = GetCmdSpace<gles2::cmds::VertexAttrib1f>(); + if (c) { + c->Init(indx, x); + } +} + +void VertexAttrib1fv(GLuint indx, + uint32 values_shm_id, + uint32 values_shm_offset) { + gles2::cmds::VertexAttrib1fv* c = GetCmdSpace<gles2::cmds::VertexAttrib1fv>(); + if (c) { + c->Init(indx, values_shm_id, values_shm_offset); + } +} + +void VertexAttrib1fvImmediate(GLuint indx, const GLfloat* values) { + const uint32 size = gles2::cmds::VertexAttrib1fvImmediate::ComputeSize(); + gles2::cmds::VertexAttrib1fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib1fvImmediate>( + size); + if (c) { + c->Init(indx, values); + } +} + +void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { + gles2::cmds::VertexAttrib2f* c = GetCmdSpace<gles2::cmds::VertexAttrib2f>(); + if (c) { + c->Init(indx, x, y); + } +} + +void VertexAttrib2fv(GLuint indx, + uint32 values_shm_id, + uint32 values_shm_offset) { + gles2::cmds::VertexAttrib2fv* c = GetCmdSpace<gles2::cmds::VertexAttrib2fv>(); + if (c) { + c->Init(indx, values_shm_id, values_shm_offset); + } +} + +void VertexAttrib2fvImmediate(GLuint indx, const GLfloat* values) { + const uint32 size = gles2::cmds::VertexAttrib2fvImmediate::ComputeSize(); + gles2::cmds::VertexAttrib2fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib2fvImmediate>( + size); + if (c) { + c->Init(indx, values); + } +} + +void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { + gles2::cmds::VertexAttrib3f* c = GetCmdSpace<gles2::cmds::VertexAttrib3f>(); + if (c) { + c->Init(indx, x, y, z); + } +} + +void VertexAttrib3fv(GLuint indx, + uint32 values_shm_id, + uint32 values_shm_offset) { + gles2::cmds::VertexAttrib3fv* c = GetCmdSpace<gles2::cmds::VertexAttrib3fv>(); + if (c) { + c->Init(indx, values_shm_id, values_shm_offset); + } +} + +void VertexAttrib3fvImmediate(GLuint indx, const GLfloat* values) { + const uint32 size = gles2::cmds::VertexAttrib3fvImmediate::ComputeSize(); + gles2::cmds::VertexAttrib3fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib3fvImmediate>( + size); + if (c) { + c->Init(indx, values); + } +} + +void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { + gles2::cmds::VertexAttrib4f* c = GetCmdSpace<gles2::cmds::VertexAttrib4f>(); + if (c) { + c->Init(indx, x, y, z, w); + } +} + +void VertexAttrib4fv(GLuint indx, + uint32 values_shm_id, + uint32 values_shm_offset) { + gles2::cmds::VertexAttrib4fv* c = GetCmdSpace<gles2::cmds::VertexAttrib4fv>(); + if (c) { + c->Init(indx, values_shm_id, values_shm_offset); + } +} + +void VertexAttrib4fvImmediate(GLuint indx, const GLfloat* values) { + const uint32 size = gles2::cmds::VertexAttrib4fvImmediate::ComputeSize(); + gles2::cmds::VertexAttrib4fvImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib4fvImmediate>( + size); + if (c) { + c->Init(indx, values); + } +} + +void VertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + GLuint offset) { + gles2::cmds::VertexAttribPointer* c = + GetCmdSpace<gles2::cmds::VertexAttribPointer>(); + if (c) { + c->Init(indx, size, type, normalized, stride, offset); + } +} + +void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { + gles2::cmds::Viewport* c = GetCmdSpace<gles2::cmds::Viewport>(); + if (c) { + c->Init(x, y, width, height); + } +} + +void BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) { + gles2::cmds::BlitFramebufferCHROMIUM* c = + GetCmdSpace<gles2::cmds::BlitFramebufferCHROMIUM>(); + if (c) { + c->Init( + srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + } +} + +void RenderbufferStorageMultisampleCHROMIUM(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) { + gles2::cmds::RenderbufferStorageMultisampleCHROMIUM* c = + GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleCHROMIUM>(); + if (c) { + c->Init(target, samples, internalformat, width, height); + } +} + +void RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) { + gles2::cmds::RenderbufferStorageMultisampleEXT* c = + GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleEXT>(); + if (c) { + c->Init(target, samples, internalformat, width, height); + } +} + +void FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) { + gles2::cmds::FramebufferTexture2DMultisampleEXT* c = + GetCmdSpace<gles2::cmds::FramebufferTexture2DMultisampleEXT>(); + if (c) { + c->Init(target, attachment, textarget, texture, level, samples); + } +} + +void TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) { + gles2::cmds::TexStorage2DEXT* c = GetCmdSpace<gles2::cmds::TexStorage2DEXT>(); + if (c) { + c->Init(target, levels, internalFormat, width, height); + } +} + +void GenQueriesEXT(GLsizei n, + uint32 queries_shm_id, + uint32 queries_shm_offset) { + gles2::cmds::GenQueriesEXT* c = GetCmdSpace<gles2::cmds::GenQueriesEXT>(); + if (c) { + c->Init(n, queries_shm_id, queries_shm_offset); + } +} + +void GenQueriesEXTImmediate(GLsizei n, GLuint* queries) { + const uint32 size = gles2::cmds::GenQueriesEXTImmediate::ComputeSize(n); + gles2::cmds::GenQueriesEXTImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::GenQueriesEXTImmediate>(size); + if (c) { + c->Init(n, queries); + } +} + +void DeleteQueriesEXT(GLsizei n, + uint32 queries_shm_id, + uint32 queries_shm_offset) { + gles2::cmds::DeleteQueriesEXT* c = + GetCmdSpace<gles2::cmds::DeleteQueriesEXT>(); + if (c) { + c->Init(n, queries_shm_id, queries_shm_offset); + } +} + +void DeleteQueriesEXTImmediate(GLsizei n, const GLuint* queries) { + const uint32 size = gles2::cmds::DeleteQueriesEXTImmediate::ComputeSize(n); + gles2::cmds::DeleteQueriesEXTImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteQueriesEXTImmediate>( + size); + if (c) { + c->Init(n, queries); + } +} + +void BeginQueryEXT(GLenum target, + GLuint id, + uint32 sync_data_shm_id, + uint32 sync_data_shm_offset) { + gles2::cmds::BeginQueryEXT* c = GetCmdSpace<gles2::cmds::BeginQueryEXT>(); + if (c) { + c->Init(target, id, sync_data_shm_id, sync_data_shm_offset); + } +} + +void EndQueryEXT(GLenum target, GLuint submit_count) { + gles2::cmds::EndQueryEXT* c = GetCmdSpace<gles2::cmds::EndQueryEXT>(); + if (c) { + c->Init(target, submit_count); + } +} + +void InsertEventMarkerEXT(GLuint bucket_id) { + gles2::cmds::InsertEventMarkerEXT* c = + GetCmdSpace<gles2::cmds::InsertEventMarkerEXT>(); + if (c) { + c->Init(bucket_id); + } +} + +void PushGroupMarkerEXT(GLuint bucket_id) { + gles2::cmds::PushGroupMarkerEXT* c = + GetCmdSpace<gles2::cmds::PushGroupMarkerEXT>(); + if (c) { + c->Init(bucket_id); + } +} + +void PopGroupMarkerEXT() { + gles2::cmds::PopGroupMarkerEXT* c = + GetCmdSpace<gles2::cmds::PopGroupMarkerEXT>(); + if (c) { + c->Init(); + } +} + +void GenVertexArraysOES(GLsizei n, + uint32 arrays_shm_id, + uint32 arrays_shm_offset) { + gles2::cmds::GenVertexArraysOES* c = + GetCmdSpace<gles2::cmds::GenVertexArraysOES>(); + if (c) { + c->Init(n, arrays_shm_id, arrays_shm_offset); + } +} + +void GenVertexArraysOESImmediate(GLsizei n, GLuint* arrays) { + const uint32 size = gles2::cmds::GenVertexArraysOESImmediate::ComputeSize(n); + gles2::cmds::GenVertexArraysOESImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::GenVertexArraysOESImmediate>( + size); + if (c) { + c->Init(n, arrays); + } +} + +void DeleteVertexArraysOES(GLsizei n, + uint32 arrays_shm_id, + uint32 arrays_shm_offset) { + gles2::cmds::DeleteVertexArraysOES* c = + GetCmdSpace<gles2::cmds::DeleteVertexArraysOES>(); + if (c) { + c->Init(n, arrays_shm_id, arrays_shm_offset); + } +} + +void DeleteVertexArraysOESImmediate(GLsizei n, const GLuint* arrays) { + const uint32 size = + gles2::cmds::DeleteVertexArraysOESImmediate::ComputeSize(n); + gles2::cmds::DeleteVertexArraysOESImmediate* c = + GetImmediateCmdSpaceTotalSize< + gles2::cmds::DeleteVertexArraysOESImmediate>(size); // NOLINT + if (c) { + c->Init(n, arrays); + } +} + +void IsVertexArrayOES(GLuint array, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::IsVertexArrayOES* c = + GetCmdSpace<gles2::cmds::IsVertexArrayOES>(); + if (c) { + c->Init(array, result_shm_id, result_shm_offset); + } +} + +void BindVertexArrayOES(GLuint array) { + gles2::cmds::BindVertexArrayOES* c = + GetCmdSpace<gles2::cmds::BindVertexArrayOES>(); + if (c) { + c->Init(array); + } +} + +void SwapBuffers() { + gles2::cmds::SwapBuffers* c = GetCmdSpace<gles2::cmds::SwapBuffers>(); + if (c) { + c->Init(); + } +} + +void GetMaxValueInBufferCHROMIUM(GLuint buffer_id, + GLsizei count, + GLenum type, + GLuint offset, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::GetMaxValueInBufferCHROMIUM* c = + GetCmdSpace<gles2::cmds::GetMaxValueInBufferCHROMIUM>(); + if (c) { + c->Init(buffer_id, count, type, offset, result_shm_id, result_shm_offset); + } +} + +void GenSharedIdsCHROMIUM(GLuint namespace_id, + GLuint id_offset, + GLsizei n, + uint32 ids_shm_id, + uint32 ids_shm_offset) { + gles2::cmds::GenSharedIdsCHROMIUM* c = + GetCmdSpace<gles2::cmds::GenSharedIdsCHROMIUM>(); + if (c) { + c->Init(namespace_id, id_offset, n, ids_shm_id, ids_shm_offset); + } +} + +void DeleteSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + uint32 ids_shm_id, + uint32 ids_shm_offset) { + gles2::cmds::DeleteSharedIdsCHROMIUM* c = + GetCmdSpace<gles2::cmds::DeleteSharedIdsCHROMIUM>(); + if (c) { + c->Init(namespace_id, n, ids_shm_id, ids_shm_offset); + } +} + +void RegisterSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + uint32 ids_shm_id, + uint32 ids_shm_offset) { + gles2::cmds::RegisterSharedIdsCHROMIUM* c = + GetCmdSpace<gles2::cmds::RegisterSharedIdsCHROMIUM>(); + if (c) { + c->Init(namespace_id, n, ids_shm_id, ids_shm_offset); + } +} + +void EnableFeatureCHROMIUM(GLuint bucket_id, + uint32 result_shm_id, + uint32 result_shm_offset) { + gles2::cmds::EnableFeatureCHROMIUM* c = + GetCmdSpace<gles2::cmds::EnableFeatureCHROMIUM>(); + if (c) { + c->Init(bucket_id, result_shm_id, result_shm_offset); + } +} + +void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) { + gles2::cmds::ResizeCHROMIUM* c = GetCmdSpace<gles2::cmds::ResizeCHROMIUM>(); + if (c) { + c->Init(width, height, scale_factor); + } +} + +void GetRequestableExtensionsCHROMIUM(uint32 bucket_id) { + gles2::cmds::GetRequestableExtensionsCHROMIUM* c = + GetCmdSpace<gles2::cmds::GetRequestableExtensionsCHROMIUM>(); + if (c) { + c->Init(bucket_id); + } +} + +void RequestExtensionCHROMIUM(uint32 bucket_id) { + gles2::cmds::RequestExtensionCHROMIUM* c = + GetCmdSpace<gles2::cmds::RequestExtensionCHROMIUM>(); + if (c) { + c->Init(bucket_id); + } +} + +void GetMultipleIntegervCHROMIUM(uint32 pnames_shm_id, + uint32 pnames_shm_offset, + GLuint count, + uint32 results_shm_id, + uint32 results_shm_offset, + GLsizeiptr size) { + gles2::cmds::GetMultipleIntegervCHROMIUM* c = + GetCmdSpace<gles2::cmds::GetMultipleIntegervCHROMIUM>(); + if (c) { + c->Init(pnames_shm_id, + pnames_shm_offset, + count, + results_shm_id, + results_shm_offset, size); - if (c) { - c->Init(n, queries); - } - } - - void DeleteQueriesEXT( - GLsizei n, uint32 queries_shm_id, uint32 queries_shm_offset) { - gles2::cmds::DeleteQueriesEXT* c = - GetCmdSpace<gles2::cmds::DeleteQueriesEXT>(); - if (c) { - c->Init(n, queries_shm_id, queries_shm_offset); - } - } - - void DeleteQueriesEXTImmediate(GLsizei n, const GLuint* queries) { - const uint32 size = gles2::cmds::DeleteQueriesEXTImmediate::ComputeSize(n); - gles2::cmds::DeleteQueriesEXTImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteQueriesEXTImmediate>( - size); - if (c) { - c->Init(n, queries); - } - } - - void BeginQueryEXT( - GLenum target, GLuint id, uint32 sync_data_shm_id, - uint32 sync_data_shm_offset) { - gles2::cmds::BeginQueryEXT* c = GetCmdSpace<gles2::cmds::BeginQueryEXT>(); - if (c) { - c->Init(target, id, sync_data_shm_id, sync_data_shm_offset); - } - } - - void EndQueryEXT(GLenum target, GLuint submit_count) { - gles2::cmds::EndQueryEXT* c = GetCmdSpace<gles2::cmds::EndQueryEXT>(); - if (c) { - c->Init(target, submit_count); - } - } - - void InsertEventMarkerEXT(GLuint bucket_id) { - gles2::cmds::InsertEventMarkerEXT* c = - GetCmdSpace<gles2::cmds::InsertEventMarkerEXT>(); - if (c) { - c->Init(bucket_id); - } - } - - void PushGroupMarkerEXT(GLuint bucket_id) { - gles2::cmds::PushGroupMarkerEXT* c = - GetCmdSpace<gles2::cmds::PushGroupMarkerEXT>(); - if (c) { - c->Init(bucket_id); - } - } - - void PopGroupMarkerEXT() { - gles2::cmds::PopGroupMarkerEXT* c = - GetCmdSpace<gles2::cmds::PopGroupMarkerEXT>(); - if (c) { - c->Init(); - } - } - - void GenVertexArraysOES( - GLsizei n, uint32 arrays_shm_id, uint32 arrays_shm_offset) { - gles2::cmds::GenVertexArraysOES* c = - GetCmdSpace<gles2::cmds::GenVertexArraysOES>(); - if (c) { - c->Init(n, arrays_shm_id, arrays_shm_offset); - } - } - - void GenVertexArraysOESImmediate(GLsizei n, GLuint* arrays) { - const uint32 size = - gles2::cmds::GenVertexArraysOESImmediate::ComputeSize(n); - gles2::cmds::GenVertexArraysOESImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::GenVertexArraysOESImmediate>( - size); - if (c) { - c->Init(n, arrays); - } - } - - void DeleteVertexArraysOES( - GLsizei n, uint32 arrays_shm_id, uint32 arrays_shm_offset) { - gles2::cmds::DeleteVertexArraysOES* c = - GetCmdSpace<gles2::cmds::DeleteVertexArraysOES>(); - if (c) { - c->Init(n, arrays_shm_id, arrays_shm_offset); - } - } - - void DeleteVertexArraysOESImmediate(GLsizei n, const GLuint* arrays) { - const uint32 size = - gles2::cmds::DeleteVertexArraysOESImmediate::ComputeSize(n); - gles2::cmds::DeleteVertexArraysOESImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteVertexArraysOESImmediate>(size); // NOLINT - if (c) { - c->Init(n, arrays); - } - } - - void IsVertexArrayOES( - GLuint array, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::IsVertexArrayOES* c = - GetCmdSpace<gles2::cmds::IsVertexArrayOES>(); - if (c) { - c->Init(array, result_shm_id, result_shm_offset); - } - } - - void BindVertexArrayOES(GLuint array) { - gles2::cmds::BindVertexArrayOES* c = - GetCmdSpace<gles2::cmds::BindVertexArrayOES>(); - if (c) { - c->Init(array); - } - } - - void SwapBuffers() { - gles2::cmds::SwapBuffers* c = GetCmdSpace<gles2::cmds::SwapBuffers>(); - if (c) { - c->Init(); - } - } - - void GetMaxValueInBufferCHROMIUM( - GLuint buffer_id, GLsizei count, GLenum type, GLuint offset, - uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::GetMaxValueInBufferCHROMIUM* c = - GetCmdSpace<gles2::cmds::GetMaxValueInBufferCHROMIUM>(); - if (c) { - c->Init( - buffer_id, count, type, offset, result_shm_id, result_shm_offset); - } - } - - void GenSharedIdsCHROMIUM( - GLuint namespace_id, GLuint id_offset, GLsizei n, uint32 ids_shm_id, - uint32 ids_shm_offset) { - gles2::cmds::GenSharedIdsCHROMIUM* c = - GetCmdSpace<gles2::cmds::GenSharedIdsCHROMIUM>(); - if (c) { - c->Init(namespace_id, id_offset, n, ids_shm_id, ids_shm_offset); - } - } - - void DeleteSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, uint32 ids_shm_id, - uint32 ids_shm_offset) { - gles2::cmds::DeleteSharedIdsCHROMIUM* c = - GetCmdSpace<gles2::cmds::DeleteSharedIdsCHROMIUM>(); - if (c) { - c->Init(namespace_id, n, ids_shm_id, ids_shm_offset); - } - } - - void RegisterSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, uint32 ids_shm_id, - uint32 ids_shm_offset) { - gles2::cmds::RegisterSharedIdsCHROMIUM* c = - GetCmdSpace<gles2::cmds::RegisterSharedIdsCHROMIUM>(); - if (c) { - c->Init(namespace_id, n, ids_shm_id, ids_shm_offset); - } - } - - void EnableFeatureCHROMIUM( - GLuint bucket_id, uint32 result_shm_id, uint32 result_shm_offset) { - gles2::cmds::EnableFeatureCHROMIUM* c = - GetCmdSpace<gles2::cmds::EnableFeatureCHROMIUM>(); - if (c) { - c->Init(bucket_id, result_shm_id, result_shm_offset); - } - } - - void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) { - gles2::cmds::ResizeCHROMIUM* c = - GetCmdSpace<gles2::cmds::ResizeCHROMIUM>(); - if (c) { - c->Init(width, height, scale_factor); - } - } - - void GetRequestableExtensionsCHROMIUM(uint32 bucket_id) { - gles2::cmds::GetRequestableExtensionsCHROMIUM* c = - GetCmdSpace<gles2::cmds::GetRequestableExtensionsCHROMIUM>(); - if (c) { - c->Init(bucket_id); - } - } - - void RequestExtensionCHROMIUM(uint32 bucket_id) { - gles2::cmds::RequestExtensionCHROMIUM* c = - GetCmdSpace<gles2::cmds::RequestExtensionCHROMIUM>(); - if (c) { - c->Init(bucket_id); - } - } - - void GetMultipleIntegervCHROMIUM( - uint32 pnames_shm_id, uint32 pnames_shm_offset, GLuint count, - uint32 results_shm_id, uint32 results_shm_offset, GLsizeiptr size) { - gles2::cmds::GetMultipleIntegervCHROMIUM* c = - GetCmdSpace<gles2::cmds::GetMultipleIntegervCHROMIUM>(); - if (c) { - c->Init( - pnames_shm_id, pnames_shm_offset, count, results_shm_id, - results_shm_offset, size); - } - } - - void GetProgramInfoCHROMIUM(GLuint program, uint32 bucket_id) { - gles2::cmds::GetProgramInfoCHROMIUM* c = - GetCmdSpace<gles2::cmds::GetProgramInfoCHROMIUM>(); - if (c) { - c->Init(program, bucket_id); - } - } - - void GetTranslatedShaderSourceANGLE(GLuint shader, uint32 bucket_id) { - gles2::cmds::GetTranslatedShaderSourceANGLE* c = - GetCmdSpace<gles2::cmds::GetTranslatedShaderSourceANGLE>(); - if (c) { - c->Init(shader, bucket_id); - } - } - - void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) { - gles2::cmds::PostSubBufferCHROMIUM* c = - GetCmdSpace<gles2::cmds::PostSubBufferCHROMIUM>(); - if (c) { - c->Init(x, y, width, height); - } - } - - void TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) { - gles2::cmds::TexImageIOSurface2DCHROMIUM* c = - GetCmdSpace<gles2::cmds::TexImageIOSurface2DCHROMIUM>(); - if (c) { - c->Init(target, width, height, ioSurfaceId, plane); - } - } - - void CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) { - gles2::cmds::CopyTextureCHROMIUM* c = - GetCmdSpace<gles2::cmds::CopyTextureCHROMIUM>(); - if (c) { - c->Init(target, source_id, dest_id, level, internalformat, dest_type); - } - } - - void DrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) { - gles2::cmds::DrawArraysInstancedANGLE* c = - GetCmdSpace<gles2::cmds::DrawArraysInstancedANGLE>(); - if (c) { - c->Init(mode, first, count, primcount); - } - } - - void DrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, GLuint index_offset, - GLsizei primcount) { - gles2::cmds::DrawElementsInstancedANGLE* c = - GetCmdSpace<gles2::cmds::DrawElementsInstancedANGLE>(); - if (c) { - c->Init(mode, count, type, index_offset, primcount); - } - } - - void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) { - gles2::cmds::VertexAttribDivisorANGLE* c = - GetCmdSpace<gles2::cmds::VertexAttribDivisorANGLE>(); - if (c) { - c->Init(index, divisor); - } - } - - void ProduceTextureCHROMIUM( - GLenum target, uint32 mailbox_shm_id, uint32 mailbox_shm_offset) { - gles2::cmds::ProduceTextureCHROMIUM* c = - GetCmdSpace<gles2::cmds::ProduceTextureCHROMIUM>(); - if (c) { - c->Init(target, mailbox_shm_id, mailbox_shm_offset); - } - } - - void ProduceTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) { - const uint32 size = - gles2::cmds::ProduceTextureCHROMIUMImmediate::ComputeSize(); - gles2::cmds::ProduceTextureCHROMIUMImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::ProduceTextureCHROMIUMImmediate>(size); // NOLINT - if (c) { - c->Init(target, mailbox); - } - } - - void ConsumeTextureCHROMIUM( - GLenum target, uint32 mailbox_shm_id, uint32 mailbox_shm_offset) { - gles2::cmds::ConsumeTextureCHROMIUM* c = - GetCmdSpace<gles2::cmds::ConsumeTextureCHROMIUM>(); - if (c) { - c->Init(target, mailbox_shm_id, mailbox_shm_offset); - } - } - - void ConsumeTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) { - const uint32 size = - gles2::cmds::ConsumeTextureCHROMIUMImmediate::ComputeSize(); - gles2::cmds::ConsumeTextureCHROMIUMImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::ConsumeTextureCHROMIUMImmediate>(size); // NOLINT - if (c) { - c->Init(target, mailbox); - } - } - - void BindUniformLocationCHROMIUM( - GLuint program, GLint location, uint32 name_shm_id, - uint32 name_shm_offset, uint32 data_size) { - gles2::cmds::BindUniformLocationCHROMIUM* c = - GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUM>(); - if (c) { - c->Init(program, location, name_shm_id, name_shm_offset, data_size); - } - } - - void BindUniformLocationCHROMIUMBucket( - GLuint program, GLint location, uint32 name_bucket_id) { - gles2::cmds::BindUniformLocationCHROMIUMBucket* c = - GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUMBucket>(); - if (c) { - c->Init(program, location, name_bucket_id); - } - } - - void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) { - gles2::cmds::BindTexImage2DCHROMIUM* c = - GetCmdSpace<gles2::cmds::BindTexImage2DCHROMIUM>(); - if (c) { - c->Init(target, imageId); - } - } - - void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) { - gles2::cmds::ReleaseTexImage2DCHROMIUM* c = - GetCmdSpace<gles2::cmds::ReleaseTexImage2DCHROMIUM>(); - if (c) { - c->Init(target, imageId); - } - } - - void TraceBeginCHROMIUM(GLuint bucket_id) { - gles2::cmds::TraceBeginCHROMIUM* c = - GetCmdSpace<gles2::cmds::TraceBeginCHROMIUM>(); - if (c) { - c->Init(bucket_id); - } - } - - void TraceEndCHROMIUM() { - gles2::cmds::TraceEndCHROMIUM* c = - GetCmdSpace<gles2::cmds::TraceEndCHROMIUM>(); - if (c) { - c->Init(); - } - } - - void AsyncTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, uint32 data_shm_id, - uint32 data_shm_offset) { - gles2::cmds::AsyncTexSubImage2DCHROMIUM* c = - GetCmdSpace<gles2::cmds::AsyncTexSubImage2DCHROMIUM>(); - if (c) { - c->Init( - target, level, xoffset, yoffset, width, height, format, type, - data_shm_id, data_shm_offset); - } - } - - void AsyncTexImage2DCHROMIUM( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - uint32 pixels_shm_id, uint32 pixels_shm_offset) { - gles2::cmds::AsyncTexImage2DCHROMIUM* c = - GetCmdSpace<gles2::cmds::AsyncTexImage2DCHROMIUM>(); - if (c) { - c->Init( - target, level, internalformat, width, height, border, format, type, - pixels_shm_id, pixels_shm_offset); - } - } - - void WaitAsyncTexImage2DCHROMIUM(GLenum target) { - gles2::cmds::WaitAsyncTexImage2DCHROMIUM* c = - GetCmdSpace<gles2::cmds::WaitAsyncTexImage2DCHROMIUM>(); - if (c) { - c->Init(target); - } - } - - void DiscardFramebufferEXT( - GLenum target, GLsizei count, uint32 attachments_shm_id, - uint32 attachments_shm_offset) { - gles2::cmds::DiscardFramebufferEXT* c = - GetCmdSpace<gles2::cmds::DiscardFramebufferEXT>(); - if (c) { - c->Init(target, count, attachments_shm_id, attachments_shm_offset); - } - } - - void DiscardFramebufferEXTImmediate( - GLenum target, GLsizei count, const GLenum* attachments) { - const uint32 size = - gles2::cmds::DiscardFramebufferEXTImmediate::ComputeSize(count); - gles2::cmds::DiscardFramebufferEXTImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DiscardFramebufferEXTImmediate>(size); // NOLINT - if (c) { - c->Init(target, count, attachments); - } - } - - void LoseContextCHROMIUM(GLenum current, GLenum other) { - gles2::cmds::LoseContextCHROMIUM* c = - GetCmdSpace<gles2::cmds::LoseContextCHROMIUM>(); - if (c) { - c->Init(current, other); - } - } - - void WaitSyncPointCHROMIUM(GLuint sync_point) { - gles2::cmds::WaitSyncPointCHROMIUM* c = - GetCmdSpace<gles2::cmds::WaitSyncPointCHROMIUM>(); - if (c) { - c->Init(sync_point); - } - } - - void DrawBuffersEXT( - GLsizei count, uint32 bufs_shm_id, uint32 bufs_shm_offset) { - gles2::cmds::DrawBuffersEXT* c = - GetCmdSpace<gles2::cmds::DrawBuffersEXT>(); - if (c) { - c->Init(count, bufs_shm_id, bufs_shm_offset); - } - } - - void DrawBuffersEXTImmediate(GLsizei count, const GLenum* bufs) { - const uint32 size = - gles2::cmds::DrawBuffersEXTImmediate::ComputeSize(count); - gles2::cmds::DrawBuffersEXTImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::DrawBuffersEXTImmediate>( - size); - if (c) { - c->Init(count, bufs); - } - } - - void DiscardBackbufferCHROMIUM() { - gles2::cmds::DiscardBackbufferCHROMIUM* c = - GetCmdSpace<gles2::cmds::DiscardBackbufferCHROMIUM>(); - if (c) { - c->Init(); - } } +} + +void GetProgramInfoCHROMIUM(GLuint program, uint32 bucket_id) { + gles2::cmds::GetProgramInfoCHROMIUM* c = + GetCmdSpace<gles2::cmds::GetProgramInfoCHROMIUM>(); + if (c) { + c->Init(program, bucket_id); + } +} + +void GetTranslatedShaderSourceANGLE(GLuint shader, uint32 bucket_id) { + gles2::cmds::GetTranslatedShaderSourceANGLE* c = + GetCmdSpace<gles2::cmds::GetTranslatedShaderSourceANGLE>(); + if (c) { + c->Init(shader, bucket_id); + } +} + +void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) { + gles2::cmds::PostSubBufferCHROMIUM* c = + GetCmdSpace<gles2::cmds::PostSubBufferCHROMIUM>(); + if (c) { + c->Init(x, y, width, height); + } +} + +void TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) { + gles2::cmds::TexImageIOSurface2DCHROMIUM* c = + GetCmdSpace<gles2::cmds::TexImageIOSurface2DCHROMIUM>(); + if (c) { + c->Init(target, width, height, ioSurfaceId, plane); + } +} + +void CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) { + gles2::cmds::CopyTextureCHROMIUM* c = + GetCmdSpace<gles2::cmds::CopyTextureCHROMIUM>(); + if (c) { + c->Init(target, source_id, dest_id, level, internalformat, dest_type); + } +} + +void DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) { + gles2::cmds::DrawArraysInstancedANGLE* c = + GetCmdSpace<gles2::cmds::DrawArraysInstancedANGLE>(); + if (c) { + c->Init(mode, first, count, primcount); + } +} + +void DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + GLuint index_offset, + GLsizei primcount) { + gles2::cmds::DrawElementsInstancedANGLE* c = + GetCmdSpace<gles2::cmds::DrawElementsInstancedANGLE>(); + if (c) { + c->Init(mode, count, type, index_offset, primcount); + } +} + +void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) { + gles2::cmds::VertexAttribDivisorANGLE* c = + GetCmdSpace<gles2::cmds::VertexAttribDivisorANGLE>(); + if (c) { + c->Init(index, divisor); + } +} + +void ProduceTextureCHROMIUM(GLenum target, + uint32 mailbox_shm_id, + uint32 mailbox_shm_offset) { + gles2::cmds::ProduceTextureCHROMIUM* c = + GetCmdSpace<gles2::cmds::ProduceTextureCHROMIUM>(); + if (c) { + c->Init(target, mailbox_shm_id, mailbox_shm_offset); + } +} + +void ProduceTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) { + const uint32 size = + gles2::cmds::ProduceTextureCHROMIUMImmediate::ComputeSize(); + gles2::cmds::ProduceTextureCHROMIUMImmediate* c = + GetImmediateCmdSpaceTotalSize< + gles2::cmds::ProduceTextureCHROMIUMImmediate>(size); // NOLINT + if (c) { + c->Init(target, mailbox); + } +} + +void ConsumeTextureCHROMIUM(GLenum target, + uint32 mailbox_shm_id, + uint32 mailbox_shm_offset) { + gles2::cmds::ConsumeTextureCHROMIUM* c = + GetCmdSpace<gles2::cmds::ConsumeTextureCHROMIUM>(); + if (c) { + c->Init(target, mailbox_shm_id, mailbox_shm_offset); + } +} + +void ConsumeTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) { + const uint32 size = + gles2::cmds::ConsumeTextureCHROMIUMImmediate::ComputeSize(); + gles2::cmds::ConsumeTextureCHROMIUMImmediate* c = + GetImmediateCmdSpaceTotalSize< + gles2::cmds::ConsumeTextureCHROMIUMImmediate>(size); // NOLINT + if (c) { + c->Init(target, mailbox); + } +} + +void BindUniformLocationCHROMIUM(GLuint program, + GLint location, + uint32 name_shm_id, + uint32 name_shm_offset, + uint32 data_size) { + gles2::cmds::BindUniformLocationCHROMIUM* c = + GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUM>(); + if (c) { + c->Init(program, location, name_shm_id, name_shm_offset, data_size); + } +} + +void BindUniformLocationCHROMIUMBucket(GLuint program, + GLint location, + uint32 name_bucket_id) { + gles2::cmds::BindUniformLocationCHROMIUMBucket* c = + GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUMBucket>(); + if (c) { + c->Init(program, location, name_bucket_id); + } +} + +void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) { + gles2::cmds::BindTexImage2DCHROMIUM* c = + GetCmdSpace<gles2::cmds::BindTexImage2DCHROMIUM>(); + if (c) { + c->Init(target, imageId); + } +} + +void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) { + gles2::cmds::ReleaseTexImage2DCHROMIUM* c = + GetCmdSpace<gles2::cmds::ReleaseTexImage2DCHROMIUM>(); + if (c) { + c->Init(target, imageId); + } +} + +void TraceBeginCHROMIUM(GLuint bucket_id) { + gles2::cmds::TraceBeginCHROMIUM* c = + GetCmdSpace<gles2::cmds::TraceBeginCHROMIUM>(); + if (c) { + c->Init(bucket_id); + } +} + +void TraceEndCHROMIUM() { + gles2::cmds::TraceEndCHROMIUM* c = + GetCmdSpace<gles2::cmds::TraceEndCHROMIUM>(); + if (c) { + c->Init(); + } +} + +void AsyncTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + uint32 data_shm_id, + uint32 data_shm_offset) { + gles2::cmds::AsyncTexSubImage2DCHROMIUM* c = + GetCmdSpace<gles2::cmds::AsyncTexSubImage2DCHROMIUM>(); + if (c) { + c->Init(target, + level, + xoffset, + yoffset, + width, + height, + format, + type, + data_shm_id, + data_shm_offset); + } +} + +void AsyncTexImage2DCHROMIUM(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + uint32 pixels_shm_id, + uint32 pixels_shm_offset) { + gles2::cmds::AsyncTexImage2DCHROMIUM* c = + GetCmdSpace<gles2::cmds::AsyncTexImage2DCHROMIUM>(); + if (c) { + c->Init(target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels_shm_id, + pixels_shm_offset); + } +} + +void WaitAsyncTexImage2DCHROMIUM(GLenum target) { + gles2::cmds::WaitAsyncTexImage2DCHROMIUM* c = + GetCmdSpace<gles2::cmds::WaitAsyncTexImage2DCHROMIUM>(); + if (c) { + c->Init(target); + } +} + +void DiscardFramebufferEXT(GLenum target, + GLsizei count, + uint32 attachments_shm_id, + uint32 attachments_shm_offset) { + gles2::cmds::DiscardFramebufferEXT* c = + GetCmdSpace<gles2::cmds::DiscardFramebufferEXT>(); + if (c) { + c->Init(target, count, attachments_shm_id, attachments_shm_offset); + } +} + +void DiscardFramebufferEXTImmediate(GLenum target, + GLsizei count, + const GLenum* attachments) { + const uint32 size = + gles2::cmds::DiscardFramebufferEXTImmediate::ComputeSize(count); + gles2::cmds::DiscardFramebufferEXTImmediate* c = + GetImmediateCmdSpaceTotalSize< + gles2::cmds::DiscardFramebufferEXTImmediate>(size); // NOLINT + if (c) { + c->Init(target, count, attachments); + } +} + +void LoseContextCHROMIUM(GLenum current, GLenum other) { + gles2::cmds::LoseContextCHROMIUM* c = + GetCmdSpace<gles2::cmds::LoseContextCHROMIUM>(); + if (c) { + c->Init(current, other); + } +} + +void WaitSyncPointCHROMIUM(GLuint sync_point) { + gles2::cmds::WaitSyncPointCHROMIUM* c = + GetCmdSpace<gles2::cmds::WaitSyncPointCHROMIUM>(); + if (c) { + c->Init(sync_point); + } +} + +void DrawBuffersEXT(GLsizei count, uint32 bufs_shm_id, uint32 bufs_shm_offset) { + gles2::cmds::DrawBuffersEXT* c = GetCmdSpace<gles2::cmds::DrawBuffersEXT>(); + if (c) { + c->Init(count, bufs_shm_id, bufs_shm_offset); + } +} + +void DrawBuffersEXTImmediate(GLsizei count, const GLenum* bufs) { + const uint32 size = gles2::cmds::DrawBuffersEXTImmediate::ComputeSize(count); + gles2::cmds::DrawBuffersEXTImmediate* c = + GetImmediateCmdSpaceTotalSize<gles2::cmds::DrawBuffersEXTImmediate>(size); + if (c) { + c->Init(count, bufs); + } +} + +void DiscardBackbufferCHROMIUM() { + gles2::cmds::DiscardBackbufferCHROMIUM* c = + GetCmdSpace<gles2::cmds::DiscardBackbufferCHROMIUM>(); + if (c) { + c->Init(); + } +} #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h index 0c54dc3..79b2aaa 100644 --- a/gpu/command_buffer/client/gles2_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_implementation.h to declare the @@ -15,8 +17,9 @@ virtual void ActiveTexture(GLenum texture) OVERRIDE; virtual void AttachShader(GLuint program, GLuint shader) OVERRIDE; -virtual void BindAttribLocation( - GLuint program, GLuint index, const char* name) OVERRIDE; +virtual void BindAttribLocation(GLuint program, + GLuint index, + const char* name) OVERRIDE; virtual void BindBuffer(GLenum target, GLuint buffer) OVERRIDE; @@ -26,8 +29,10 @@ virtual void BindRenderbuffer(GLenum target, GLuint renderbuffer) OVERRIDE; virtual void BindTexture(GLenum target, GLuint texture) OVERRIDE; -virtual void BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) OVERRIDE; +virtual void BlendColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) OVERRIDE; virtual void BlendEquation(GLenum mode) OVERRIDE; @@ -35,49 +40,77 @@ virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) OVERRIDE; virtual void BlendFunc(GLenum sfactor, GLenum dfactor) OVERRIDE; -virtual void BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) OVERRIDE; +virtual void BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) OVERRIDE; -virtual void BufferData( - GLenum target, GLsizeiptr size, const void* data, GLenum usage) OVERRIDE; +virtual void BufferData(GLenum target, + GLsizeiptr size, + const void* data, + GLenum usage) OVERRIDE; -virtual void BufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, - const void* data) OVERRIDE; +virtual void BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data) OVERRIDE; virtual GLenum CheckFramebufferStatus(GLenum target) OVERRIDE; virtual void Clear(GLbitfield mask) OVERRIDE; -virtual void ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) OVERRIDE; +virtual void ClearColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) OVERRIDE; virtual void ClearDepthf(GLclampf depth) OVERRIDE; virtual void ClearStencil(GLint s) OVERRIDE; -virtual void ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) OVERRIDE; +virtual void ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) OVERRIDE; virtual void CompileShader(GLuint shader) OVERRIDE; -virtual void CompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const void* data) OVERRIDE; - -virtual void CompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, - const void* data) OVERRIDE; - -virtual void CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) OVERRIDE; - -virtual void CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) OVERRIDE; +virtual void CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data) OVERRIDE; + +virtual void CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data) OVERRIDE; + +virtual void CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) OVERRIDE; + +virtual void CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) OVERRIDE; virtual GLuint CreateProgram() OVERRIDE; @@ -87,13 +120,12 @@ virtual void CullFace(GLenum mode) OVERRIDE; virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) OVERRIDE; -virtual void DeleteFramebuffers( - GLsizei n, const GLuint* framebuffers) OVERRIDE; +virtual void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) OVERRIDE; virtual void DeleteProgram(GLuint program) OVERRIDE; -virtual void DeleteRenderbuffers( - GLsizei n, const GLuint* renderbuffers) OVERRIDE; +virtual void DeleteRenderbuffers(GLsizei n, + const GLuint* renderbuffers) OVERRIDE; virtual void DeleteShader(GLuint shader) OVERRIDE; @@ -111,8 +143,10 @@ virtual void Disable(GLenum cap) OVERRIDE; virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) OVERRIDE; -virtual void DrawElements( - GLenum mode, GLsizei count, GLenum type, const void* indices) OVERRIDE; +virtual void DrawElements(GLenum mode, + GLsizei count, + GLenum type, + const void* indices) OVERRIDE; virtual void Enable(GLenum cap) OVERRIDE; @@ -120,13 +154,16 @@ virtual void Finish() OVERRIDE; virtual void Flush() OVERRIDE; -virtual void FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) OVERRIDE; +virtual void FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) OVERRIDE; -virtual void FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) OVERRIDE; +virtual void FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) OVERRIDE; virtual void FrontFace(GLenum mode) OVERRIDE; @@ -140,73 +177,97 @@ virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) OVERRIDE; virtual void GenTextures(GLsizei n, GLuint* textures) OVERRIDE; -virtual void GetActiveAttrib( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) OVERRIDE; - -virtual void GetActiveUniform( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) OVERRIDE; - -virtual void GetAttachedShaders( - GLuint program, GLsizei maxcount, GLsizei* count, - GLuint* shaders) OVERRIDE; +virtual void GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) OVERRIDE; + +virtual void GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) OVERRIDE; + +virtual void GetAttachedShaders(GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders) OVERRIDE; virtual GLint GetAttribLocation(GLuint program, const char* name) OVERRIDE; virtual void GetBooleanv(GLenum pname, GLboolean* params) OVERRIDE; -virtual void GetBufferParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetBufferParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; virtual GLenum GetError() OVERRIDE; virtual void GetFloatv(GLenum pname, GLfloat* params) OVERRIDE; -virtual void GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) OVERRIDE; +virtual void GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) OVERRIDE; virtual void GetIntegerv(GLenum pname, GLint* params) OVERRIDE; -virtual void GetProgramiv( - GLuint program, GLenum pname, GLint* params) OVERRIDE; +virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) OVERRIDE; -virtual void GetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) OVERRIDE; +virtual void GetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) OVERRIDE; -virtual void GetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) OVERRIDE; -virtual void GetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) OVERRIDE; +virtual void GetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) OVERRIDE; -virtual void GetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, GLint* range, - GLint* precision) OVERRIDE; +virtual void GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision) OVERRIDE; -virtual void GetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) OVERRIDE; +virtual void GetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) OVERRIDE; virtual const GLubyte* GetString(GLenum name) OVERRIDE; -virtual void GetTexParameterfv( - GLenum target, GLenum pname, GLfloat* params) OVERRIDE; +virtual void GetTexParameterfv(GLenum target, + GLenum pname, + GLfloat* params) OVERRIDE; -virtual void GetTexParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetTexParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; -virtual void GetUniformfv( - GLuint program, GLint location, GLfloat* params) OVERRIDE; +virtual void GetUniformfv(GLuint program, + GLint location, + GLfloat* params) OVERRIDE; -virtual void GetUniformiv( - GLuint program, GLint location, GLint* params) OVERRIDE; +virtual void GetUniformiv(GLuint program, + GLint location, + GLint* params) OVERRIDE; virtual GLint GetUniformLocation(GLuint program, const char* name) OVERRIDE; -virtual void GetVertexAttribPointerv( - GLuint index, GLenum pname, void** pointer) OVERRIDE; +virtual void GetVertexAttribPointerv(GLuint index, + GLenum pname, + void** pointer) OVERRIDE; virtual void Hint(GLenum target, GLenum mode) OVERRIDE; @@ -232,27 +293,35 @@ virtual void PixelStorei(GLenum pname, GLint param) OVERRIDE; virtual void PolygonOffset(GLfloat factor, GLfloat units) OVERRIDE; -virtual void ReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - void* pixels) OVERRIDE; +virtual void ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels) OVERRIDE; virtual void ReleaseShaderCompiler() OVERRIDE; -virtual void RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; +virtual void RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; virtual void SampleCoverage(GLclampf value, GLboolean invert) OVERRIDE; virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; -virtual void ShaderBinary( - GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, - GLsizei length) OVERRIDE; +virtual void ShaderBinary(GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length) OVERRIDE; -virtual void ShaderSource( - GLuint shader, GLsizei count, const GLchar* const* str, - const GLint* length) OVERRIDE; +virtual void ShaderSource(GLuint shader, + GLsizei count, + const GLchar* const* str, + const GLint* length) OVERRIDE; virtual void ShallowFinishCHROMIUM() OVERRIDE; @@ -260,8 +329,10 @@ virtual void ShallowFlushCHROMIUM() OVERRIDE; virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) OVERRIDE; -virtual void StencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) OVERRIDE; +virtual void StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask) OVERRIDE; virtual void StencilMask(GLuint mask) OVERRIDE; @@ -269,83 +340,103 @@ virtual void StencilMaskSeparate(GLenum face, GLuint mask) OVERRIDE; virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) OVERRIDE; -virtual void StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) OVERRIDE; +virtual void StencilOpSeparate(GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass) OVERRIDE; -virtual void TexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) OVERRIDE; +virtual void TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; -virtual void TexParameterf( - GLenum target, GLenum pname, GLfloat param) OVERRIDE; +virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) OVERRIDE; -virtual void TexParameterfv( - GLenum target, GLenum pname, const GLfloat* params) OVERRIDE; +virtual void TexParameterfv(GLenum target, + GLenum pname, + const GLfloat* params) OVERRIDE; virtual void TexParameteri(GLenum target, GLenum pname, GLint param) OVERRIDE; -virtual void TexParameteriv( - GLenum target, GLenum pname, const GLint* params) OVERRIDE; +virtual void TexParameteriv(GLenum target, + GLenum pname, + const GLint* params) OVERRIDE; -virtual void TexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) OVERRIDE; +virtual void TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; virtual void Uniform1f(GLint location, GLfloat x) OVERRIDE; -virtual void Uniform1fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform1fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform1i(GLint location, GLint x) OVERRIDE; -virtual void Uniform1iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform1iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; virtual void Uniform2f(GLint location, GLfloat x, GLfloat y) OVERRIDE; -virtual void Uniform2fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform2fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform2i(GLint location, GLint x, GLint y) OVERRIDE; -virtual void Uniform2iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform2iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void Uniform3f( - GLint location, GLfloat x, GLfloat y, GLfloat z) OVERRIDE; +virtual void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) + OVERRIDE; -virtual void Uniform3fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform3fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) OVERRIDE; -virtual void Uniform3iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void Uniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) OVERRIDE; +virtual void Uniform4f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) OVERRIDE; -virtual void Uniform4fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform4fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; -virtual void Uniform4i( - GLint location, GLint x, GLint y, GLint z, GLint w) OVERRIDE; +virtual void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) + OVERRIDE; -virtual void Uniform4iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; +virtual void UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; -virtual void UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; +virtual void UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; -virtual void UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; +virtual void UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; virtual void UseProgram(GLuint program) OVERRIDE; @@ -359,43 +450,63 @@ virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) OVERRIDE; virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttrib3f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z) OVERRIDE; +virtual void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) + OVERRIDE; virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) OVERRIDE; +virtual void VertexAttrib4f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) OVERRIDE; virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, - const void* ptr) OVERRIDE; - -virtual void Viewport( - GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; - -virtual void BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, - GLenum filter) OVERRIDE; - -virtual void RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; - -virtual void RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; - -virtual void FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) OVERRIDE; - -virtual void TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) OVERRIDE; +virtual void VertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr) OVERRIDE; + +virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; + +virtual void BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) OVERRIDE; + +virtual void RenderbufferStorageMultisampleCHROMIUM(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; + +virtual void RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; + +virtual void FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) OVERRIDE; + +virtual void TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) OVERRIDE; virtual void GenQueriesEXT(GLsizei n, GLuint* queries) OVERRIDE; @@ -407,14 +518,14 @@ virtual void BeginQueryEXT(GLenum target, GLuint id) OVERRIDE; virtual void EndQueryEXT(GLenum target) OVERRIDE; -virtual void GetQueryivEXT( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) OVERRIDE; -virtual void GetQueryObjectuivEXT( - GLuint id, GLenum pname, GLuint* params) OVERRIDE; +virtual void GetQueryObjectuivEXT(GLuint id, + GLenum pname, + GLuint* params) OVERRIDE; -virtual void InsertEventMarkerEXT( - GLsizei length, const GLchar* marker) OVERRIDE; +virtual void InsertEventMarkerEXT(GLsizei length, + const GLchar* marker) OVERRIDE; virtual void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) OVERRIDE; @@ -430,17 +541,23 @@ virtual void BindVertexArrayOES(GLuint array) OVERRIDE; virtual void SwapBuffers() OVERRIDE; -virtual GLuint GetMaxValueInBufferCHROMIUM( - GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) OVERRIDE; +virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id, + GLsizei count, + GLenum type, + GLuint offset) OVERRIDE; -virtual void GenSharedIdsCHROMIUM( - GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) OVERRIDE; +virtual void GenSharedIdsCHROMIUM(GLuint namespace_id, + GLuint id_offset, + GLsizei n, + GLuint* ids) OVERRIDE; -virtual void DeleteSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) OVERRIDE; +virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) OVERRIDE; -virtual void RegisterSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) OVERRIDE; +virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) OVERRIDE; virtual GLboolean EnableFeatureCHROMIUM(const char* feature) OVERRIDE; @@ -452,19 +569,28 @@ virtual void* MapImageCHROMIUM(GLuint image_id, GLenum access) OVERRIDE; virtual void UnmapImageCHROMIUM(GLuint image_id) OVERRIDE; -virtual void* MapBufferSubDataCHROMIUM( - GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) OVERRIDE; +virtual void* MapBufferSubDataCHROMIUM(GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access) OVERRIDE; virtual void UnmapBufferSubDataCHROMIUM(const void* mem) OVERRIDE; -virtual void* MapTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLenum access) OVERRIDE; +virtual void* MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) OVERRIDE; virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) OVERRIDE; -virtual void ResizeCHROMIUM( - GLuint width, GLuint height, GLfloat scale_factor) OVERRIDE; +virtual void ResizeCHROMIUM(GLuint width, + GLuint height, + GLfloat scale_factor) OVERRIDE; virtual const GLchar* GetRequestableExtensionsCHROMIUM() OVERRIDE; @@ -472,56 +598,73 @@ virtual void RequestExtensionCHROMIUM(const char* extension) OVERRIDE; virtual void RateLimitOffscreenContextCHROMIUM() OVERRIDE; -virtual void GetMultipleIntegervCHROMIUM( - const GLenum* pnames, GLuint count, GLint* results, - GLsizeiptr size) OVERRIDE; +virtual void GetMultipleIntegervCHROMIUM(const GLenum* pnames, + GLuint count, + GLint* results, + GLsizeiptr size) OVERRIDE; -virtual void GetProgramInfoCHROMIUM( - GLuint program, GLsizei bufsize, GLsizei* size, void* info) OVERRIDE; +virtual void GetProgramInfoCHROMIUM(GLuint program, + GLsizei bufsize, + GLsizei* size, + void* info) OVERRIDE; virtual GLuint CreateStreamTextureCHROMIUM(GLuint texture) OVERRIDE; -virtual GLuint CreateImageCHROMIUM( - GLsizei width, GLsizei height, GLenum internalformat) OVERRIDE; +virtual GLuint CreateImageCHROMIUM(GLsizei width, + GLsizei height, + GLenum internalformat) OVERRIDE; virtual void DestroyImageCHROMIUM(GLuint image_id) OVERRIDE; -virtual void GetImageParameterivCHROMIUM( - GLuint image_id, GLenum pname, GLint* params) OVERRIDE; - -virtual void GetTranslatedShaderSourceANGLE( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) OVERRIDE; - -virtual void PostSubBufferCHROMIUM( - GLint x, GLint y, GLint width, GLint height) OVERRIDE; - -virtual void TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) OVERRIDE; - -virtual void CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) OVERRIDE; - -virtual void DrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) OVERRIDE; - -virtual void DrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, const void* indices, - GLsizei primcount) OVERRIDE; +virtual void GetImageParameterivCHROMIUM(GLuint image_id, + GLenum pname, + GLint* params) OVERRIDE; + +virtual void GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) OVERRIDE; + +virtual void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) + OVERRIDE; + +virtual void TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) OVERRIDE; + +virtual void CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) OVERRIDE; + +virtual void DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) OVERRIDE; + +virtual void DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount) OVERRIDE; virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) OVERRIDE; virtual void GenMailboxCHROMIUM(GLbyte* mailbox) OVERRIDE; -virtual void ProduceTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) OVERRIDE; +virtual void ProduceTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) OVERRIDE; -virtual void ConsumeTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) OVERRIDE; +virtual void ConsumeTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) OVERRIDE; -virtual void BindUniformLocationCHROMIUM( - GLuint program, GLint location, const char* name) OVERRIDE; +virtual void BindUniformLocationCHROMIUM(GLuint program, + GLint location, + const char* name) OVERRIDE; virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) OVERRIDE; @@ -531,19 +674,31 @@ virtual void TraceBeginCHROMIUM(const char* name) OVERRIDE; virtual void TraceEndCHROMIUM() OVERRIDE; -virtual void AsyncTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* data) OVERRIDE; - -virtual void AsyncTexImage2DCHROMIUM( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) OVERRIDE; +virtual void AsyncTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* data) OVERRIDE; + +virtual void AsyncTexImage2DCHROMIUM(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) OVERRIDE; -virtual void DiscardFramebufferEXT( - GLenum target, GLsizei count, const GLenum* attachments) OVERRIDE; +virtual void DiscardFramebufferEXT(GLenum target, + GLsizei count, + const GLenum* attachments) OVERRIDE; virtual void LoseContextCHROMIUM(GLenum current, GLenum other) OVERRIDE; @@ -556,4 +711,3 @@ virtual void DrawBuffersEXT(GLsizei count, const GLenum* bufs) OVERRIDE; virtual void DiscardBackbufferCHROMIUM() OVERRIDE; #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h index 064a90a..4449e70 100644 --- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_implementation.cc to define the @@ -13,14 +15,17 @@ void GLES2Implementation::AttachShader(GLuint program, GLuint shader) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glAttachShader(" << program << ", " << shader << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glAttachShader(" << program << ", " + << shader << ")"); // NOLINT helper_->AttachShader(program, shader); CheckGLError(); } void GLES2Implementation::BindBuffer(GLenum target, GLuint buffer) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindBuffer(" << GLES2Util::GetStringBufferTarget(target) << ", " << buffer << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindBuffer(" + << GLES2Util::GetStringBufferTarget(target) << ", " + << buffer << ")"); // NOLINT if (IsBufferReservedId(buffer)) { SetGLError(GL_INVALID_OPERATION, "BindBuffer", "buffer reserved id"); return; @@ -33,7 +38,9 @@ void GLES2Implementation::BindBuffer(GLenum target, GLuint buffer) { void GLES2Implementation::BindFramebuffer(GLenum target, GLuint framebuffer) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindFramebuffer(" << GLES2Util::GetStringFrameBufferTarget(target) << ", " << framebuffer << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindFramebuffer(" + << GLES2Util::GetStringFrameBufferTarget(target) << ", " + << framebuffer << ")"); // NOLINT if (IsFramebufferReservedId(framebuffer)) { SetGLError( GL_INVALID_OPERATION, "BindFramebuffer", "framebuffer reserved id"); @@ -45,10 +52,11 @@ void GLES2Implementation::BindFramebuffer(GLenum target, GLuint framebuffer) { CheckGLError(); } -void GLES2Implementation::BindRenderbuffer( - GLenum target, GLuint renderbuffer) { +void GLES2Implementation::BindRenderbuffer(GLenum target, GLuint renderbuffer) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindRenderbuffer(" << GLES2Util::GetStringRenderBufferTarget(target) << ", " << renderbuffer << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindRenderbuffer(" + << GLES2Util::GetStringRenderBufferTarget(target) << ", " + << renderbuffer << ")"); // NOLINT if (IsRenderbufferReservedId(renderbuffer)) { SetGLError( GL_INVALID_OPERATION, "BindRenderbuffer", "renderbuffer reserved id"); @@ -62,7 +70,9 @@ void GLES2Implementation::BindRenderbuffer( void GLES2Implementation::BindTexture(GLenum target, GLuint texture) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindTexture(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << texture << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindTexture(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << texture << ")"); // NOLINT if (IsTextureReservedId(texture)) { SetGLError(GL_INVALID_OPERATION, "BindTexture", "texture reserved id"); return; @@ -73,40 +83,58 @@ void GLES2Implementation::BindTexture(GLenum target, GLuint texture) { CheckGLError(); } -void GLES2Implementation::BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLES2Implementation::BlendColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendColor(" << red << ", " << green << ", " << blue << ", " << alpha << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendColor(" << red << ", " + << green << ", " << blue << ", " << alpha + << ")"); // NOLINT helper_->BlendColor(red, green, blue, alpha); CheckGLError(); } void GLES2Implementation::BlendEquation(GLenum mode) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendEquation(" << GLES2Util::GetStringEquation(mode) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendEquation(" + << GLES2Util::GetStringEquation(mode) << ")"); // NOLINT helper_->BlendEquation(mode); CheckGLError(); } -void GLES2Implementation::BlendEquationSeparate( - GLenum modeRGB, GLenum modeAlpha) { +void GLES2Implementation::BlendEquationSeparate(GLenum modeRGB, + GLenum modeAlpha) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendEquationSeparate(" << GLES2Util::GetStringEquation(modeRGB) << ", " << GLES2Util::GetStringEquation(modeAlpha) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendEquationSeparate(" + << GLES2Util::GetStringEquation(modeRGB) << ", " + << GLES2Util::GetStringEquation(modeAlpha) + << ")"); // NOLINT helper_->BlendEquationSeparate(modeRGB, modeAlpha); CheckGLError(); } void GLES2Implementation::BlendFunc(GLenum sfactor, GLenum dfactor) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendFunc(" << GLES2Util::GetStringSrcBlendFactor(sfactor) << ", " << GLES2Util::GetStringDstBlendFactor(dfactor) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendFunc(" + << GLES2Util::GetStringSrcBlendFactor(sfactor) << ", " + << GLES2Util::GetStringDstBlendFactor(dfactor) + << ")"); // NOLINT helper_->BlendFunc(sfactor, dfactor); CheckGLError(); } -void GLES2Implementation::BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { +void GLES2Implementation::BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendFuncSeparate(" << GLES2Util::GetStringSrcBlendFactor(srcRGB) << ", " << GLES2Util::GetStringDstBlendFactor(dstRGB) << ", " << GLES2Util::GetStringSrcBlendFactor(srcAlpha) << ", " << GLES2Util::GetStringDstBlendFactor(dstAlpha) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlendFuncSeparate(" + << GLES2Util::GetStringSrcBlendFactor(srcRGB) << ", " + << GLES2Util::GetStringDstBlendFactor(dstRGB) << ", " + << GLES2Util::GetStringSrcBlendFactor(srcAlpha) << ", " + << GLES2Util::GetStringDstBlendFactor(dstAlpha) + << ")"); // NOLINT helper_->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); CheckGLError(); } @@ -114,7 +142,9 @@ void GLES2Implementation::BlendFuncSeparate( GLenum GLES2Implementation::CheckFramebufferStatus(GLenum target) { GPU_CLIENT_SINGLE_THREAD_CHECK(); TRACE_EVENT0("gpu", "GLES2Implementation::CheckFramebufferStatus"); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCheckFramebufferStatus(" << GLES2Util::GetStringFrameBufferTarget(target) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCheckFramebufferStatus(" + << GLES2Util::GetStringFrameBufferTarget(target) + << ")"); // NOLINT typedef cmds::CheckFramebufferStatus::Result Result; Result* result = GetResultAs<Result*>(); if (!result) { @@ -137,10 +167,14 @@ void GLES2Implementation::Clear(GLbitfield mask) { CheckGLError(); } -void GLES2Implementation::ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLES2Implementation::ClearColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClearColor(" << red << ", " << green << ", " << blue << ", " << alpha << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClearColor(" << red << ", " + << green << ", " << blue << ", " << alpha + << ")"); // NOLINT helper_->ClearColor(red, green, blue, alpha); CheckGLError(); } @@ -159,26 +193,43 @@ void GLES2Implementation::ClearStencil(GLint s) { CheckGLError(); } -void GLES2Implementation::ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { +void GLES2Implementation::ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glColorMask(" << GLES2Util::GetStringBool(red) << ", " << GLES2Util::GetStringBool(green) << ", " << GLES2Util::GetStringBool(blue) << ", " << GLES2Util::GetStringBool(alpha) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glColorMask(" + << GLES2Util::GetStringBool(red) << ", " + << GLES2Util::GetStringBool(green) << ", " + << GLES2Util::GetStringBool(blue) << ", " + << GLES2Util::GetStringBool(alpha) << ")"); // NOLINT helper_->ColorMask(red, green, blue, alpha); CheckGLError(); } void GLES2Implementation::CompileShader(GLuint shader) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCompileShader(" << shader << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCompileShader(" << shader + << ")"); // NOLINT helper_->CompileShader(shader); CheckGLError(); } -void GLES2Implementation::CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) { +void GLES2Implementation::CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCopyTexImage2D(" << GLES2Util::GetStringTextureTarget(target) << ", " << level << ", " << GLES2Util::GetStringTextureInternalFormat(internalformat) << ", " << x << ", " << y << ", " << width << ", " << height << ", " << border << ")"); // NOLINT + GPU_CLIENT_LOG( + "[" << GetLogPrefix() << "] glCopyTexImage2D(" + << GLES2Util::GetStringTextureTarget(target) << ", " << level << ", " + << GLES2Util::GetStringTextureInternalFormat(internalformat) << ", " + << x << ", " << y << ", " << width << ", " << height << ", " << border + << ")"); // NOLINT if (width < 0) { SetGLError(GL_INVALID_VALUE, "glCopyTexImage2D", "width < 0"); return; @@ -192,11 +243,20 @@ void GLES2Implementation::CopyTexImage2D( CheckGLError(); } -void GLES2Implementation::CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) { +void GLES2Implementation::CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCopyTexSubImage2D(" << GLES2Util::GetStringTextureTarget(target) << ", " << level << ", " << xoffset << ", " << yoffset << ", " << x << ", " << y << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCopyTexSubImage2D(" + << GLES2Util::GetStringTextureTarget(target) << ", " + << level << ", " << xoffset << ", " << yoffset << ", " << x + << ", " << y << ", " << width << ", " << height + << ")"); // NOLINT if (width < 0) { SetGLError(GL_INVALID_VALUE, "glCopyTexSubImage2D", "width < 0"); return; @@ -212,10 +272,11 @@ void GLES2Implementation::CopyTexSubImage2D( GLuint GLES2Implementation::CreateProgram() { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateProgram(" << ")"); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateProgram(" + << ")"); GLuint client_id; - GetIdHandler(id_namespaces::kProgramsAndShaders)-> - MakeIds(this, 0, 1, &client_id); + GetIdHandler(id_namespaces::kProgramsAndShaders) + ->MakeIds(this, 0, 1, &client_id); helper_->CreateProgram(client_id); GPU_CLIENT_LOG("returned " << client_id); CheckGLError(); @@ -224,10 +285,11 @@ GLuint GLES2Implementation::CreateProgram() { GLuint GLES2Implementation::CreateShader(GLenum type) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateShader(" << GLES2Util::GetStringShaderType(type) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateShader(" + << GLES2Util::GetStringShaderType(type) << ")"); // NOLINT GLuint client_id; - GetIdHandler(id_namespaces::kProgramsAndShaders)-> - MakeIds(this, 0, 1, &client_id); + GetIdHandler(id_namespaces::kProgramsAndShaders) + ->MakeIds(this, 0, 1, &client_id); helper_->CreateShader(type, client_id); GPU_CLIENT_LOG("returned " << client_id); CheckGLError(); @@ -236,14 +298,16 @@ GLuint GLES2Implementation::CreateShader(GLenum type) { void GLES2Implementation::CullFace(GLenum mode) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCullFace(" << GLES2Util::GetStringFaceType(mode) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCullFace(" + << GLES2Util::GetStringFaceType(mode) << ")"); // NOLINT helper_->CullFace(mode); CheckGLError(); } void GLES2Implementation::DeleteBuffers(GLsizei n, const GLuint* buffers) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteBuffers(" << n << ", " << static_cast<const void*>(buffers) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteBuffers(" << n << ", " + << static_cast<const void*>(buffers) << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < n; ++i) { GPU_CLIENT_LOG(" " << i << ": " << buffers[i]); @@ -262,10 +326,12 @@ void GLES2Implementation::DeleteBuffers(GLsizei n, const GLuint* buffers) { CheckGLError(); } -void GLES2Implementation::DeleteFramebuffers( - GLsizei n, const GLuint* framebuffers) { +void GLES2Implementation::DeleteFramebuffers(GLsizei n, + const GLuint* framebuffers) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteFramebuffers(" << n << ", " << static_cast<const void*>(framebuffers) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteFramebuffers(" << n << ", " + << static_cast<const void*>(framebuffers) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < n; ++i) { GPU_CLIENT_LOG(" " << i << ": " << framebuffers[i]); @@ -286,16 +352,19 @@ void GLES2Implementation::DeleteFramebuffers( void GLES2Implementation::DeleteProgram(GLuint program) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteProgram(" << program << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteProgram(" << program + << ")"); // NOLINT GPU_CLIENT_DCHECK(program != 0); DeleteProgramHelper(program); CheckGLError(); } -void GLES2Implementation::DeleteRenderbuffers( - GLsizei n, const GLuint* renderbuffers) { +void GLES2Implementation::DeleteRenderbuffers(GLsizei n, + const GLuint* renderbuffers) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteRenderbuffers(" << n << ", " << static_cast<const void*>(renderbuffers) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteRenderbuffers(" << n + << ", " << static_cast<const void*>(renderbuffers) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < n; ++i) { GPU_CLIENT_LOG(" " << i << ": " << renderbuffers[i]); @@ -324,7 +393,8 @@ void GLES2Implementation::DeleteShader(GLuint shader) { void GLES2Implementation::DeleteTextures(GLsizei n, const GLuint* textures) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteTextures(" << n << ", " << static_cast<const void*>(textures) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteTextures(" << n << ", " + << static_cast<const void*>(textures) << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < n; ++i) { GPU_CLIENT_LOG(" " << i << ": " << textures[i]); @@ -345,67 +415,85 @@ void GLES2Implementation::DeleteTextures(GLsizei n, const GLuint* textures) { void GLES2Implementation::DepthFunc(GLenum func) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDepthFunc(" << GLES2Util::GetStringCmpFunction(func) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDepthFunc(" + << GLES2Util::GetStringCmpFunction(func) + << ")"); // NOLINT helper_->DepthFunc(func); CheckGLError(); } void GLES2Implementation::DepthMask(GLboolean flag) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDepthMask(" << GLES2Util::GetStringBool(flag) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDepthMask(" + << GLES2Util::GetStringBool(flag) << ")"); // NOLINT helper_->DepthMask(flag); CheckGLError(); } void GLES2Implementation::DepthRangef(GLclampf zNear, GLclampf zFar) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDepthRangef(" << zNear << ", " << zFar << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDepthRangef(" << zNear << ", " + << zFar << ")"); // NOLINT helper_->DepthRangef(zNear, zFar); CheckGLError(); } void GLES2Implementation::DetachShader(GLuint program, GLuint shader) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDetachShader(" << program << ", " << shader << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDetachShader(" << program << ", " + << shader << ")"); // NOLINT helper_->DetachShader(program, shader); CheckGLError(); } -void GLES2Implementation::FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) { +void GLES2Implementation::FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFramebufferRenderbuffer(" << GLES2Util::GetStringFrameBufferTarget(target) << ", " << GLES2Util::GetStringAttachment(attachment) << ", " << GLES2Util::GetStringRenderBufferTarget(renderbuffertarget) << ", " << renderbuffer << ")"); // NOLINT + GPU_CLIENT_LOG( + "[" << GetLogPrefix() << "] glFramebufferRenderbuffer(" + << GLES2Util::GetStringFrameBufferTarget(target) << ", " + << GLES2Util::GetStringAttachment(attachment) << ", " + << GLES2Util::GetStringRenderBufferTarget(renderbuffertarget) << ", " + << renderbuffer << ")"); // NOLINT helper_->FramebufferRenderbuffer( target, attachment, renderbuffertarget, renderbuffer); CheckGLError(); } -void GLES2Implementation::FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) { +void GLES2Implementation::FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFramebufferTexture2D(" << GLES2Util::GetStringFrameBufferTarget(target) << ", " << GLES2Util::GetStringAttachment(attachment) << ", " << GLES2Util::GetStringTextureTarget(textarget) << ", " << texture << ", " << level << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFramebufferTexture2D(" + << GLES2Util::GetStringFrameBufferTarget(target) << ", " + << GLES2Util::GetStringAttachment(attachment) << ", " + << GLES2Util::GetStringTextureTarget(textarget) << ", " + << texture << ", " << level << ")"); // NOLINT helper_->FramebufferTexture2D(target, attachment, textarget, texture, level); CheckGLError(); } void GLES2Implementation::FrontFace(GLenum mode) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFrontFace(" << GLES2Util::GetStringFaceMode(mode) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFrontFace(" + << GLES2Util::GetStringFaceMode(mode) << ")"); // NOLINT helper_->FrontFace(mode); CheckGLError(); } void GLES2Implementation::GenBuffers(GLsizei n, GLuint* buffers) { - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenBuffers(" << n << ", " << static_cast<const void*>(buffers) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenBuffers(" << n << ", " + << static_cast<const void*>(buffers) << ")"); // NOLINT if (n < 0) { SetGLError(GL_INVALID_VALUE, "glGenBuffers", "n < 0"); return; } GPU_CLIENT_SINGLE_THREAD_CHECK(); - GetIdHandler(id_namespaces::kBuffers)-> - MakeIds(this, 0, n, buffers); + GetIdHandler(id_namespaces::kBuffers)->MakeIds(this, 0, n, buffers); GenBuffersHelper(n, buffers); helper_->GenBuffersImmediate(n, buffers); if (share_group_->bind_generates_resource()) @@ -420,20 +508,23 @@ void GLES2Implementation::GenBuffers(GLsizei n, GLuint* buffers) { void GLES2Implementation::GenerateMipmap(GLenum target) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenerateMipmap(" << GLES2Util::GetStringTextureBindTarget(target) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenerateMipmap(" + << GLES2Util::GetStringTextureBindTarget(target) + << ")"); // NOLINT helper_->GenerateMipmap(target); CheckGLError(); } void GLES2Implementation::GenFramebuffers(GLsizei n, GLuint* framebuffers) { - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenFramebuffers(" << n << ", " << static_cast<const void*>(framebuffers) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenFramebuffers(" << n << ", " + << static_cast<const void*>(framebuffers) + << ")"); // NOLINT if (n < 0) { SetGLError(GL_INVALID_VALUE, "glGenFramebuffers", "n < 0"); return; } GPU_CLIENT_SINGLE_THREAD_CHECK(); - GetIdHandler(id_namespaces::kFramebuffers)-> - MakeIds(this, 0, n, framebuffers); + GetIdHandler(id_namespaces::kFramebuffers)->MakeIds(this, 0, n, framebuffers); GenFramebuffersHelper(n, framebuffers); helper_->GenFramebuffersImmediate(n, framebuffers); if (share_group_->bind_generates_resource()) @@ -447,14 +538,16 @@ void GLES2Implementation::GenFramebuffers(GLsizei n, GLuint* framebuffers) { } void GLES2Implementation::GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenRenderbuffers(" << n << ", " << static_cast<const void*>(renderbuffers) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenRenderbuffers(" << n << ", " + << static_cast<const void*>(renderbuffers) + << ")"); // NOLINT if (n < 0) { SetGLError(GL_INVALID_VALUE, "glGenRenderbuffers", "n < 0"); return; } GPU_CLIENT_SINGLE_THREAD_CHECK(); - GetIdHandler(id_namespaces::kRenderbuffers)-> - MakeIds(this, 0, n, renderbuffers); + GetIdHandler(id_namespaces::kRenderbuffers) + ->MakeIds(this, 0, n, renderbuffers); GenRenderbuffersHelper(n, renderbuffers); helper_->GenRenderbuffersImmediate(n, renderbuffers); if (share_group_->bind_generates_resource()) @@ -468,14 +561,14 @@ void GLES2Implementation::GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { } void GLES2Implementation::GenTextures(GLsizei n, GLuint* textures) { - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenTextures(" << n << ", " << static_cast<const void*>(textures) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenTextures(" << n << ", " + << static_cast<const void*>(textures) << ")"); // NOLINT if (n < 0) { SetGLError(GL_INVALID_VALUE, "glGenTextures", "n < 0"); return; } GPU_CLIENT_SINGLE_THREAD_CHECK(); - GetIdHandler(id_namespaces::kTextures)-> - MakeIds(this, 0, n, textures); + GetIdHandler(id_namespaces::kTextures)->MakeIds(this, 0, n, textures); GenTexturesHelper(n, textures); helper_->GenTexturesImmediate(n, textures); if (share_group_->bind_generates_resource()) @@ -491,7 +584,9 @@ void GLES2Implementation::GenTextures(GLsizei n, GLuint* textures) { void GLES2Implementation::GetBooleanv(GLenum pname, GLboolean* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLboolean, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetBooleanv(" << GLES2Util::GetStringGLState(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetBooleanv(" + << GLES2Util::GetStringGLState(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetBooleanv"); if (GetBooleanvHelper(pname, params)) { return; @@ -502,8 +597,7 @@ void GLES2Implementation::GetBooleanv(GLenum pname, GLboolean* params) { return; } result->SetNumResults(0); - helper_->GetBooleanv(pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetBooleanv(pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -513,11 +607,15 @@ void GLES2Implementation::GetBooleanv(GLenum pname, GLboolean* params) { }); CheckGLError(); } -void GLES2Implementation::GetBufferParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GLES2Implementation::GetBufferParameteriv(GLenum target, + GLenum pname, + GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetBufferParameteriv(" << GLES2Util::GetStringBufferTarget(target) << ", " << GLES2Util::GetStringBufferParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetBufferParameteriv(" + << GLES2Util::GetStringBufferTarget(target) << ", " + << GLES2Util::GetStringBufferParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetBufferParameteriv"); if (GetBufferParameterivHelper(target, pname, params)) { return; @@ -528,8 +626,8 @@ void GLES2Implementation::GetBufferParameteriv( return; } result->SetNumResults(0); - helper_->GetBufferParameteriv(target, pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetBufferParameteriv( + target, pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -541,7 +639,9 @@ void GLES2Implementation::GetBufferParameteriv( } void GLES2Implementation::GetFloatv(GLenum pname, GLfloat* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetFloatv(" << GLES2Util::GetStringGLState(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetFloatv(" + << GLES2Util::GetStringGLState(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetFloatv"); if (GetFloatvHelper(pname, params)) { return; @@ -552,8 +652,7 @@ void GLES2Implementation::GetFloatv(GLenum pname, GLfloat* params) { return; } result->SetNumResults(0); - helper_->GetFloatv(pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetFloatv(pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -563,14 +662,23 @@ void GLES2Implementation::GetFloatv(GLenum pname, GLfloat* params) { }); CheckGLError(); } -void GLES2Implementation::GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) { +void GLES2Implementation::GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetFramebufferAttachmentParameteriv(" << GLES2Util::GetStringFrameBufferTarget(target) << ", " << GLES2Util::GetStringAttachment(attachment) << ", " << GLES2Util::GetStringFrameBufferParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT - TRACE_EVENT0("gpu", "GLES2Implementation::GetFramebufferAttachmentParameteriv"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() + << "] glGetFramebufferAttachmentParameteriv(" + << GLES2Util::GetStringFrameBufferTarget(target) << ", " + << GLES2Util::GetStringAttachment(attachment) << ", " + << GLES2Util::GetStringFrameBufferParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT + TRACE_EVENT0( + "gpu", + "GLES2Implementation::GetFramebufferAttachmentParameteriv"); // NOLINT if (GetFramebufferAttachmentParameterivHelper( - target, attachment, pname, params)) { + target, attachment, pname, params)) { return; } typedef cmds::GetFramebufferAttachmentParameteriv::Result Result; @@ -579,8 +687,8 @@ void GLES2Implementation::GetFramebufferAttachmentParameteriv( return; } result->SetNumResults(0); - helper_->GetFramebufferAttachmentParameteriv(target, attachment, pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetFramebufferAttachmentParameteriv( + target, attachment, pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -593,7 +701,9 @@ void GLES2Implementation::GetFramebufferAttachmentParameteriv( void GLES2Implementation::GetIntegerv(GLenum pname, GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetIntegerv(" << GLES2Util::GetStringGLState(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetIntegerv(" + << GLES2Util::GetStringGLState(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetIntegerv"); if (GetIntegervHelper(pname, params)) { return; @@ -604,8 +714,7 @@ void GLES2Implementation::GetIntegerv(GLenum pname, GLint* params) { return; } result->SetNumResults(0); - helper_->GetIntegerv(pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetIntegerv(pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -615,11 +724,14 @@ void GLES2Implementation::GetIntegerv(GLenum pname, GLint* params) { }); CheckGLError(); } -void GLES2Implementation::GetProgramiv( - GLuint program, GLenum pname, GLint* params) { +void GLES2Implementation::GetProgramiv(GLuint program, + GLenum pname, + GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetProgramiv(" << program << ", " << GLES2Util::GetStringProgramParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetProgramiv(" << program << ", " + << GLES2Util::GetStringProgramParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetProgramiv"); if (GetProgramivHelper(program, pname, params)) { return; @@ -630,8 +742,7 @@ void GLES2Implementation::GetProgramiv( return; } result->SetNumResults(0); - helper_->GetProgramiv(program, pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetProgramiv(program, pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -641,24 +752,23 @@ void GLES2Implementation::GetProgramiv( }); CheckGLError(); } -void GLES2Implementation::GetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { +void GLES2Implementation::GetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_OPTIONAL_INITALIZATION(GLsizei, length); - GPU_CLIENT_LOG("[" << GetLogPrefix() - << "] glGetProgramInfoLog" << "(" - << program << ", " - << bufsize << ", " - << static_cast<void*>(length) << ", " - << static_cast<void*>(infolog) << ")"); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetProgramInfoLog" + << "(" << program << ", " << bufsize << ", " + << static_cast<void*>(length) << ", " + << static_cast<void*>(infolog) << ")"); helper_->SetBucketSize(kResultBucketId, 0); helper_->GetProgramInfoLog(program, kResultBucketId); std::string str; GLsizei max_size = 0; if (GetBucketAsString(kResultBucketId, &str)) { if (bufsize > 0) { - max_size = - std::min(static_cast<size_t>(bufsize) - 1, str.size()); + max_size = std::min(static_cast<size_t>(bufsize) - 1, str.size()); memcpy(infolog, str.c_str(), max_size); infolog[max_size] = '\0'; GPU_CLIENT_LOG("------\n" << infolog << "\n------"); @@ -669,11 +779,15 @@ void GLES2Implementation::GetProgramInfoLog( } CheckGLError(); } -void GLES2Implementation::GetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GLES2Implementation::GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetRenderbufferParameteriv(" << GLES2Util::GetStringRenderBufferTarget(target) << ", " << GLES2Util::GetStringRenderBufferParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetRenderbufferParameteriv(" + << GLES2Util::GetStringRenderBufferTarget(target) << ", " + << GLES2Util::GetStringRenderBufferParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetRenderbufferParameteriv"); if (GetRenderbufferParameterivHelper(target, pname, params)) { return; @@ -684,8 +798,8 @@ void GLES2Implementation::GetRenderbufferParameteriv( return; } result->SetNumResults(0); - helper_->GetRenderbufferParameteriv(target, pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetRenderbufferParameteriv( + target, pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -695,11 +809,14 @@ void GLES2Implementation::GetRenderbufferParameteriv( }); CheckGLError(); } -void GLES2Implementation::GetShaderiv( - GLuint shader, GLenum pname, GLint* params) { +void GLES2Implementation::GetShaderiv(GLuint shader, + GLenum pname, + GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetShaderiv(" << shader << ", " << GLES2Util::GetStringShaderParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetShaderiv(" << shader << ", " + << GLES2Util::GetStringShaderParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetShaderiv"); if (GetShaderivHelper(shader, pname, params)) { return; @@ -710,8 +827,7 @@ void GLES2Implementation::GetShaderiv( return; } result->SetNumResults(0); - helper_->GetShaderiv(shader, pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetShaderiv(shader, pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -721,24 +837,23 @@ void GLES2Implementation::GetShaderiv( }); CheckGLError(); } -void GLES2Implementation::GetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { +void GLES2Implementation::GetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_OPTIONAL_INITALIZATION(GLsizei, length); - GPU_CLIENT_LOG("[" << GetLogPrefix() - << "] glGetShaderInfoLog" << "(" - << shader << ", " - << bufsize << ", " - << static_cast<void*>(length) << ", " - << static_cast<void*>(infolog) << ")"); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetShaderInfoLog" + << "(" << shader << ", " << bufsize << ", " + << static_cast<void*>(length) << ", " + << static_cast<void*>(infolog) << ")"); helper_->SetBucketSize(kResultBucketId, 0); helper_->GetShaderInfoLog(shader, kResultBucketId); std::string str; GLsizei max_size = 0; if (GetBucketAsString(kResultBucketId, &str)) { if (bufsize > 0) { - max_size = - std::min(static_cast<size_t>(bufsize) - 1, str.size()); + max_size = std::min(static_cast<size_t>(bufsize) - 1, str.size()); memcpy(infolog, str.c_str(), max_size); infolog[max_size] = '\0'; GPU_CLIENT_LOG("------\n" << infolog << "\n------"); @@ -749,24 +864,23 @@ void GLES2Implementation::GetShaderInfoLog( } CheckGLError(); } -void GLES2Implementation::GetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { +void GLES2Implementation::GetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_OPTIONAL_INITALIZATION(GLsizei, length); - GPU_CLIENT_LOG("[" << GetLogPrefix() - << "] glGetShaderSource" << "(" - << shader << ", " - << bufsize << ", " - << static_cast<void*>(length) << ", " - << static_cast<void*>(source) << ")"); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetShaderSource" + << "(" << shader << ", " << bufsize << ", " + << static_cast<void*>(length) << ", " + << static_cast<void*>(source) << ")"); helper_->SetBucketSize(kResultBucketId, 0); helper_->GetShaderSource(shader, kResultBucketId); std::string str; GLsizei max_size = 0; if (GetBucketAsString(kResultBucketId, &str)) { if (bufsize > 0) { - max_size = - std::min(static_cast<size_t>(bufsize) - 1, str.size()); + max_size = std::min(static_cast<size_t>(bufsize) - 1, str.size()); memcpy(source, str.c_str(), max_size); source[max_size] = '\0'; GPU_CLIENT_LOG("------\n" << source << "\n------"); @@ -777,10 +891,14 @@ void GLES2Implementation::GetShaderSource( } CheckGLError(); } -void GLES2Implementation::GetTexParameterfv( - GLenum target, GLenum pname, GLfloat* params) { +void GLES2Implementation::GetTexParameterfv(GLenum target, + GLenum pname, + GLfloat* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetTexParameterfv(" << GLES2Util::GetStringGetTexParamTarget(target) << ", " << GLES2Util::GetStringTextureParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetTexParameterfv(" + << GLES2Util::GetStringGetTexParamTarget(target) << ", " + << GLES2Util::GetStringTextureParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetTexParameterfv"); if (GetTexParameterfvHelper(target, pname, params)) { return; @@ -791,8 +909,8 @@ void GLES2Implementation::GetTexParameterfv( return; } result->SetNumResults(0); - helper_->GetTexParameterfv(target, pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetTexParameterfv( + target, pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -802,11 +920,15 @@ void GLES2Implementation::GetTexParameterfv( }); CheckGLError(); } -void GLES2Implementation::GetTexParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GLES2Implementation::GetTexParameteriv(GLenum target, + GLenum pname, + GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetTexParameteriv(" << GLES2Util::GetStringGetTexParamTarget(target) << ", " << GLES2Util::GetStringTextureParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetTexParameteriv(" + << GLES2Util::GetStringGetTexParamTarget(target) << ", " + << GLES2Util::GetStringTextureParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT TRACE_EVENT0("gpu", "GLES2Implementation::GetTexParameteriv"); if (GetTexParameterivHelper(target, pname, params)) { return; @@ -817,8 +939,8 @@ void GLES2Implementation::GetTexParameteriv( return; } result->SetNumResults(0); - helper_->GetTexParameteriv(target, pname, - GetResultShmId(), GetResultShmOffset()); + helper_->GetTexParameteriv( + target, pname, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); result->CopyResult(params); GPU_CLIENT_LOG_CODE_BLOCK({ @@ -830,7 +952,9 @@ void GLES2Implementation::GetTexParameteriv( } void GLES2Implementation::Hint(GLenum target, GLenum mode) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glHint(" << GLES2Util::GetStringHintTarget(target) << ", " << GLES2Util::GetStringHintMode(mode) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glHint(" + << GLES2Util::GetStringHintTarget(target) << ", " + << GLES2Util::GetStringHintMode(mode) << ")"); // NOLINT helper_->Hint(target, mode); CheckGLError(); } @@ -856,7 +980,8 @@ GLboolean GLES2Implementation::IsBuffer(GLuint buffer) { GLboolean GLES2Implementation::IsFramebuffer(GLuint framebuffer) { GPU_CLIENT_SINGLE_THREAD_CHECK(); TRACE_EVENT0("gpu", "GLES2Implementation::IsFramebuffer"); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsFramebuffer(" << framebuffer << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsFramebuffer(" << framebuffer + << ")"); // NOLINT typedef cmds::IsFramebuffer::Result Result; Result* result = GetResultAs<Result*>(); if (!result) { @@ -892,15 +1017,15 @@ GLboolean GLES2Implementation::IsProgram(GLuint program) { GLboolean GLES2Implementation::IsRenderbuffer(GLuint renderbuffer) { GPU_CLIENT_SINGLE_THREAD_CHECK(); TRACE_EVENT0("gpu", "GLES2Implementation::IsRenderbuffer"); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsRenderbuffer(" << renderbuffer << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsRenderbuffer(" << renderbuffer + << ")"); // NOLINT typedef cmds::IsRenderbuffer::Result Result; Result* result = GetResultAs<Result*>(); if (!result) { return GL_FALSE; } *result = 0; - helper_->IsRenderbuffer( - renderbuffer, GetResultShmId(), GetResultShmOffset()); + helper_->IsRenderbuffer(renderbuffer, GetResultShmId(), GetResultShmOffset()); WaitForCmd(); GLboolean result_value = *result; GPU_CLIENT_LOG("returned " << result_value); @@ -953,22 +1078,29 @@ void GLES2Implementation::LineWidth(GLfloat width) { void GLES2Implementation::PolygonOffset(GLfloat factor, GLfloat units) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glPolygonOffset(" << factor << ", " << units << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glPolygonOffset(" << factor << ", " + << units << ")"); // NOLINT helper_->PolygonOffset(factor, units); CheckGLError(); } void GLES2Implementation::ReleaseShaderCompiler() { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glReleaseShaderCompiler(" << ")"); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glReleaseShaderCompiler(" + << ")"); helper_->ReleaseShaderCompiler(); CheckGLError(); } -void GLES2Implementation::RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { +void GLES2Implementation::RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRenderbufferStorage(" << GLES2Util::GetStringRenderBufferTarget(target) << ", " << GLES2Util::GetStringRenderBufferFormat(internalformat) << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRenderbufferStorage(" + << GLES2Util::GetStringRenderBufferTarget(target) << ", " + << GLES2Util::GetStringRenderBufferFormat(internalformat) + << ", " << width << ", " << height << ")"); // NOLINT if (width < 0) { SetGLError(GL_INVALID_VALUE, "glRenderbufferStorage", "width < 0"); return; @@ -983,15 +1115,19 @@ void GLES2Implementation::RenderbufferStorage( void GLES2Implementation::SampleCoverage(GLclampf value, GLboolean invert) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glSampleCoverage(" << value << ", " << GLES2Util::GetStringBool(invert) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glSampleCoverage(" << value << ", " + << GLES2Util::GetStringBool(invert) << ")"); // NOLINT helper_->SampleCoverage(value, invert); CheckGLError(); } -void GLES2Implementation::Scissor( - GLint x, GLint y, GLsizei width, GLsizei height) { +void GLES2Implementation::Scissor(GLint x, + GLint y, + GLsizei width, + GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glScissor(" << x << ", " << y << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glScissor(" << x << ", " << y + << ", " << width << ", " << height << ")"); // NOLINT if (width < 0) { SetGLError(GL_INVALID_VALUE, "glScissor", "width < 0"); return; @@ -1006,15 +1142,22 @@ void GLES2Implementation::Scissor( void GLES2Implementation::StencilFunc(GLenum func, GLint ref, GLuint mask) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilFunc(" << GLES2Util::GetStringCmpFunction(func) << ", " << ref << ", " << mask << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilFunc(" + << GLES2Util::GetStringCmpFunction(func) << ", " << ref + << ", " << mask << ")"); // NOLINT helper_->StencilFunc(func, ref, mask); CheckGLError(); } -void GLES2Implementation::StencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) { +void GLES2Implementation::StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilFuncSeparate(" << GLES2Util::GetStringFaceType(face) << ", " << GLES2Util::GetStringCmpFunction(func) << ", " << ref << ", " << mask << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilFuncSeparate(" + << GLES2Util::GetStringFaceType(face) << ", " + << GLES2Util::GetStringCmpFunction(func) << ", " << ref + << ", " << mask << ")"); // NOLINT helper_->StencilFuncSeparate(face, func, ref, mask); CheckGLError(); } @@ -1028,55 +1171,82 @@ void GLES2Implementation::StencilMask(GLuint mask) { void GLES2Implementation::StencilMaskSeparate(GLenum face, GLuint mask) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilMaskSeparate(" << GLES2Util::GetStringFaceType(face) << ", " << mask << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilMaskSeparate(" + << GLES2Util::GetStringFaceType(face) << ", " << mask + << ")"); // NOLINT helper_->StencilMaskSeparate(face, mask); CheckGLError(); } void GLES2Implementation::StencilOp(GLenum fail, GLenum zfail, GLenum zpass) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilOp(" << GLES2Util::GetStringStencilOp(fail) << ", " << GLES2Util::GetStringStencilOp(zfail) << ", " << GLES2Util::GetStringStencilOp(zpass) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilOp(" + << GLES2Util::GetStringStencilOp(fail) << ", " + << GLES2Util::GetStringStencilOp(zfail) << ", " + << GLES2Util::GetStringStencilOp(zpass) << ")"); // NOLINT helper_->StencilOp(fail, zfail, zpass); CheckGLError(); } -void GLES2Implementation::StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { +void GLES2Implementation::StencilOpSeparate(GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilOpSeparate(" << GLES2Util::GetStringFaceType(face) << ", " << GLES2Util::GetStringStencilOp(fail) << ", " << GLES2Util::GetStringStencilOp(zfail) << ", " << GLES2Util::GetStringStencilOp(zpass) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glStencilOpSeparate(" + << GLES2Util::GetStringFaceType(face) << ", " + << GLES2Util::GetStringStencilOp(fail) << ", " + << GLES2Util::GetStringStencilOp(zfail) << ", " + << GLES2Util::GetStringStencilOp(zpass) << ")"); // NOLINT helper_->StencilOpSeparate(face, fail, zfail, zpass); CheckGLError(); } -void GLES2Implementation::TexParameterf( - GLenum target, GLenum pname, GLfloat param) { +void GLES2Implementation::TexParameterf(GLenum target, + GLenum pname, + GLfloat param) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameterf(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << GLES2Util::GetStringTextureParameter(pname) << ", " << param << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameterf(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << GLES2Util::GetStringTextureParameter(pname) << ", " + << param << ")"); // NOLINT helper_->TexParameterf(target, pname, param); CheckGLError(); } -void GLES2Implementation::TexParameterfv( - GLenum target, GLenum pname, const GLfloat* params) { +void GLES2Implementation::TexParameterfv(GLenum target, + GLenum pname, + const GLfloat* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameterfv(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << GLES2Util::GetStringTextureParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameterfv(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << GLES2Util::GetStringTextureParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT GPU_CLIENT_LOG("values: " << params[0]); helper_->TexParameterfvImmediate(target, pname, params); CheckGLError(); } -void GLES2Implementation::TexParameteri( - GLenum target, GLenum pname, GLint param) { +void GLES2Implementation::TexParameteri(GLenum target, + GLenum pname, + GLint param) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameteri(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << GLES2Util::GetStringTextureParameter(pname) << ", " << param << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameteri(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << GLES2Util::GetStringTextureParameter(pname) << ", " + << param << ")"); // NOLINT helper_->TexParameteri(target, pname, param); CheckGLError(); } -void GLES2Implementation::TexParameteriv( - GLenum target, GLenum pname, const GLint* params) { +void GLES2Implementation::TexParameteriv(GLenum target, + GLenum pname, + const GLint* params) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameteriv(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << GLES2Util::GetStringTextureParameter(pname) << ", " << static_cast<const void*>(params) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexParameteriv(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << GLES2Util::GetStringTextureParameter(pname) << ", " + << static_cast<const void*>(params) << ")"); // NOLINT GPU_CLIENT_LOG("values: " << params[0]); helper_->TexParameterivImmediate(target, pname, params); CheckGLError(); @@ -1084,18 +1254,22 @@ void GLES2Implementation::TexParameteriv( void GLES2Implementation::Uniform1f(GLint location, GLfloat x) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1f(" << location << ", " << x << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1f(" << location << ", " + << x << ")"); // NOLINT helper_->Uniform1f(location, x); CheckGLError(); } -void GLES2Implementation::Uniform1fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2Implementation::Uniform1fv(GLint location, + GLsizei count, + const GLfloat* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1fv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1fv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 1]); + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 1]); } }); if (count < 0) { @@ -1108,18 +1282,22 @@ void GLES2Implementation::Uniform1fv( void GLES2Implementation::Uniform1i(GLint location, GLint x) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1i(" << location << ", " << x << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1i(" << location << ", " + << x << ")"); // NOLINT helper_->Uniform1i(location, x); CheckGLError(); } -void GLES2Implementation::Uniform1iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2Implementation::Uniform1iv(GLint location, + GLsizei count, + const GLint* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1iv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform1iv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 1]); + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 1]); } }); if (count < 0) { @@ -1132,18 +1310,23 @@ void GLES2Implementation::Uniform1iv( void GLES2Implementation::Uniform2f(GLint location, GLfloat x, GLfloat y) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2f(" << location << ", " << x << ", " << y << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2f(" << location << ", " + << x << ", " << y << ")"); // NOLINT helper_->Uniform2f(location, x, y); CheckGLError(); } -void GLES2Implementation::Uniform2fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2Implementation::Uniform2fv(GLint location, + GLsizei count, + const GLfloat* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2fv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2fv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 2] << ", " << v[1 + i * 2]); // NOLINT + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 2] << ", " + << v[1 + i * 2]); // NOLINT } }); if (count < 0) { @@ -1156,18 +1339,23 @@ void GLES2Implementation::Uniform2fv( void GLES2Implementation::Uniform2i(GLint location, GLint x, GLint y) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2i(" << location << ", " << x << ", " << y << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2i(" << location << ", " + << x << ", " << y << ")"); // NOLINT helper_->Uniform2i(location, x, y); CheckGLError(); } -void GLES2Implementation::Uniform2iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2Implementation::Uniform2iv(GLint location, + GLsizei count, + const GLint* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2iv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform2iv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 2] << ", " << v[1 + i * 2]); // NOLINT + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 2] << ", " + << v[1 + i * 2]); // NOLINT } }); if (count < 0) { @@ -1178,21 +1366,28 @@ void GLES2Implementation::Uniform2iv( CheckGLError(); } -void GLES2Implementation::Uniform3f( - GLint location, GLfloat x, GLfloat y, GLfloat z) { +void GLES2Implementation::Uniform3f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3f(" << location << ", " << x << ", " << y << ", " << z << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3f(" << location << ", " + << x << ", " << y << ", " << z << ")"); // NOLINT helper_->Uniform3f(location, x, y, z); CheckGLError(); } -void GLES2Implementation::Uniform3fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2Implementation::Uniform3fv(GLint location, + GLsizei count, + const GLfloat* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3fv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3fv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 3] << ", " << v[1 + i * 3] << ", " << v[2 + i * 3]); // NOLINT + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 3] << ", " << v[1 + i * 3] + << ", " << v[2 + i * 3]); // NOLINT } }); if (count < 0) { @@ -1203,21 +1398,25 @@ void GLES2Implementation::Uniform3fv( CheckGLError(); } -void GLES2Implementation::Uniform3i( - GLint location, GLint x, GLint y, GLint z) { +void GLES2Implementation::Uniform3i(GLint location, GLint x, GLint y, GLint z) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3i(" << location << ", " << x << ", " << y << ", " << z << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3i(" << location << ", " + << x << ", " << y << ", " << z << ")"); // NOLINT helper_->Uniform3i(location, x, y, z); CheckGLError(); } -void GLES2Implementation::Uniform3iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2Implementation::Uniform3iv(GLint location, + GLsizei count, + const GLint* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3iv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform3iv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 3] << ", " << v[1 + i * 3] << ", " << v[2 + i * 3]); // NOLINT + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 3] << ", " << v[1 + i * 3] + << ", " << v[2 + i * 3]); // NOLINT } }); if (count < 0) { @@ -1228,21 +1427,31 @@ void GLES2Implementation::Uniform3iv( CheckGLError(); } -void GLES2Implementation::Uniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GLES2Implementation::Uniform4f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4f(" << location << ", " << x << ", " << y << ", " << z << ", " << w << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4f(" << location << ", " + << x << ", " << y << ", " << z << ", " << w + << ")"); // NOLINT helper_->Uniform4f(location, x, y, z, w); CheckGLError(); } -void GLES2Implementation::Uniform4fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2Implementation::Uniform4fv(GLint location, + GLsizei count, + const GLfloat* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4fv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4fv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 4] << ", " << v[1 + i * 4] << ", " << v[2 + i * 4] << ", " << v[3 + i * 4]); // NOLINT + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 4] << ", " << v[1 + i * 4] + << ", " << v[2 + i * 4] << ", " + << v[3 + i * 4]); // NOLINT } }); if (count < 0) { @@ -1253,21 +1462,31 @@ void GLES2Implementation::Uniform4fv( CheckGLError(); } -void GLES2Implementation::Uniform4i( - GLint location, GLint x, GLint y, GLint z, GLint w) { +void GLES2Implementation::Uniform4i(GLint location, + GLint x, + GLint y, + GLint z, + GLint w) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4i(" << location << ", " << x << ", " << y << ", " << z << ", " << w << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4i(" << location << ", " + << x << ", " << y << ", " << z << ", " << w + << ")"); // NOLINT helper_->Uniform4i(location, x, y, z, w); CheckGLError(); } -void GLES2Implementation::Uniform4iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2Implementation::Uniform4iv(GLint location, + GLsizei count, + const GLint* v) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4iv(" << location << ", " << count << ", " << static_cast<const void*>(v) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniform4iv(" << location << ", " + << count << ", " << static_cast<const void*>(v) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 4] << ", " << v[1 + i * 4] << ", " << v[2 + i * 4] << ", " << v[3 + i * 4]); // NOLINT + GPU_CLIENT_LOG(" " << i << ": " << v[0 + i * 4] << ", " << v[1 + i * 4] + << ", " << v[2 + i * 4] << ", " + << v[3 + i * 4]); // NOLINT } }); if (count < 0) { @@ -1278,13 +1497,20 @@ void GLES2Implementation::Uniform4iv( CheckGLError(); } -void GLES2Implementation::UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2Implementation::UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniformMatrix2fv(" << location << ", " << count << ", " << GLES2Util::GetStringBool(transpose) << ", " << static_cast<const void*>(value) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniformMatrix2fv(" << location + << ", " << count << ", " + << GLES2Util::GetStringBool(transpose) << ", " + << static_cast<const void*>(value) << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << value[0 + i * 4] << ", " << value[1 + i * 4] << ", " << value[2 + i * 4] << ", " << value[3 + i * 4]); // NOLINT + GPU_CLIENT_LOG(" " << i << ": " << value[0 + i * 4] << ", " + << value[1 + i * 4] << ", " << value[2 + i * 4] + << ", " << value[3 + i * 4]); // NOLINT } }); if (count < 0) { @@ -1295,13 +1521,23 @@ void GLES2Implementation::UniformMatrix2fv( CheckGLError(); } -void GLES2Implementation::UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2Implementation::UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniformMatrix3fv(" << location << ", " << count << ", " << GLES2Util::GetStringBool(transpose) << ", " << static_cast<const void*>(value) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniformMatrix3fv(" << location + << ", " << count << ", " + << GLES2Util::GetStringBool(transpose) << ", " + << static_cast<const void*>(value) << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << value[0 + i * 9] << ", " << value[1 + i * 9] << ", " << value[2 + i * 9] << ", " << value[3 + i * 9] << ", " << value[4 + i * 9] << ", " << value[5 + i * 9] << ", " << value[6 + i * 9] << ", " << value[7 + i * 9] << ", " << value[8 + i * 9]); // NOLINT + GPU_CLIENT_LOG( + " " << i << ": " << value[0 + i * 9] << ", " << value[1 + i * 9] + << ", " << value[2 + i * 9] << ", " << value[3 + i * 9] << ", " + << value[4 + i * 9] << ", " << value[5 + i * 9] << ", " + << value[6 + i * 9] << ", " << value[7 + i * 9] << ", " + << value[8 + i * 9]); // NOLINT } }); if (count < 0) { @@ -1312,13 +1548,26 @@ void GLES2Implementation::UniformMatrix3fv( CheckGLError(); } -void GLES2Implementation::UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2Implementation::UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniformMatrix4fv(" << location << ", " << count << ", " << GLES2Util::GetStringBool(transpose) << ", " << static_cast<const void*>(value) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniformMatrix4fv(" << location + << ", " << count << ", " + << GLES2Util::GetStringBool(transpose) << ", " + << static_cast<const void*>(value) << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << value[0 + i * 16] << ", " << value[1 + i * 16] << ", " << value[2 + i * 16] << ", " << value[3 + i * 16] << ", " << value[4 + i * 16] << ", " << value[5 + i * 16] << ", " << value[6 + i * 16] << ", " << value[7 + i * 16] << ", " << value[8 + i * 16] << ", " << value[9 + i * 16] << ", " << value[10 + i * 16] << ", " << value[11 + i * 16] << ", " << value[12 + i * 16] << ", " << value[13 + i * 16] << ", " << value[14 + i * 16] << ", " << value[15 + i * 16]); // NOLINT + GPU_CLIENT_LOG( + " " << i << ": " << value[0 + i * 16] << ", " << value[1 + i * 16] + << ", " << value[2 + i * 16] << ", " << value[3 + i * 16] << ", " + << value[4 + i * 16] << ", " << value[5 + i * 16] << ", " + << value[6 + i * 16] << ", " << value[7 + i * 16] << ", " + << value[8 + i * 16] << ", " << value[9 + i * 16] << ", " + << value[10 + i * 16] << ", " << value[11 + i * 16] << ", " + << value[12 + i * 16] << ", " << value[13 + i * 16] << ", " + << value[14 + i * 16] << ", " << value[15 + i * 16]); // NOLINT } }); if (count < 0) { @@ -1331,21 +1580,24 @@ void GLES2Implementation::UniformMatrix4fv( void GLES2Implementation::ValidateProgram(GLuint program) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glValidateProgram(" << program << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glValidateProgram(" << program + << ")"); // NOLINT helper_->ValidateProgram(program); CheckGLError(); } void GLES2Implementation::VertexAttrib1f(GLuint indx, GLfloat x) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib1f(" << indx << ", " << x << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib1f(" << indx << ", " + << x << ")"); // NOLINT helper_->VertexAttrib1f(indx, x); CheckGLError(); } void GLES2Implementation::VertexAttrib1fv(GLuint indx, const GLfloat* values) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib1fv(" << indx << ", " << static_cast<const void*>(values) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib1fv(" << indx << ", " + << static_cast<const void*>(values) << ")"); // NOLINT GPU_CLIENT_LOG("values: " << values[0]); helper_->VertexAttrib1fvImmediate(indx, values); CheckGLError(); @@ -1353,55 +1605,72 @@ void GLES2Implementation::VertexAttrib1fv(GLuint indx, const GLfloat* values) { void GLES2Implementation::VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib2f(" << indx << ", " << x << ", " << y << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib2f(" << indx << ", " + << x << ", " << y << ")"); // NOLINT helper_->VertexAttrib2f(indx, x, y); CheckGLError(); } void GLES2Implementation::VertexAttrib2fv(GLuint indx, const GLfloat* values) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib2fv(" << indx << ", " << static_cast<const void*>(values) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib2fv(" << indx << ", " + << static_cast<const void*>(values) << ")"); // NOLINT GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1]); helper_->VertexAttrib2fvImmediate(indx, values); CheckGLError(); } -void GLES2Implementation::VertexAttrib3f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z) { +void GLES2Implementation::VertexAttrib3f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib3f(" << indx << ", " << x << ", " << y << ", " << z << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib3f(" << indx << ", " + << x << ", " << y << ", " << z << ")"); // NOLINT helper_->VertexAttrib3f(indx, x, y, z); CheckGLError(); } void GLES2Implementation::VertexAttrib3fv(GLuint indx, const GLfloat* values) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib3fv(" << indx << ", " << static_cast<const void*>(values) << ")"); // NOLINT - GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", " << values[2]); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib3fv(" << indx << ", " + << static_cast<const void*>(values) << ")"); // NOLINT + GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", " + << values[2]); // NOLINT helper_->VertexAttrib3fvImmediate(indx, values); CheckGLError(); } -void GLES2Implementation::VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GLES2Implementation::VertexAttrib4f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib4f(" << indx << ", " << x << ", " << y << ", " << z << ", " << w << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib4f(" << indx << ", " + << x << ", " << y << ", " << z << ", " << w + << ")"); // NOLINT helper_->VertexAttrib4f(indx, x, y, z, w); CheckGLError(); } void GLES2Implementation::VertexAttrib4fv(GLuint indx, const GLfloat* values) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib4fv(" << indx << ", " << static_cast<const void*>(values) << ")"); // NOLINT - GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", " << values[2] << ", " << values[3]); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib4fv(" << indx << ", " + << static_cast<const void*>(values) << ")"); // NOLINT + GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", " + << values[2] << ", " << values[3]); // NOLINT helper_->VertexAttrib4fvImmediate(indx, values); CheckGLError(); } -void GLES2Implementation::Viewport( - GLint x, GLint y, GLsizei width, GLsizei height) { +void GLES2Implementation::Viewport(GLint x, + GLint y, + GLsizei width, + GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glViewport(" << x << ", " << y << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glViewport(" << x << ", " << y + << ", " << width << ", " << height << ")"); // NOLINT if (width < 0) { SetGLError(GL_INVALID_VALUE, "glViewport", "width < 0"); return; @@ -1414,34 +1683,55 @@ void GLES2Implementation::Viewport( CheckGLError(); } -void GLES2Implementation::BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { +void GLES2Implementation::BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBlitFramebufferCHROMIUM(" << srcX0 << ", " << srcY0 << ", " << srcX1 << ", " << srcY1 << ", " << dstX0 << ", " << dstY0 << ", " << dstX1 << ", " << dstY1 << ", " << mask << ", " << GLES2Util::GetStringBlitFilter(filter) << ")"); // NOLINT + GPU_CLIENT_LOG( + "[" << GetLogPrefix() << "] glBlitFramebufferCHROMIUM(" << srcX0 << ", " + << srcY0 << ", " << srcX1 << ", " << srcY1 << ", " << dstX0 << ", " + << dstY0 << ", " << dstX1 << ", " << dstY1 << ", " << mask << ", " + << GLES2Util::GetStringBlitFilter(filter) << ")"); // NOLINT helper_->BlitFramebufferCHROMIUM( srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); CheckGLError(); } void GLES2Implementation::RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRenderbufferStorageMultisampleCHROMIUM(" << GLES2Util::GetStringRenderBufferTarget(target) << ", " << samples << ", " << GLES2Util::GetStringRenderBufferFormat(internalformat) << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG( + "[" << GetLogPrefix() << "] glRenderbufferStorageMultisampleCHROMIUM(" + << GLES2Util::GetStringRenderBufferTarget(target) << ", " << samples + << ", " << GLES2Util::GetStringRenderBufferFormat(internalformat) + << ", " << width << ", " << height << ")"); // NOLINT if (samples < 0) { - SetGLError( - GL_INVALID_VALUE, "glRenderbufferStorageMultisampleCHROMIUM", "samples < 0"); // NOLINT + SetGLError(GL_INVALID_VALUE, + "glRenderbufferStorageMultisampleCHROMIUM", + "samples < 0"); // NOLINT return; } if (width < 0) { - SetGLError( - GL_INVALID_VALUE, "glRenderbufferStorageMultisampleCHROMIUM", "width < 0"); // NOLINT + SetGLError(GL_INVALID_VALUE, + "glRenderbufferStorageMultisampleCHROMIUM", + "width < 0"); // NOLINT return; } if (height < 0) { - SetGLError( - GL_INVALID_VALUE, "glRenderbufferStorageMultisampleCHROMIUM", "height < 0"); // NOLINT + SetGLError(GL_INVALID_VALUE, + "glRenderbufferStorageMultisampleCHROMIUM", + "height < 0"); // NOLINT return; } helper_->RenderbufferStorageMultisampleCHROMIUM( @@ -1450,10 +1740,17 @@ void GLES2Implementation::RenderbufferStorageMultisampleCHROMIUM( } void GLES2Implementation::RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRenderbufferStorageMultisampleEXT(" << GLES2Util::GetStringRenderBufferTarget(target) << ", " << samples << ", " << GLES2Util::GetStringRenderBufferFormat(internalformat) << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG( + "[" << GetLogPrefix() << "] glRenderbufferStorageMultisampleEXT(" + << GLES2Util::GetStringRenderBufferTarget(target) << ", " << samples + << ", " << GLES2Util::GetStringRenderBufferFormat(internalformat) + << ", " << width << ", " << height << ")"); // NOLINT if (samples < 0) { SetGLError( GL_INVALID_VALUE, "glRenderbufferStorageMultisampleEXT", "samples < 0"); @@ -1474,14 +1771,23 @@ void GLES2Implementation::RenderbufferStorageMultisampleEXT( CheckGLError(); } -void GLES2Implementation::FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) { +void GLES2Implementation::FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFramebufferTexture2DMultisampleEXT(" << GLES2Util::GetStringFrameBufferTarget(target) << ", " << GLES2Util::GetStringAttachment(attachment) << ", " << GLES2Util::GetStringTextureTarget(textarget) << ", " << texture << ", " << level << ", " << samples << ")"); // NOLINT + GPU_CLIENT_LOG( + "[" << GetLogPrefix() << "] glFramebufferTexture2DMultisampleEXT(" + << GLES2Util::GetStringFrameBufferTarget(target) << ", " + << GLES2Util::GetStringAttachment(attachment) << ", " + << GLES2Util::GetStringTextureTarget(textarget) << ", " << texture + << ", " << level << ", " << samples << ")"); // NOLINT if (samples < 0) { - SetGLError( - GL_INVALID_VALUE, "glFramebufferTexture2DMultisampleEXT", "samples < 0"); // NOLINT + SetGLError(GL_INVALID_VALUE, + "glFramebufferTexture2DMultisampleEXT", + "samples < 0"); // NOLINT return; } helper_->FramebufferTexture2DMultisampleEXT( @@ -1489,11 +1795,17 @@ void GLES2Implementation::FramebufferTexture2DMultisampleEXT( CheckGLError(); } -void GLES2Implementation::TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) { +void GLES2Implementation::TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexStorage2DEXT(" << GLES2Util::GetStringTextureTarget(target) << ", " << levels << ", " << GLES2Util::GetStringTextureInternalFormatStorage(internalFormat) << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG( + "[" << GetLogPrefix() << "] glTexStorage2DEXT(" + << GLES2Util::GetStringTextureTarget(target) << ", " << levels << ", " + << GLES2Util::GetStringTextureInternalFormatStorage(internalFormat) + << ", " << width << ", " << height << ")"); // NOLINT if (levels < 0) { SetGLError(GL_INVALID_VALUE, "glTexStorage2DEXT", "levels < 0"); return; @@ -1511,14 +1823,14 @@ void GLES2Implementation::TexStorage2DEXT( } void GLES2Implementation::GenQueriesEXT(GLsizei n, GLuint* queries) { - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenQueriesEXT(" << n << ", " << static_cast<const void*>(queries) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenQueriesEXT(" << n << ", " + << static_cast<const void*>(queries) << ")"); // NOLINT if (n < 0) { SetGLError(GL_INVALID_VALUE, "glGenQueriesEXT", "n < 0"); return; } GPU_CLIENT_SINGLE_THREAD_CHECK(); - GetIdHandler(id_namespaces::kQueries)-> - MakeIds(this, 0, n, queries); + GetIdHandler(id_namespaces::kQueries)->MakeIds(this, 0, n, queries); GenQueriesEXTHelper(n, queries); helper_->GenQueriesEXTImmediate(n, queries); if (share_group_->bind_generates_resource()) @@ -1533,7 +1845,8 @@ void GLES2Implementation::GenQueriesEXT(GLsizei n, GLuint* queries) { void GLES2Implementation::DeleteQueriesEXT(GLsizei n, const GLuint* queries) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteQueriesEXT(" << n << ", " << static_cast<const void*>(queries) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteQueriesEXT(" << n << ", " + << static_cast<const void*>(queries) << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < n; ++i) { GPU_CLIENT_LOG(" " << i << ": " << queries[i]); @@ -1553,14 +1866,14 @@ void GLES2Implementation::DeleteQueriesEXT(GLsizei n, const GLuint* queries) { } void GLES2Implementation::GenVertexArraysOES(GLsizei n, GLuint* arrays) { - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenVertexArraysOES(" << n << ", " << static_cast<const void*>(arrays) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenVertexArraysOES(" << n << ", " + << static_cast<const void*>(arrays) << ")"); // NOLINT if (n < 0) { SetGLError(GL_INVALID_VALUE, "glGenVertexArraysOES", "n < 0"); return; } GPU_CLIENT_SINGLE_THREAD_CHECK(); - GetIdHandler(id_namespaces::kVertexArrays)-> - MakeIds(this, 0, n, arrays); + GetIdHandler(id_namespaces::kVertexArrays)->MakeIds(this, 0, n, arrays); GenVertexArraysOESHelper(n, arrays); helper_->GenVertexArraysOESImmediate(n, arrays); if (share_group_->bind_generates_resource()) @@ -1573,10 +1886,12 @@ void GLES2Implementation::GenVertexArraysOES(GLsizei n, GLuint* arrays) { CheckGLError(); } -void GLES2Implementation::DeleteVertexArraysOES( - GLsizei n, const GLuint* arrays) { +void GLES2Implementation::DeleteVertexArraysOES(GLsizei n, + const GLuint* arrays) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteVertexArraysOES(" << n << ", " << static_cast<const void*>(arrays) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteVertexArraysOES(" << n + << ", " << static_cast<const void*>(arrays) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < n; ++i) { GPU_CLIENT_LOG(" " << i << ": " << arrays[i]); @@ -1598,7 +1913,8 @@ void GLES2Implementation::DeleteVertexArraysOES( GLboolean GLES2Implementation::IsVertexArrayOES(GLuint array) { GPU_CLIENT_SINGLE_THREAD_CHECK(); TRACE_EVENT0("gpu", "GLES2Implementation::IsVertexArrayOES"); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsVertexArrayOES(" << array << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsVertexArrayOES(" << array + << ")"); // NOLINT typedef cmds::IsVertexArrayOES::Result Result; Result* result = GetResultAs<Result*>(); if (!result) { @@ -1615,10 +1931,10 @@ GLboolean GLES2Implementation::IsVertexArrayOES(GLuint array) { void GLES2Implementation::BindVertexArrayOES(GLuint array) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindVertexArrayOES(" << array << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindVertexArrayOES(" << array + << ")"); // NOLINT if (IsVertexArrayReservedId(array)) { - SetGLError( - GL_INVALID_OPERATION, "BindVertexArrayOES", "array reserved id"); + SetGLError(GL_INVALID_OPERATION, "BindVertexArrayOES", "array reserved id"); return; } if (BindVertexArrayHelper(array)) { @@ -1627,24 +1943,23 @@ void GLES2Implementation::BindVertexArrayOES(GLuint array) { CheckGLError(); } -void GLES2Implementation::GetTranslatedShaderSourceANGLE( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { +void GLES2Implementation::GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) { GPU_CLIENT_SINGLE_THREAD_CHECK(); GPU_CLIENT_VALIDATE_DESTINATION_OPTIONAL_INITALIZATION(GLsizei, length); - GPU_CLIENT_LOG("[" << GetLogPrefix() - << "] glGetTranslatedShaderSourceANGLE" << "(" - << shader << ", " - << bufsize << ", " - << static_cast<void*>(length) << ", " - << static_cast<void*>(source) << ")"); + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetTranslatedShaderSourceANGLE" + << "(" << shader << ", " << bufsize << ", " + << static_cast<void*>(length) << ", " + << static_cast<void*>(source) << ")"); helper_->SetBucketSize(kResultBucketId, 0); helper_->GetTranslatedShaderSourceANGLE(shader, kResultBucketId); std::string str; GLsizei max_size = 0; if (GetBucketAsString(kResultBucketId, &str)) { if (bufsize > 0) { - max_size = - std::min(static_cast<size_t>(bufsize) - 1, str.size()); + max_size = std::min(static_cast<size_t>(bufsize) - 1, str.size()); memcpy(source, str.c_str(), max_size); source[max_size] = '\0'; GPU_CLIENT_LOG("------\n" << source << "\n------"); @@ -1655,18 +1970,22 @@ void GLES2Implementation::GetTranslatedShaderSourceANGLE( } CheckGLError(); } -void GLES2Implementation::TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) { +void GLES2Implementation::TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexImageIOSurface2DCHROMIUM(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << width << ", " << height << ", " << ioSurfaceId << ", " << plane << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTexImageIOSurface2DCHROMIUM(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << width << ", " << height << ", " << ioSurfaceId << ", " + << plane << ")"); // NOLINT if (width < 0) { SetGLError(GL_INVALID_VALUE, "glTexImageIOSurface2DCHROMIUM", "width < 0"); return; } if (height < 0) { - SetGLError( - GL_INVALID_VALUE, "glTexImageIOSurface2DCHROMIUM", "height < 0"); + SetGLError(GL_INVALID_VALUE, "glTexImageIOSurface2DCHROMIUM", "height < 0"); return; } helper_->TexImageIOSurface2DCHROMIUM( @@ -1674,39 +1993,55 @@ void GLES2Implementation::TexImageIOSurface2DCHROMIUM( CheckGLError(); } -void GLES2Implementation::CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) { +void GLES2Implementation::CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCopyTextureCHROMIUM(" << GLES2Util::GetStringEnum(target) << ", " << GLES2Util::GetStringEnum(source_id) << ", " << GLES2Util::GetStringEnum(dest_id) << ", " << level << ", " << internalformat << ", " << GLES2Util::GetStringPixelType(dest_type) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCopyTextureCHROMIUM(" + << GLES2Util::GetStringEnum(target) << ", " + << GLES2Util::GetStringEnum(source_id) << ", " + << GLES2Util::GetStringEnum(dest_id) << ", " << level + << ", " << internalformat << ", " + << GLES2Util::GetStringPixelType(dest_type) + << ")"); // NOLINT helper_->CopyTextureCHROMIUM( target, source_id, dest_id, level, internalformat, dest_type); CheckGLError(); } -void GLES2Implementation::BindTexImage2DCHROMIUM( - GLenum target, GLint imageId) { +void GLES2Implementation::BindTexImage2DCHROMIUM(GLenum target, GLint imageId) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindTexImage2DCHROMIUM(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << imageId << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindTexImage2DCHROMIUM(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << imageId << ")"); // NOLINT helper_->BindTexImage2DCHROMIUM(target, imageId); CheckGLError(); } -void GLES2Implementation::ReleaseTexImage2DCHROMIUM( - GLenum target, GLint imageId) { +void GLES2Implementation::ReleaseTexImage2DCHROMIUM(GLenum target, + GLint imageId) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glReleaseTexImage2DCHROMIUM(" << GLES2Util::GetStringTextureBindTarget(target) << ", " << imageId << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glReleaseTexImage2DCHROMIUM(" + << GLES2Util::GetStringTextureBindTarget(target) << ", " + << imageId << ")"); // NOLINT helper_->ReleaseTexImage2DCHROMIUM(target, imageId); CheckGLError(); } -void GLES2Implementation::DiscardFramebufferEXT( - GLenum target, GLsizei count, const GLenum* attachments) { +void GLES2Implementation::DiscardFramebufferEXT(GLenum target, + GLsizei count, + const GLenum* attachments) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDiscardFramebufferEXT(" << GLES2Util::GetStringEnum(target) << ", " << count << ", " << static_cast<const void*>(attachments) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDiscardFramebufferEXT(" + << GLES2Util::GetStringEnum(target) << ", " << count + << ", " << static_cast<const void*>(attachments) + << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << attachments[0 + i * 1]); + GPU_CLIENT_LOG(" " << i << ": " << attachments[0 + i * 1]); } }); if (count < 0) { @@ -1719,24 +2054,28 @@ void GLES2Implementation::DiscardFramebufferEXT( void GLES2Implementation::LoseContextCHROMIUM(GLenum current, GLenum other) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glLoseContextCHROMIUM(" << GLES2Util::GetStringEnum(current) << ", " << GLES2Util::GetStringEnum(other) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glLoseContextCHROMIUM(" + << GLES2Util::GetStringEnum(current) << ", " + << GLES2Util::GetStringEnum(other) << ")"); // NOLINT helper_->LoseContextCHROMIUM(current, other); CheckGLError(); } void GLES2Implementation::WaitSyncPointCHROMIUM(GLuint sync_point) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glWaitSyncPointCHROMIUM(" << sync_point << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glWaitSyncPointCHROMIUM(" + << sync_point << ")"); // NOLINT helper_->WaitSyncPointCHROMIUM(sync_point); CheckGLError(); } void GLES2Implementation::DrawBuffersEXT(GLsizei count, const GLenum* bufs) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDrawBuffersEXT(" << count << ", " << static_cast<const void*>(bufs) << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDrawBuffersEXT(" << count << ", " + << static_cast<const void*>(bufs) << ")"); // NOLINT GPU_CLIENT_LOG_CODE_BLOCK({ for (GLsizei i = 0; i < count; ++i) { - GPU_CLIENT_LOG(" " << i << ": " << bufs[0 + i * 1]); + GPU_CLIENT_LOG(" " << i << ": " << bufs[0 + i * 1]); } }); if (count < 0) { @@ -1749,10 +2088,10 @@ void GLES2Implementation::DrawBuffersEXT(GLsizei count, const GLenum* bufs) { void GLES2Implementation::DiscardBackbufferCHROMIUM() { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDiscardBackbufferCHROMIUM(" << ")"); // NOLINT + GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDiscardBackbufferCHROMIUM(" + << ")"); // NOLINT helper_->DiscardBackbufferCHROMIUM(); CheckGLError(); } #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_IMPL_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h index 172b1b3..18f7c12 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_implementation.h to declare the @@ -11,7 +13,6 @@ #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ - TEST_F(GLES2ImplementationTest, AttachShader) { struct Cmds { cmds::AttachShader cmd; @@ -243,7 +244,7 @@ TEST_F(GLES2ImplementationTest, CullFace) { } TEST_F(GLES2ImplementationTest, DeleteBuffers) { - GLuint ids[2] = { kBuffersStartId, kBuffersStartId + 1 }; + GLuint ids[2] = {kBuffersStartId, kBuffersStartId + 1}; struct Cmds { cmds::DeleteBuffersImmediate del; GLuint data[2]; @@ -257,7 +258,7 @@ TEST_F(GLES2ImplementationTest, DeleteBuffers) { } TEST_F(GLES2ImplementationTest, DeleteFramebuffers) { - GLuint ids[2] = { kFramebuffersStartId, kFramebuffersStartId + 1 }; + GLuint ids[2] = {kFramebuffersStartId, kFramebuffersStartId + 1}; struct Cmds { cmds::DeleteFramebuffersImmediate del; GLuint data[2]; @@ -282,7 +283,7 @@ TEST_F(GLES2ImplementationTest, DeleteProgram) { } TEST_F(GLES2ImplementationTest, DeleteRenderbuffers) { - GLuint ids[2] = { kRenderbuffersStartId, kRenderbuffersStartId + 1 }; + GLuint ids[2] = {kRenderbuffersStartId, kRenderbuffersStartId + 1}; struct Cmds { cmds::DeleteRenderbuffersImmediate del; GLuint data[2]; @@ -307,7 +308,7 @@ TEST_F(GLES2ImplementationTest, DeleteShader) { } TEST_F(GLES2ImplementationTest, DeleteTextures) { - GLuint ids[2] = { kTexturesStartId, kTexturesStartId + 1 }; + GLuint ids[2] = {kTexturesStartId, kTexturesStartId + 1}; struct Cmds { cmds::DeleteTexturesImmediate del; GLuint data[2]; @@ -444,7 +445,7 @@ TEST_F(GLES2ImplementationTest, FrontFace) { } TEST_F(GLES2ImplementationTest, GenBuffers) { - GLuint ids[2] = { 0, }; + GLuint ids[2] = {0, }; struct Cmds { cmds::GenBuffersImmediate gen; GLuint data[2]; @@ -471,7 +472,7 @@ TEST_F(GLES2ImplementationTest, GenerateMipmap) { } TEST_F(GLES2ImplementationTest, GenFramebuffers) { - GLuint ids[2] = { 0, }; + GLuint ids[2] = {0, }; struct Cmds { cmds::GenFramebuffersImmediate gen; GLuint data[2]; @@ -487,7 +488,7 @@ TEST_F(GLES2ImplementationTest, GenFramebuffers) { } TEST_F(GLES2ImplementationTest, GenRenderbuffers) { - GLuint ids[2] = { 0, }; + GLuint ids[2] = {0, }; struct Cmds { cmds::GenRenderbuffersImmediate gen; GLuint data[2]; @@ -503,7 +504,7 @@ TEST_F(GLES2ImplementationTest, GenRenderbuffers) { } TEST_F(GLES2ImplementationTest, GenTextures) { - GLuint ids[2] = { 0, }; + GLuint ids[2] = {0, }; struct Cmds { cmds::GenTexturesImmediate gen; GLuint data[2]; @@ -581,14 +582,18 @@ TEST_F(GLES2ImplementationTest, GetFramebufferAttachmentParameteriv) { Result::Type result = 0; Cmds expected; ExpectedMemoryInfo result1 = GetExpectedResultMemory(4); - expected.cmd.Init( - 123, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, - result1.id, result1.offset); + expected.cmd.Init(123, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + result1.id, + result1.offset); EXPECT_CALL(*command_buffer(), OnFlush()) .WillOnce(SetMemory(result1.ptr, SizedResultHelper<Result::Type>(1))) .RetiresOnSaturation(); gl_->GetFramebufferAttachmentParameteriv( - 123, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + 123, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &result); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(static_cast<Result::Type>(1), result); @@ -1583,7 +1588,7 @@ TEST_F(GLES2ImplementationTest, TexStorage2DEXT) { } TEST_F(GLES2ImplementationTest, GenQueriesEXT) { - GLuint ids[2] = { 0, }; + GLuint ids[2] = {0, }; struct Cmds { cmds::GenQueriesEXTImmediate gen; GLuint data[2]; @@ -1599,7 +1604,7 @@ TEST_F(GLES2ImplementationTest, GenQueriesEXT) { } TEST_F(GLES2ImplementationTest, DeleteQueriesEXT) { - GLuint ids[2] = { kQueriesStartId, kQueriesStartId + 1 }; + GLuint ids[2] = {kQueriesStartId, kQueriesStartId + 1}; struct Cmds { cmds::DeleteQueriesEXTImmediate del; GLuint data[2]; @@ -1627,7 +1632,7 @@ TEST_F(GLES2ImplementationTest, PopGroupMarkerEXT) { } TEST_F(GLES2ImplementationTest, GenVertexArraysOES) { - GLuint ids[2] = { 0, }; + GLuint ids[2] = {0, }; struct Cmds { cmds::GenVertexArraysOESImmediate gen; GLuint data[2]; @@ -1643,7 +1648,7 @@ TEST_F(GLES2ImplementationTest, GenVertexArraysOES) { } TEST_F(GLES2ImplementationTest, DeleteVertexArraysOES) { - GLuint ids[2] = { kVertexArraysStartId, kVertexArraysStartId + 1 }; + GLuint ids[2] = {kVertexArraysStartId, kVertexArraysStartId + 1}; struct Cmds { cmds::DeleteVertexArraysOESImmediate del; GLuint data[2]; @@ -1832,4 +1837,3 @@ TEST_F(GLES2ImplementationTest, DiscardBackbufferCHROMIUM) { EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_interface_autogen.h b/gpu/command_buffer/client/gles2_interface_autogen.h index c7020e3..7ac567d 100644 --- a/gpu/command_buffer/client/gles2_interface_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_interface.h to declare the @@ -13,44 +15,78 @@ virtual void ActiveTexture(GLenum texture) = 0; virtual void AttachShader(GLuint program, GLuint shader) = 0; -virtual void BindAttribLocation( - GLuint program, GLuint index, const char* name) = 0; +virtual void BindAttribLocation(GLuint program, + GLuint index, + const char* name) = 0; virtual void BindBuffer(GLenum target, GLuint buffer) = 0; virtual void BindFramebuffer(GLenum target, GLuint framebuffer) = 0; virtual void BindRenderbuffer(GLenum target, GLuint renderbuffer) = 0; virtual void BindTexture(GLenum target, GLuint texture) = 0; -virtual void BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = 0; +virtual void BlendColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) = 0; virtual void BlendEquation(GLenum mode) = 0; virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) = 0; virtual void BlendFunc(GLenum sfactor, GLenum dfactor) = 0; -virtual void BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = 0; -virtual void BufferData( - GLenum target, GLsizeiptr size, const void* data, GLenum usage) = 0; -virtual void BufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, const void* data) = 0; +virtual void BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) = 0; +virtual void BufferData(GLenum target, + GLsizeiptr size, + const void* data, + GLenum usage) = 0; +virtual void BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data) = 0; virtual GLenum CheckFramebufferStatus(GLenum target) = 0; virtual void Clear(GLbitfield mask) = 0; -virtual void ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = 0; +virtual void ClearColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) = 0; virtual void ClearDepthf(GLclampf depth) = 0; virtual void ClearStencil(GLint s) = 0; -virtual void ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = 0; +virtual void ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) = 0; virtual void CompileShader(GLuint shader) = 0; -virtual void CompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, const void* data) = 0; -virtual void CompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, const void* data) = 0; -virtual void CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) = 0; -virtual void CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) = 0; +virtual void CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data) = 0; +virtual void CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data) = 0; +virtual void CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) = 0; +virtual void CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) = 0; virtual GLuint CreateProgram() = 0; virtual GLuint CreateShader(GLenum type) = 0; virtual void CullFace(GLenum mode) = 0; @@ -67,66 +103,93 @@ virtual void DetachShader(GLuint program, GLuint shader) = 0; virtual void Disable(GLenum cap) = 0; virtual void DisableVertexAttribArray(GLuint index) = 0; virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) = 0; -virtual void DrawElements( - GLenum mode, GLsizei count, GLenum type, const void* indices) = 0; +virtual void DrawElements(GLenum mode, + GLsizei count, + GLenum type, + const void* indices) = 0; virtual void Enable(GLenum cap) = 0; virtual void EnableVertexAttribArray(GLuint index) = 0; virtual void Finish() = 0; virtual void Flush() = 0; -virtual void FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) = 0; -virtual void FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) = 0; +virtual void FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) = 0; +virtual void FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) = 0; virtual void FrontFace(GLenum mode) = 0; virtual void GenBuffers(GLsizei n, GLuint* buffers) = 0; virtual void GenerateMipmap(GLenum target) = 0; virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) = 0; virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) = 0; virtual void GenTextures(GLsizei n, GLuint* textures) = 0; -virtual void GetActiveAttrib( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) = 0; -virtual void GetActiveUniform( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) = 0; -virtual void GetAttachedShaders( - GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) = 0; +virtual void GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) = 0; +virtual void GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) = 0; +virtual void GetAttachedShaders(GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders) = 0; virtual GLint GetAttribLocation(GLuint program, const char* name) = 0; virtual void GetBooleanv(GLenum pname, GLboolean* params) = 0; -virtual void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) = - 0; +virtual void GetBufferParameteriv(GLenum target, + GLenum pname, + GLint* params) = 0; virtual GLenum GetError() = 0; virtual void GetFloatv(GLenum pname, GLfloat* params) = 0; -virtual void GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) = 0; +virtual void GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) = 0; virtual void GetIntegerv(GLenum pname, GLint* params) = 0; virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) = 0; -virtual void GetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) = 0; -virtual void GetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) = 0; +virtual void GetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) = 0; +virtual void GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint* params) = 0; virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) = 0; -virtual void GetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) = 0; -virtual void GetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) = - 0; -virtual void GetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) = 0; +virtual void GetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) = 0; +virtual void GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision) = 0; +virtual void GetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) = 0; virtual const GLubyte* GetString(GLenum name) = 0; -virtual void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) = - 0; +virtual void GetTexParameterfv(GLenum target, + GLenum pname, + GLfloat* params) = 0; virtual void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) = 0; virtual void GetUniformfv(GLuint program, GLint location, GLfloat* params) = 0; virtual void GetUniformiv(GLuint program, GLint location, GLint* params) = 0; virtual GLint GetUniformLocation(GLuint program, const char* name) = 0; -virtual void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) = - 0; +virtual void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) = 0; virtual void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) = 0; -virtual void GetVertexAttribPointerv( - GLuint index, GLenum pname, void** pointer) = 0; +virtual void GetVertexAttribPointerv(GLuint index, + GLenum pname, + void** pointer) = 0; virtual void Hint(GLenum target, GLenum mode) = 0; virtual GLboolean IsBuffer(GLuint buffer) = 0; virtual GLboolean IsEnabled(GLenum cap) = 0; @@ -139,43 +202,69 @@ virtual void LineWidth(GLfloat width) = 0; virtual void LinkProgram(GLuint program) = 0; virtual void PixelStorei(GLenum pname, GLint param) = 0; virtual void PolygonOffset(GLfloat factor, GLfloat units) = 0; -virtual void ReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - void* pixels) = 0; +virtual void ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels) = 0; virtual void ReleaseShaderCompiler() = 0; -virtual void RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = 0; +virtual void RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) = 0; virtual void SampleCoverage(GLclampf value, GLboolean invert) = 0; virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) = 0; -virtual void ShaderBinary( - GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, - GLsizei length) = 0; -virtual void ShaderSource( - GLuint shader, GLsizei count, const GLchar* const* str, - const GLint* length) = 0; +virtual void ShaderBinary(GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length) = 0; +virtual void ShaderSource(GLuint shader, + GLsizei count, + const GLchar* const* str, + const GLint* length) = 0; virtual void ShallowFinishCHROMIUM() = 0; virtual void ShallowFlushCHROMIUM() = 0; virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) = 0; -virtual void StencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) = 0; +virtual void StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask) = 0; virtual void StencilMask(GLuint mask) = 0; virtual void StencilMaskSeparate(GLenum face, GLuint mask) = 0; virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) = 0; -virtual void StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = 0; -virtual void TexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) = 0; +virtual void StencilOpSeparate(GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass) = 0; +virtual void TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) = 0; virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) = 0; -virtual void TexParameterfv( - GLenum target, GLenum pname, const GLfloat* params) = 0; +virtual void TexParameterfv(GLenum target, + GLenum pname, + const GLfloat* params) = 0; virtual void TexParameteri(GLenum target, GLenum pname, GLint param) = 0; -virtual void TexParameteriv(GLenum target, GLenum pname, const GLint* params) = - 0; -virtual void TexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) = 0; +virtual void TexParameteriv(GLenum target, + GLenum pname, + const GLint* params) = 0; +virtual void TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels) = 0; virtual void Uniform1f(GLint location, GLfloat x) = 0; virtual void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) = 0; virtual void Uniform1i(GLint location, GLint x) = 0; @@ -188,20 +277,26 @@ virtual void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) = 0; virtual void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) = 0; virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) = 0; virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) = 0; -virtual void Uniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0; +virtual void Uniform4f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) = 0; virtual void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) = 0; virtual void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) = 0; virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) = 0; -virtual void UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = - 0; -virtual void UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = - 0; -virtual void UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = - 0; +virtual void UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) = 0; +virtual void UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) = 0; +virtual void UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) = 0; virtual void UseProgram(GLuint program) = 0; virtual void ValidateProgram(GLuint program) = 0; virtual void VertexAttrib1f(GLuint indx, GLfloat x) = 0; @@ -210,28 +305,50 @@ virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) = 0; virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) = 0; virtual void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) = 0; virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) = 0; -virtual void VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0; +virtual void VertexAttrib4f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) = 0; virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) = 0; -virtual void VertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, - const void* ptr) = 0; +virtual void VertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr) = 0; virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) = 0; -virtual void BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) = 0; -virtual void RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) = 0; -virtual void RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) = 0; -virtual void FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) = 0; -virtual void TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) = 0; +virtual void BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) = 0; +virtual void RenderbufferStorageMultisampleCHROMIUM(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) = 0; +virtual void RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) = 0; +virtual void FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) = 0; +virtual void TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) = 0; virtual void GenQueriesEXT(GLsizei n, GLuint* queries) = 0; virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) = 0; virtual GLboolean IsQueryEXT(GLuint id) = 0; @@ -247,80 +364,126 @@ virtual void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) = 0; virtual GLboolean IsVertexArrayOES(GLuint array) = 0; virtual void BindVertexArrayOES(GLuint array) = 0; virtual void SwapBuffers() = 0; -virtual GLuint GetMaxValueInBufferCHROMIUM( - GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) = 0; -virtual void GenSharedIdsCHROMIUM( - GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) = 0; -virtual void DeleteSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) = 0; -virtual void RegisterSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) = 0; +virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id, + GLsizei count, + GLenum type, + GLuint offset) = 0; +virtual void GenSharedIdsCHROMIUM(GLuint namespace_id, + GLuint id_offset, + GLsizei n, + GLuint* ids) = 0; +virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) = 0; +virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) = 0; virtual GLboolean EnableFeatureCHROMIUM(const char* feature) = 0; virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) = 0; virtual GLboolean UnmapBufferCHROMIUM(GLuint target) = 0; virtual void* MapImageCHROMIUM(GLuint image_id, GLenum access) = 0; virtual void UnmapImageCHROMIUM(GLuint image_id) = 0; -virtual void* MapBufferSubDataCHROMIUM( - GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) = 0; +virtual void* MapBufferSubDataCHROMIUM(GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access) = 0; virtual void UnmapBufferSubDataCHROMIUM(const void* mem) = 0; -virtual void* MapTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLenum access) = 0; +virtual void* MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) = 0; virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) = 0; -virtual void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) = - 0; +virtual void ResizeCHROMIUM(GLuint width, + GLuint height, + GLfloat scale_factor) = 0; virtual const GLchar* GetRequestableExtensionsCHROMIUM() = 0; virtual void RequestExtensionCHROMIUM(const char* extension) = 0; virtual void RateLimitOffscreenContextCHROMIUM() = 0; -virtual void GetMultipleIntegervCHROMIUM( - const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size) = 0; -virtual void GetProgramInfoCHROMIUM( - GLuint program, GLsizei bufsize, GLsizei* size, void* info) = 0; +virtual void GetMultipleIntegervCHROMIUM(const GLenum* pnames, + GLuint count, + GLint* results, + GLsizeiptr size) = 0; +virtual void GetProgramInfoCHROMIUM(GLuint program, + GLsizei bufsize, + GLsizei* size, + void* info) = 0; virtual GLuint CreateStreamTextureCHROMIUM(GLuint texture) = 0; -virtual GLuint CreateImageCHROMIUM( - GLsizei width, GLsizei height, GLenum internalformat) = 0; +virtual GLuint CreateImageCHROMIUM(GLsizei width, + GLsizei height, + GLenum internalformat) = 0; virtual void DestroyImageCHROMIUM(GLuint image_id) = 0; -virtual void GetImageParameterivCHROMIUM( - GLuint image_id, GLenum pname, GLint* params) = 0; -virtual void GetTranslatedShaderSourceANGLE( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) = 0; -virtual void PostSubBufferCHROMIUM( - GLint x, GLint y, GLint width, GLint height) = 0; -virtual void TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) = 0; -virtual void CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) = 0; -virtual void DrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) = 0; -virtual void DrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, const void* indices, - GLsizei primcount) = 0; +virtual void GetImageParameterivCHROMIUM(GLuint image_id, + GLenum pname, + GLint* params) = 0; +virtual void GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) = 0; +virtual void PostSubBufferCHROMIUM(GLint x, + GLint y, + GLint width, + GLint height) = 0; +virtual void TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) = 0; +virtual void CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) = 0; +virtual void DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) = 0; +virtual void DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount) = 0; virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) = 0; virtual void GenMailboxCHROMIUM(GLbyte* mailbox) = 0; virtual void ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) = 0; virtual void ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) = 0; -virtual void BindUniformLocationCHROMIUM( - GLuint program, GLint location, const char* name) = 0; +virtual void BindUniformLocationCHROMIUM(GLuint program, + GLint location, + const char* name) = 0; virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) = 0; virtual void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) = 0; virtual void TraceBeginCHROMIUM(const char* name) = 0; virtual void TraceEndCHROMIUM() = 0; -virtual void AsyncTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* data) = 0; -virtual void AsyncTexImage2DCHROMIUM( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) = 0; +virtual void AsyncTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* data) = 0; +virtual void AsyncTexImage2DCHROMIUM(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) = 0; virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) = 0; -virtual void DiscardFramebufferEXT( - GLenum target, GLsizei count, const GLenum* attachments) = 0; +virtual void DiscardFramebufferEXT(GLenum target, + GLsizei count, + const GLenum* attachments) = 0; virtual void LoseContextCHROMIUM(GLenum current, GLenum other) = 0; virtual GLuint InsertSyncPointCHROMIUM() = 0; virtual void WaitSyncPointCHROMIUM(GLuint sync_point) = 0; virtual void DrawBuffersEXT(GLsizei count, const GLenum* bufs) = 0; virtual void DiscardBackbufferCHROMIUM() = 0; #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h index 45ec0e4..99f9edf 100644 --- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_interface_stub.h. @@ -12,56 +14,86 @@ virtual void ActiveTexture(GLenum texture) OVERRIDE; virtual void AttachShader(GLuint program, GLuint shader) OVERRIDE; -virtual void BindAttribLocation( - GLuint program, GLuint index, const char* name) OVERRIDE; +virtual void BindAttribLocation(GLuint program, + GLuint index, + const char* name) OVERRIDE; virtual void BindBuffer(GLenum target, GLuint buffer) OVERRIDE; virtual void BindFramebuffer(GLenum target, GLuint framebuffer) OVERRIDE; virtual void BindRenderbuffer(GLenum target, GLuint renderbuffer) OVERRIDE; virtual void BindTexture(GLenum target, GLuint texture) OVERRIDE; -virtual void BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) OVERRIDE; +virtual void BlendColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) OVERRIDE; virtual void BlendEquation(GLenum mode) OVERRIDE; virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) OVERRIDE; virtual void BlendFunc(GLenum sfactor, GLenum dfactor) OVERRIDE; -virtual void BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) OVERRIDE; -virtual void BufferData( - GLenum target, GLsizeiptr size, const void* data, GLenum usage) OVERRIDE; -virtual void BufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, - const void* data) OVERRIDE; +virtual void BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) OVERRIDE; +virtual void BufferData(GLenum target, + GLsizeiptr size, + const void* data, + GLenum usage) OVERRIDE; +virtual void BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data) OVERRIDE; virtual GLenum CheckFramebufferStatus(GLenum target) OVERRIDE; virtual void Clear(GLbitfield mask) OVERRIDE; -virtual void ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) OVERRIDE; +virtual void ClearColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) OVERRIDE; virtual void ClearDepthf(GLclampf depth) OVERRIDE; virtual void ClearStencil(GLint s) OVERRIDE; -virtual void ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) OVERRIDE; +virtual void ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) OVERRIDE; virtual void CompileShader(GLuint shader) OVERRIDE; -virtual void CompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const void* data) OVERRIDE; -virtual void CompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, - const void* data) OVERRIDE; -virtual void CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) OVERRIDE; -virtual void CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) OVERRIDE; +virtual void CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data) OVERRIDE; +virtual void CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data) OVERRIDE; +virtual void CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) OVERRIDE; +virtual void CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) OVERRIDE; virtual GLuint CreateProgram() OVERRIDE; virtual GLuint CreateShader(GLenum type) OVERRIDE; virtual void CullFace(GLenum mode) OVERRIDE; virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) OVERRIDE; -virtual void DeleteFramebuffers( - GLsizei n, const GLuint* framebuffers) OVERRIDE; +virtual void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) OVERRIDE; virtual void DeleteProgram(GLuint program) OVERRIDE; -virtual void DeleteRenderbuffers( - GLsizei n, const GLuint* renderbuffers) OVERRIDE; +virtual void DeleteRenderbuffers(GLsizei n, + const GLuint* renderbuffers) OVERRIDE; virtual void DeleteShader(GLuint shader) OVERRIDE; virtual void DeleteTextures(GLsizei n, const GLuint* textures) OVERRIDE; virtual void DepthFunc(GLenum func) OVERRIDE; @@ -71,72 +103,103 @@ virtual void DetachShader(GLuint program, GLuint shader) OVERRIDE; virtual void Disable(GLenum cap) OVERRIDE; virtual void DisableVertexAttribArray(GLuint index) OVERRIDE; virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) OVERRIDE; -virtual void DrawElements( - GLenum mode, GLsizei count, GLenum type, const void* indices) OVERRIDE; +virtual void DrawElements(GLenum mode, + GLsizei count, + GLenum type, + const void* indices) OVERRIDE; virtual void Enable(GLenum cap) OVERRIDE; virtual void EnableVertexAttribArray(GLuint index) OVERRIDE; virtual void Finish() OVERRIDE; virtual void Flush() OVERRIDE; -virtual void FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) OVERRIDE; -virtual void FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) OVERRIDE; +virtual void FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) OVERRIDE; +virtual void FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) OVERRIDE; virtual void FrontFace(GLenum mode) OVERRIDE; virtual void GenBuffers(GLsizei n, GLuint* buffers) OVERRIDE; virtual void GenerateMipmap(GLenum target) OVERRIDE; virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) OVERRIDE; virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) OVERRIDE; virtual void GenTextures(GLsizei n, GLuint* textures) OVERRIDE; -virtual void GetActiveAttrib( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) OVERRIDE; -virtual void GetActiveUniform( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) OVERRIDE; -virtual void GetAttachedShaders( - GLuint program, GLsizei maxcount, GLsizei* count, - GLuint* shaders) OVERRIDE; +virtual void GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) OVERRIDE; +virtual void GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) OVERRIDE; +virtual void GetAttachedShaders(GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders) OVERRIDE; virtual GLint GetAttribLocation(GLuint program, const char* name) OVERRIDE; virtual void GetBooleanv(GLenum pname, GLboolean* params) OVERRIDE; -virtual void GetBufferParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetBufferParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; virtual GLenum GetError() OVERRIDE; virtual void GetFloatv(GLenum pname, GLfloat* params) OVERRIDE; -virtual void GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) OVERRIDE; +virtual void GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) OVERRIDE; virtual void GetIntegerv(GLenum pname, GLint* params) OVERRIDE; -virtual void GetProgramiv( - GLuint program, GLenum pname, GLint* params) OVERRIDE; -virtual void GetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) OVERRIDE; -virtual void GetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) OVERRIDE; +virtual void GetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) OVERRIDE; +virtual void GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) OVERRIDE; -virtual void GetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) OVERRIDE; -virtual void GetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, GLint* range, - GLint* precision) OVERRIDE; -virtual void GetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) OVERRIDE; +virtual void GetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) OVERRIDE; +virtual void GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision) OVERRIDE; +virtual void GetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) OVERRIDE; virtual const GLubyte* GetString(GLenum name) OVERRIDE; -virtual void GetTexParameterfv( - GLenum target, GLenum pname, GLfloat* params) OVERRIDE; -virtual void GetTexParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; -virtual void GetUniformfv( - GLuint program, GLint location, GLfloat* params) OVERRIDE; -virtual void GetUniformiv( - GLuint program, GLint location, GLint* params) OVERRIDE; +virtual void GetTexParameterfv(GLenum target, + GLenum pname, + GLfloat* params) OVERRIDE; +virtual void GetTexParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; +virtual void GetUniformfv(GLuint program, + GLint location, + GLfloat* params) OVERRIDE; +virtual void GetUniformiv(GLuint program, + GLint location, + GLint* params) OVERRIDE; virtual GLint GetUniformLocation(GLuint program, const char* name) OVERRIDE; -virtual void GetVertexAttribfv( - GLuint index, GLenum pname, GLfloat* params) OVERRIDE; -virtual void GetVertexAttribiv( - GLuint index, GLenum pname, GLint* params) OVERRIDE; -virtual void GetVertexAttribPointerv( - GLuint index, GLenum pname, void** pointer) OVERRIDE; +virtual void GetVertexAttribfv(GLuint index, + GLenum pname, + GLfloat* params) OVERRIDE; +virtual void GetVertexAttribiv(GLuint index, + GLenum pname, + GLint* params) OVERRIDE; +virtual void GetVertexAttribPointerv(GLuint index, + GLenum pname, + void** pointer) OVERRIDE; virtual void Hint(GLenum target, GLenum mode) OVERRIDE; virtual GLboolean IsBuffer(GLuint buffer) OVERRIDE; virtual GLboolean IsEnabled(GLenum cap) OVERRIDE; @@ -149,125 +212,175 @@ virtual void LineWidth(GLfloat width) OVERRIDE; virtual void LinkProgram(GLuint program) OVERRIDE; virtual void PixelStorei(GLenum pname, GLint param) OVERRIDE; virtual void PolygonOffset(GLfloat factor, GLfloat units) OVERRIDE; -virtual void ReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - void* pixels) OVERRIDE; +virtual void ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels) OVERRIDE; virtual void ReleaseShaderCompiler() OVERRIDE; -virtual void RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; +virtual void RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; virtual void SampleCoverage(GLclampf value, GLboolean invert) OVERRIDE; virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; -virtual void ShaderBinary( - GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, - GLsizei length) OVERRIDE; -virtual void ShaderSource( - GLuint shader, GLsizei count, const GLchar* const* str, - const GLint* length) OVERRIDE; +virtual void ShaderBinary(GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length) OVERRIDE; +virtual void ShaderSource(GLuint shader, + GLsizei count, + const GLchar* const* str, + const GLint* length) OVERRIDE; virtual void ShallowFinishCHROMIUM() OVERRIDE; virtual void ShallowFlushCHROMIUM() OVERRIDE; virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) OVERRIDE; -virtual void StencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) OVERRIDE; +virtual void StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask) OVERRIDE; virtual void StencilMask(GLuint mask) OVERRIDE; virtual void StencilMaskSeparate(GLenum face, GLuint mask) OVERRIDE; virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) OVERRIDE; -virtual void StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) OVERRIDE; -virtual void TexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) OVERRIDE; -virtual void TexParameterf( - GLenum target, GLenum pname, GLfloat param) OVERRIDE; -virtual void TexParameterfv( - GLenum target, GLenum pname, const GLfloat* params) OVERRIDE; +virtual void StencilOpSeparate(GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass) OVERRIDE; +virtual void TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; +virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) OVERRIDE; +virtual void TexParameterfv(GLenum target, + GLenum pname, + const GLfloat* params) OVERRIDE; virtual void TexParameteri(GLenum target, GLenum pname, GLint param) OVERRIDE; -virtual void TexParameteriv( - GLenum target, GLenum pname, const GLint* params) OVERRIDE; -virtual void TexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) OVERRIDE; +virtual void TexParameteriv(GLenum target, + GLenum pname, + const GLint* params) OVERRIDE; +virtual void TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; virtual void Uniform1f(GLint location, GLfloat x) OVERRIDE; -virtual void Uniform1fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform1fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform1i(GLint location, GLint x) OVERRIDE; -virtual void Uniform1iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform1iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; virtual void Uniform2f(GLint location, GLfloat x, GLfloat y) OVERRIDE; -virtual void Uniform2fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform2fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform2i(GLint location, GLint x, GLint y) OVERRIDE; -virtual void Uniform2iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void Uniform3f( - GLint location, GLfloat x, GLfloat y, GLfloat z) OVERRIDE; -virtual void Uniform3fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform2iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) + OVERRIDE; +virtual void Uniform3fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) OVERRIDE; -virtual void Uniform3iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void Uniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) OVERRIDE; -virtual void Uniform4fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; -virtual void Uniform4i( - GLint location, GLint x, GLint y, GLint z, GLint w) OVERRIDE; -virtual void Uniform4iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; -virtual void UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; -virtual void UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; +virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform4f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) OVERRIDE; +virtual void Uniform4fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; +virtual void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) + OVERRIDE; +virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; +virtual void UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; +virtual void UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; virtual void UseProgram(GLuint program) OVERRIDE; virtual void ValidateProgram(GLuint program) OVERRIDE; virtual void VertexAttrib1f(GLuint indx, GLfloat x) OVERRIDE; virtual void VertexAttrib1fv(GLuint indx, const GLfloat* values) OVERRIDE; virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) OVERRIDE; virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttrib3f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z) OVERRIDE; +virtual void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) + OVERRIDE; virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) OVERRIDE; +virtual void VertexAttrib4f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) OVERRIDE; virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, - const void* ptr) OVERRIDE; -virtual void Viewport( - GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; -virtual void BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, - GLenum filter) OVERRIDE; -virtual void RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; -virtual void RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; -virtual void FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) OVERRIDE; -virtual void TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) OVERRIDE; +virtual void VertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr) OVERRIDE; +virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; +virtual void BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) OVERRIDE; +virtual void RenderbufferStorageMultisampleCHROMIUM(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; +virtual void RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; +virtual void FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) OVERRIDE; +virtual void TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) OVERRIDE; virtual void GenQueriesEXT(GLsizei n, GLuint* queries) OVERRIDE; virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) OVERRIDE; virtual GLboolean IsQueryEXT(GLuint id) OVERRIDE; virtual void BeginQueryEXT(GLenum target, GLuint id) OVERRIDE; virtual void EndQueryEXT(GLenum target) OVERRIDE; -virtual void GetQueryivEXT( - GLenum target, GLenum pname, GLint* params) OVERRIDE; -virtual void GetQueryObjectuivEXT( - GLuint id, GLenum pname, GLuint* params) OVERRIDE; -virtual void InsertEventMarkerEXT( - GLsizei length, const GLchar* marker) OVERRIDE; +virtual void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetQueryObjectuivEXT(GLuint id, + GLenum pname, + GLuint* params) OVERRIDE; +virtual void InsertEventMarkerEXT(GLsizei length, + const GLchar* marker) OVERRIDE; virtual void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) OVERRIDE; virtual void PopGroupMarkerEXT() OVERRIDE; virtual void GenVertexArraysOES(GLsizei n, GLuint* arrays) OVERRIDE; @@ -275,83 +388,126 @@ virtual void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) OVERRIDE; virtual GLboolean IsVertexArrayOES(GLuint array) OVERRIDE; virtual void BindVertexArrayOES(GLuint array) OVERRIDE; virtual void SwapBuffers() OVERRIDE; -virtual GLuint GetMaxValueInBufferCHROMIUM( - GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) OVERRIDE; -virtual void GenSharedIdsCHROMIUM( - GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) OVERRIDE; -virtual void DeleteSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) OVERRIDE; -virtual void RegisterSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) OVERRIDE; +virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id, + GLsizei count, + GLenum type, + GLuint offset) OVERRIDE; +virtual void GenSharedIdsCHROMIUM(GLuint namespace_id, + GLuint id_offset, + GLsizei n, + GLuint* ids) OVERRIDE; +virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) OVERRIDE; +virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) OVERRIDE; virtual GLboolean EnableFeatureCHROMIUM(const char* feature) OVERRIDE; virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) OVERRIDE; virtual GLboolean UnmapBufferCHROMIUM(GLuint target) OVERRIDE; virtual void* MapImageCHROMIUM(GLuint image_id, GLenum access) OVERRIDE; virtual void UnmapImageCHROMIUM(GLuint image_id) OVERRIDE; -virtual void* MapBufferSubDataCHROMIUM( - GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) OVERRIDE; +virtual void* MapBufferSubDataCHROMIUM(GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access) OVERRIDE; virtual void UnmapBufferSubDataCHROMIUM(const void* mem) OVERRIDE; -virtual void* MapTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLenum access) OVERRIDE; +virtual void* MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) OVERRIDE; virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) OVERRIDE; -virtual void ResizeCHROMIUM( - GLuint width, GLuint height, GLfloat scale_factor) OVERRIDE; +virtual void ResizeCHROMIUM(GLuint width, + GLuint height, + GLfloat scale_factor) OVERRIDE; virtual const GLchar* GetRequestableExtensionsCHROMIUM() OVERRIDE; virtual void RequestExtensionCHROMIUM(const char* extension) OVERRIDE; virtual void RateLimitOffscreenContextCHROMIUM() OVERRIDE; -virtual void GetMultipleIntegervCHROMIUM( - const GLenum* pnames, GLuint count, GLint* results, - GLsizeiptr size) OVERRIDE; -virtual void GetProgramInfoCHROMIUM( - GLuint program, GLsizei bufsize, GLsizei* size, void* info) OVERRIDE; +virtual void GetMultipleIntegervCHROMIUM(const GLenum* pnames, + GLuint count, + GLint* results, + GLsizeiptr size) OVERRIDE; +virtual void GetProgramInfoCHROMIUM(GLuint program, + GLsizei bufsize, + GLsizei* size, + void* info) OVERRIDE; virtual GLuint CreateStreamTextureCHROMIUM(GLuint texture) OVERRIDE; -virtual GLuint CreateImageCHROMIUM( - GLsizei width, GLsizei height, GLenum internalformat) OVERRIDE; +virtual GLuint CreateImageCHROMIUM(GLsizei width, + GLsizei height, + GLenum internalformat) OVERRIDE; virtual void DestroyImageCHROMIUM(GLuint image_id) OVERRIDE; -virtual void GetImageParameterivCHROMIUM( - GLuint image_id, GLenum pname, GLint* params) OVERRIDE; -virtual void GetTranslatedShaderSourceANGLE( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) OVERRIDE; -virtual void PostSubBufferCHROMIUM( - GLint x, GLint y, GLint width, GLint height) OVERRIDE; -virtual void TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) OVERRIDE; -virtual void CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) OVERRIDE; -virtual void DrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) OVERRIDE; -virtual void DrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, const void* indices, - GLsizei primcount) OVERRIDE; +virtual void GetImageParameterivCHROMIUM(GLuint image_id, + GLenum pname, + GLint* params) OVERRIDE; +virtual void GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) OVERRIDE; +virtual void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) + OVERRIDE; +virtual void TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) OVERRIDE; +virtual void CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) OVERRIDE; +virtual void DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) OVERRIDE; +virtual void DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount) OVERRIDE; virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) OVERRIDE; virtual void GenMailboxCHROMIUM(GLbyte* mailbox) OVERRIDE; -virtual void ProduceTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) OVERRIDE; -virtual void ConsumeTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) OVERRIDE; -virtual void BindUniformLocationCHROMIUM( - GLuint program, GLint location, const char* name) OVERRIDE; +virtual void ProduceTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) OVERRIDE; +virtual void ConsumeTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) OVERRIDE; +virtual void BindUniformLocationCHROMIUM(GLuint program, + GLint location, + const char* name) OVERRIDE; virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) OVERRIDE; virtual void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) OVERRIDE; virtual void TraceBeginCHROMIUM(const char* name) OVERRIDE; virtual void TraceEndCHROMIUM() OVERRIDE; -virtual void AsyncTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* data) OVERRIDE; -virtual void AsyncTexImage2DCHROMIUM( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) OVERRIDE; +virtual void AsyncTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* data) OVERRIDE; +virtual void AsyncTexImage2DCHROMIUM(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) OVERRIDE; -virtual void DiscardFramebufferEXT( - GLenum target, GLsizei count, const GLenum* attachments) OVERRIDE; +virtual void DiscardFramebufferEXT(GLenum target, + GLsizei count, + const GLenum* attachments) OVERRIDE; virtual void LoseContextCHROMIUM(GLenum current, GLenum other) OVERRIDE; virtual GLuint InsertSyncPointCHROMIUM() OVERRIDE; virtual void WaitSyncPointCHROMIUM(GLuint sync_point) OVERRIDE; virtual void DrawBuffersEXT(GLsizei count, const GLenum* bufs) OVERRIDE; virtual void DiscardBackbufferCHROMIUM() OVERRIDE; #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_STUB_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h index 539ea70..a93e993 100644 --- a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h @@ -4,666 +4,631 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_interface_stub.cc. #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_STUB_IMPL_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_STUB_IMPL_AUTOGEN_H_ -void GLES2InterfaceStub::ActiveTexture(GLenum /* texture */) { -} -void GLES2InterfaceStub::AttachShader( - GLuint /* program */, GLuint /* shader */) { -} -void GLES2InterfaceStub::BindAttribLocation( - GLuint /* program */, GLuint /* index */, const char* /* name */) { -} -void GLES2InterfaceStub::BindBuffer(GLenum /* target */, GLuint /* buffer */) { -} -void GLES2InterfaceStub::BindFramebuffer( - GLenum /* target */, GLuint /* framebuffer */) { -} -void GLES2InterfaceStub::BindRenderbuffer( - GLenum /* target */, GLuint /* renderbuffer */) { -} -void GLES2InterfaceStub::BindTexture( - GLenum /* target */, GLuint /* texture */) { -} -void GLES2InterfaceStub::BlendColor( - GLclampf /* red */, GLclampf /* green */, GLclampf /* blue */, - GLclampf /* alpha */) { -} -void GLES2InterfaceStub::BlendEquation(GLenum /* mode */) { -} -void GLES2InterfaceStub::BlendEquationSeparate( - GLenum /* modeRGB */, GLenum /* modeAlpha */) { -} -void GLES2InterfaceStub::BlendFunc( - GLenum /* sfactor */, GLenum /* dfactor */) { -} -void GLES2InterfaceStub::BlendFuncSeparate( - GLenum /* srcRGB */, GLenum /* dstRGB */, GLenum /* srcAlpha */, - GLenum /* dstAlpha */) { -} -void GLES2InterfaceStub::BufferData( - GLenum /* target */, GLsizeiptr /* size */, const void* /* data */, - GLenum /* usage */) { -} -void GLES2InterfaceStub::BufferSubData( - GLenum /* target */, GLintptr /* offset */, GLsizeiptr /* size */, - const void* /* data */) { -} +void GLES2InterfaceStub::ActiveTexture(GLenum /* texture */) {} +void GLES2InterfaceStub::AttachShader(GLuint /* program */, + GLuint /* shader */) {} +void GLES2InterfaceStub::BindAttribLocation(GLuint /* program */, + GLuint /* index */, + const char* /* name */) {} +void GLES2InterfaceStub::BindBuffer(GLenum /* target */, GLuint /* buffer */) {} +void GLES2InterfaceStub::BindFramebuffer(GLenum /* target */, + GLuint /* framebuffer */) {} +void GLES2InterfaceStub::BindRenderbuffer(GLenum /* target */, + GLuint /* renderbuffer */) {} +void GLES2InterfaceStub::BindTexture(GLenum /* target */, + GLuint /* texture */) {} +void GLES2InterfaceStub::BlendColor(GLclampf /* red */, + GLclampf /* green */, + GLclampf /* blue */, + GLclampf /* alpha */) {} +void GLES2InterfaceStub::BlendEquation(GLenum /* mode */) {} +void GLES2InterfaceStub::BlendEquationSeparate(GLenum /* modeRGB */, + GLenum /* modeAlpha */) {} +void GLES2InterfaceStub::BlendFunc(GLenum /* sfactor */, GLenum /* dfactor */) { +} +void GLES2InterfaceStub::BlendFuncSeparate(GLenum /* srcRGB */, + GLenum /* dstRGB */, + GLenum /* srcAlpha */, + GLenum /* dstAlpha */) {} +void GLES2InterfaceStub::BufferData(GLenum /* target */, + GLsizeiptr /* size */, + const void* /* data */, + GLenum /* usage */) {} +void GLES2InterfaceStub::BufferSubData(GLenum /* target */, + GLintptr /* offset */, + GLsizeiptr /* size */, + const void* /* data */) {} GLenum GLES2InterfaceStub::CheckFramebufferStatus(GLenum /* target */) { return 0; } -void GLES2InterfaceStub::Clear(GLbitfield /* mask */) { -} -void GLES2InterfaceStub::ClearColor( - GLclampf /* red */, GLclampf /* green */, GLclampf /* blue */, - GLclampf /* alpha */) { -} -void GLES2InterfaceStub::ClearDepthf(GLclampf /* depth */) { -} -void GLES2InterfaceStub::ClearStencil(GLint /* s */) { -} -void GLES2InterfaceStub::ColorMask( - GLboolean /* red */, GLboolean /* green */, GLboolean /* blue */, - GLboolean /* alpha */) { -} -void GLES2InterfaceStub::CompileShader(GLuint /* shader */) { -} -void GLES2InterfaceStub::CompressedTexImage2D( - GLenum /* target */, GLint /* level */, GLenum /* internalformat */, - GLsizei /* width */, GLsizei /* height */, GLint /* border */, - GLsizei /* imageSize */, const void* /* data */) { -} -void GLES2InterfaceStub::CompressedTexSubImage2D( - GLenum /* target */, GLint /* level */, GLint /* xoffset */, - GLint /* yoffset */, GLsizei /* width */, GLsizei /* height */, - GLenum /* format */, GLsizei /* imageSize */, const void* /* data */) { -} -void GLES2InterfaceStub::CopyTexImage2D( - GLenum /* target */, GLint /* level */, GLenum /* internalformat */, - GLint /* x */, GLint /* y */, GLsizei /* width */, GLsizei /* height */, - GLint /* border */) { -} -void GLES2InterfaceStub::CopyTexSubImage2D( - GLenum /* target */, GLint /* level */, GLint /* xoffset */, - GLint /* yoffset */, GLint /* x */, GLint /* y */, GLsizei /* width */, - GLsizei /* height */) { -} -GLuint GLES2InterfaceStub::CreateProgram() { - return 0; -} -GLuint GLES2InterfaceStub::CreateShader(GLenum /* type */) { - return 0; -} -void GLES2InterfaceStub::CullFace(GLenum /* mode */) { -} -void GLES2InterfaceStub::DeleteBuffers( - GLsizei /* n */, const GLuint* /* buffers */) { -} -void GLES2InterfaceStub::DeleteFramebuffers( - GLsizei /* n */, const GLuint* /* framebuffers */) { -} -void GLES2InterfaceStub::DeleteProgram(GLuint /* program */) { -} +void GLES2InterfaceStub::Clear(GLbitfield /* mask */) {} +void GLES2InterfaceStub::ClearColor(GLclampf /* red */, + GLclampf /* green */, + GLclampf /* blue */, + GLclampf /* alpha */) {} +void GLES2InterfaceStub::ClearDepthf(GLclampf /* depth */) {} +void GLES2InterfaceStub::ClearStencil(GLint /* s */) {} +void GLES2InterfaceStub::ColorMask(GLboolean /* red */, + GLboolean /* green */, + GLboolean /* blue */, + GLboolean /* alpha */) {} +void GLES2InterfaceStub::CompileShader(GLuint /* shader */) {} +void GLES2InterfaceStub::CompressedTexImage2D(GLenum /* target */, + GLint /* level */, + GLenum /* internalformat */, + GLsizei /* width */, + GLsizei /* height */, + GLint /* border */, + GLsizei /* imageSize */, + const void* /* data */) {} +void GLES2InterfaceStub::CompressedTexSubImage2D(GLenum /* target */, + GLint /* level */, + GLint /* xoffset */, + GLint /* yoffset */, + GLsizei /* width */, + GLsizei /* height */, + GLenum /* format */, + GLsizei /* imageSize */, + const void* /* data */) {} +void GLES2InterfaceStub::CopyTexImage2D(GLenum /* target */, + GLint /* level */, + GLenum /* internalformat */, + GLint /* x */, + GLint /* y */, + GLsizei /* width */, + GLsizei /* height */, + GLint /* border */) {} +void GLES2InterfaceStub::CopyTexSubImage2D(GLenum /* target */, + GLint /* level */, + GLint /* xoffset */, + GLint /* yoffset */, + GLint /* x */, + GLint /* y */, + GLsizei /* width */, + GLsizei /* height */) {} +GLuint GLES2InterfaceStub::CreateProgram() { return 0; } +GLuint GLES2InterfaceStub::CreateShader(GLenum /* type */) { return 0; } +void GLES2InterfaceStub::CullFace(GLenum /* mode */) {} +void GLES2InterfaceStub::DeleteBuffers(GLsizei /* n */, + const GLuint* /* buffers */) {} +void GLES2InterfaceStub::DeleteFramebuffers(GLsizei /* n */, + const GLuint* /* framebuffers */) {} +void GLES2InterfaceStub::DeleteProgram(GLuint /* program */) {} void GLES2InterfaceStub::DeleteRenderbuffers( - GLsizei /* n */, const GLuint* /* renderbuffers */) { -} -void GLES2InterfaceStub::DeleteShader(GLuint /* shader */) { -} -void GLES2InterfaceStub::DeleteTextures( - GLsizei /* n */, const GLuint* /* textures */) { -} -void GLES2InterfaceStub::DepthFunc(GLenum /* func */) { -} -void GLES2InterfaceStub::DepthMask(GLboolean /* flag */) { -} -void GLES2InterfaceStub::DepthRangef( - GLclampf /* zNear */, GLclampf /* zFar */) { -} -void GLES2InterfaceStub::DetachShader( - GLuint /* program */, GLuint /* shader */) { -} -void GLES2InterfaceStub::Disable(GLenum /* cap */) { -} -void GLES2InterfaceStub::DisableVertexAttribArray(GLuint /* index */) { -} -void GLES2InterfaceStub::DrawArrays( - GLenum /* mode */, GLint /* first */, GLsizei /* count */) { -} -void GLES2InterfaceStub::DrawElements( - GLenum /* mode */, GLsizei /* count */, GLenum /* type */, - const void* /* indices */) { -} -void GLES2InterfaceStub::Enable(GLenum /* cap */) { -} -void GLES2InterfaceStub::EnableVertexAttribArray(GLuint /* index */) { -} -void GLES2InterfaceStub::Finish() { -} -void GLES2InterfaceStub::Flush() { -} + GLsizei /* n */, + const GLuint* /* renderbuffers */) {} +void GLES2InterfaceStub::DeleteShader(GLuint /* shader */) {} +void GLES2InterfaceStub::DeleteTextures(GLsizei /* n */, + const GLuint* /* textures */) {} +void GLES2InterfaceStub::DepthFunc(GLenum /* func */) {} +void GLES2InterfaceStub::DepthMask(GLboolean /* flag */) {} +void GLES2InterfaceStub::DepthRangef(GLclampf /* zNear */, + GLclampf /* zFar */) {} +void GLES2InterfaceStub::DetachShader(GLuint /* program */, + GLuint /* shader */) {} +void GLES2InterfaceStub::Disable(GLenum /* cap */) {} +void GLES2InterfaceStub::DisableVertexAttribArray(GLuint /* index */) {} +void GLES2InterfaceStub::DrawArrays(GLenum /* mode */, + GLint /* first */, + GLsizei /* count */) {} +void GLES2InterfaceStub::DrawElements(GLenum /* mode */, + GLsizei /* count */, + GLenum /* type */, + const void* /* indices */) {} +void GLES2InterfaceStub::Enable(GLenum /* cap */) {} +void GLES2InterfaceStub::EnableVertexAttribArray(GLuint /* index */) {} +void GLES2InterfaceStub::Finish() {} +void GLES2InterfaceStub::Flush() {} void GLES2InterfaceStub::FramebufferRenderbuffer( - GLenum /* target */, GLenum /* attachment */, - GLenum /* renderbuffertarget */, GLuint /* renderbuffer */) { -} -void GLES2InterfaceStub::FramebufferTexture2D( - GLenum /* target */, GLenum /* attachment */, GLenum /* textarget */, - GLuint /* texture */, GLint /* level */) { -} -void GLES2InterfaceStub::FrontFace(GLenum /* mode */) { -} -void GLES2InterfaceStub::GenBuffers(GLsizei /* n */, GLuint* /* buffers */) { -} -void GLES2InterfaceStub::GenerateMipmap(GLenum /* target */) { -} -void GLES2InterfaceStub::GenFramebuffers( - GLsizei /* n */, GLuint* /* framebuffers */) { -} -void GLES2InterfaceStub::GenRenderbuffers( - GLsizei /* n */, GLuint* /* renderbuffers */) { -} -void GLES2InterfaceStub::GenTextures(GLsizei /* n */, GLuint* /* textures */) { -} -void GLES2InterfaceStub::GetActiveAttrib( - GLuint /* program */, GLuint /* index */, GLsizei /* bufsize */, - GLsizei* /* length */, GLint* /* size */, GLenum* /* type */, - char* /* name */) { -} -void GLES2InterfaceStub::GetActiveUniform( - GLuint /* program */, GLuint /* index */, GLsizei /* bufsize */, - GLsizei* /* length */, GLint* /* size */, GLenum* /* type */, - char* /* name */) { -} -void GLES2InterfaceStub::GetAttachedShaders( - GLuint /* program */, GLsizei /* maxcount */, GLsizei* /* count */, - GLuint* /* shaders */) { -} -GLint GLES2InterfaceStub::GetAttribLocation( - GLuint /* program */, const char* /* name */) { + GLenum /* target */, + GLenum /* attachment */, + GLenum /* renderbuffertarget */, + GLuint /* renderbuffer */) {} +void GLES2InterfaceStub::FramebufferTexture2D(GLenum /* target */, + GLenum /* attachment */, + GLenum /* textarget */, + GLuint /* texture */, + GLint /* level */) {} +void GLES2InterfaceStub::FrontFace(GLenum /* mode */) {} +void GLES2InterfaceStub::GenBuffers(GLsizei /* n */, GLuint* /* buffers */) {} +void GLES2InterfaceStub::GenerateMipmap(GLenum /* target */) {} +void GLES2InterfaceStub::GenFramebuffers(GLsizei /* n */, + GLuint* /* framebuffers */) {} +void GLES2InterfaceStub::GenRenderbuffers(GLsizei /* n */, + GLuint* /* renderbuffers */) {} +void GLES2InterfaceStub::GenTextures(GLsizei /* n */, GLuint* /* textures */) {} +void GLES2InterfaceStub::GetActiveAttrib(GLuint /* program */, + GLuint /* index */, + GLsizei /* bufsize */, + GLsizei* /* length */, + GLint* /* size */, + GLenum* /* type */, + char* /* name */) {} +void GLES2InterfaceStub::GetActiveUniform(GLuint /* program */, + GLuint /* index */, + GLsizei /* bufsize */, + GLsizei* /* length */, + GLint* /* size */, + GLenum* /* type */, + char* /* name */) {} +void GLES2InterfaceStub::GetAttachedShaders(GLuint /* program */, + GLsizei /* maxcount */, + GLsizei* /* count */, + GLuint* /* shaders */) {} +GLint GLES2InterfaceStub::GetAttribLocation(GLuint /* program */, + const char* /* name */) { return 0; } -void GLES2InterfaceStub::GetBooleanv( - GLenum /* pname */, GLboolean* /* params */) { -} -void GLES2InterfaceStub::GetBufferParameteriv( - GLenum /* target */, GLenum /* pname */, GLint* /* params */) { -} -GLenum GLES2InterfaceStub::GetError() { - return 0; -} -void GLES2InterfaceStub::GetFloatv(GLenum /* pname */, GLfloat* /* params */) { -} +void GLES2InterfaceStub::GetBooleanv(GLenum /* pname */, + GLboolean* /* params */) {} +void GLES2InterfaceStub::GetBufferParameteriv(GLenum /* target */, + GLenum /* pname */, + GLint* /* params */) {} +GLenum GLES2InterfaceStub::GetError() { return 0; } +void GLES2InterfaceStub::GetFloatv(GLenum /* pname */, GLfloat* /* params */) {} void GLES2InterfaceStub::GetFramebufferAttachmentParameteriv( - GLenum /* target */, GLenum /* attachment */, GLenum /* pname */, - GLint* /* params */) { -} -void GLES2InterfaceStub::GetIntegerv(GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetProgramiv( - GLuint /* program */, GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetProgramInfoLog( - GLuint /* program */, GLsizei /* bufsize */, GLsizei* /* length */, - char* /* infolog */) { -} -void GLES2InterfaceStub::GetRenderbufferParameteriv( - GLenum /* target */, GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetShaderiv( - GLuint /* shader */, GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetShaderInfoLog( - GLuint /* shader */, GLsizei /* bufsize */, GLsizei* /* length */, - char* /* infolog */) { -} -void GLES2InterfaceStub::GetShaderPrecisionFormat( - GLenum /* shadertype */, GLenum /* precisiontype */, GLint* /* range */, - GLint* /* precision */) { -} -void GLES2InterfaceStub::GetShaderSource( - GLuint /* shader */, GLsizei /* bufsize */, GLsizei* /* length */, - char* /* source */) { -} -const GLubyte* GLES2InterfaceStub::GetString(GLenum /* name */) { - return 0; -} -void GLES2InterfaceStub::GetTexParameterfv( - GLenum /* target */, GLenum /* pname */, GLfloat* /* params */) { -} -void GLES2InterfaceStub::GetTexParameteriv( - GLenum /* target */, GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetUniformfv( - GLuint /* program */, GLint /* location */, GLfloat* /* params */) { -} -void GLES2InterfaceStub::GetUniformiv( - GLuint /* program */, GLint /* location */, GLint* /* params */) { -} -GLint GLES2InterfaceStub::GetUniformLocation( - GLuint /* program */, const char* /* name */) { - return 0; -} -void GLES2InterfaceStub::GetVertexAttribfv( - GLuint /* index */, GLenum /* pname */, GLfloat* /* params */) { -} -void GLES2InterfaceStub::GetVertexAttribiv( - GLuint /* index */, GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetVertexAttribPointerv( - GLuint /* index */, GLenum /* pname */, void** /* pointer */) { -} -void GLES2InterfaceStub::Hint(GLenum /* target */, GLenum /* mode */) { -} -GLboolean GLES2InterfaceStub::IsBuffer(GLuint /* buffer */) { - return 0; -} -GLboolean GLES2InterfaceStub::IsEnabled(GLenum /* cap */) { + GLenum /* target */, + GLenum /* attachment */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetIntegerv(GLenum /* pname */, GLint* /* params */) {} +void GLES2InterfaceStub::GetProgramiv(GLuint /* program */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetProgramInfoLog(GLuint /* program */, + GLsizei /* bufsize */, + GLsizei* /* length */, + char* /* infolog */) {} +void GLES2InterfaceStub::GetRenderbufferParameteriv(GLenum /* target */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetShaderiv(GLuint /* shader */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetShaderInfoLog(GLuint /* shader */, + GLsizei /* bufsize */, + GLsizei* /* length */, + char* /* infolog */) {} +void GLES2InterfaceStub::GetShaderPrecisionFormat(GLenum /* shadertype */, + GLenum /* precisiontype */, + GLint* /* range */, + GLint* /* precision */) {} +void GLES2InterfaceStub::GetShaderSource(GLuint /* shader */, + GLsizei /* bufsize */, + GLsizei* /* length */, + char* /* source */) {} +const GLubyte* GLES2InterfaceStub::GetString(GLenum /* name */) { return 0; } +void GLES2InterfaceStub::GetTexParameterfv(GLenum /* target */, + GLenum /* pname */, + GLfloat* /* params */) {} +void GLES2InterfaceStub::GetTexParameteriv(GLenum /* target */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetUniformfv(GLuint /* program */, + GLint /* location */, + GLfloat* /* params */) {} +void GLES2InterfaceStub::GetUniformiv(GLuint /* program */, + GLint /* location */, + GLint* /* params */) {} +GLint GLES2InterfaceStub::GetUniformLocation(GLuint /* program */, + const char* /* name */) { return 0; } +void GLES2InterfaceStub::GetVertexAttribfv(GLuint /* index */, + GLenum /* pname */, + GLfloat* /* params */) {} +void GLES2InterfaceStub::GetVertexAttribiv(GLuint /* index */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetVertexAttribPointerv(GLuint /* index */, + GLenum /* pname */, + void** /* pointer */) {} +void GLES2InterfaceStub::Hint(GLenum /* target */, GLenum /* mode */) {} +GLboolean GLES2InterfaceStub::IsBuffer(GLuint /* buffer */) { return 0; } +GLboolean GLES2InterfaceStub::IsEnabled(GLenum /* cap */) { return 0; } GLboolean GLES2InterfaceStub::IsFramebuffer(GLuint /* framebuffer */) { return 0; } -GLboolean GLES2InterfaceStub::IsProgram(GLuint /* program */) { - return 0; -} +GLboolean GLES2InterfaceStub::IsProgram(GLuint /* program */) { return 0; } GLboolean GLES2InterfaceStub::IsRenderbuffer(GLuint /* renderbuffer */) { return 0; } -GLboolean GLES2InterfaceStub::IsShader(GLuint /* shader */) { - return 0; -} -GLboolean GLES2InterfaceStub::IsTexture(GLuint /* texture */) { - return 0; -} -void GLES2InterfaceStub::LineWidth(GLfloat /* width */) { -} -void GLES2InterfaceStub::LinkProgram(GLuint /* program */) { -} -void GLES2InterfaceStub::PixelStorei(GLenum /* pname */, GLint /* param */) { -} -void GLES2InterfaceStub::PolygonOffset( - GLfloat /* factor */, GLfloat /* units */) { -} -void GLES2InterfaceStub::ReadPixels( - GLint /* x */, GLint /* y */, GLsizei /* width */, GLsizei /* height */, - GLenum /* format */, GLenum /* type */, void* /* pixels */) { -} -void GLES2InterfaceStub::ReleaseShaderCompiler() { -} -void GLES2InterfaceStub::RenderbufferStorage( - GLenum /* target */, GLenum /* internalformat */, GLsizei /* width */, - GLsizei /* height */) { -} -void GLES2InterfaceStub::SampleCoverage( - GLclampf /* value */, GLboolean /* invert */) { -} -void GLES2InterfaceStub::Scissor( - GLint /* x */, GLint /* y */, GLsizei /* width */, GLsizei /* height */) { -} -void GLES2InterfaceStub::ShaderBinary( - GLsizei /* n */, const GLuint* /* shaders */, GLenum /* binaryformat */, - const void* /* binary */, GLsizei /* length */) { -} -void GLES2InterfaceStub::ShaderSource( - GLuint /* shader */, GLsizei /* count */, const GLchar* const* /* str */, - const GLint* /* length */) { -} -void GLES2InterfaceStub::ShallowFinishCHROMIUM() { -} -void GLES2InterfaceStub::ShallowFlushCHROMIUM() { -} -void GLES2InterfaceStub::StencilFunc( - GLenum /* func */, GLint /* ref */, GLuint /* mask */) { -} -void GLES2InterfaceStub::StencilFuncSeparate( - GLenum /* face */, GLenum /* func */, GLint /* ref */, GLuint /* mask */) { -} -void GLES2InterfaceStub::StencilMask(GLuint /* mask */) { -} -void GLES2InterfaceStub::StencilMaskSeparate( - GLenum /* face */, GLuint /* mask */) { -} -void GLES2InterfaceStub::StencilOp( - GLenum /* fail */, GLenum /* zfail */, GLenum /* zpass */) { -} -void GLES2InterfaceStub::StencilOpSeparate( - GLenum /* face */, GLenum /* fail */, GLenum /* zfail */, - GLenum /* zpass */) { -} -void GLES2InterfaceStub::TexImage2D( - GLenum /* target */, GLint /* level */, GLint /* internalformat */, - GLsizei /* width */, GLsizei /* height */, GLint /* border */, - GLenum /* format */, GLenum /* type */, const void* /* pixels */) { -} -void GLES2InterfaceStub::TexParameterf( - GLenum /* target */, GLenum /* pname */, GLfloat /* param */) { -} -void GLES2InterfaceStub::TexParameterfv( - GLenum /* target */, GLenum /* pname */, const GLfloat* /* params */) { -} -void GLES2InterfaceStub::TexParameteri( - GLenum /* target */, GLenum /* pname */, GLint /* param */) { -} -void GLES2InterfaceStub::TexParameteriv( - GLenum /* target */, GLenum /* pname */, const GLint* /* params */) { -} -void GLES2InterfaceStub::TexSubImage2D( - GLenum /* target */, GLint /* level */, GLint /* xoffset */, - GLint /* yoffset */, GLsizei /* width */, GLsizei /* height */, - GLenum /* format */, GLenum /* type */, const void* /* pixels */) { -} -void GLES2InterfaceStub::Uniform1f(GLint /* location */, GLfloat /* x */) { -} -void GLES2InterfaceStub::Uniform1fv( - GLint /* location */, GLsizei /* count */, const GLfloat* /* v */) { -} -void GLES2InterfaceStub::Uniform1i(GLint /* location */, GLint /* x */) { -} -void GLES2InterfaceStub::Uniform1iv( - GLint /* location */, GLsizei /* count */, const GLint* /* v */) { -} -void GLES2InterfaceStub::Uniform2f( - GLint /* location */, GLfloat /* x */, GLfloat /* y */) { -} -void GLES2InterfaceStub::Uniform2fv( - GLint /* location */, GLsizei /* count */, const GLfloat* /* v */) { -} -void GLES2InterfaceStub::Uniform2i( - GLint /* location */, GLint /* x */, GLint /* y */) { -} -void GLES2InterfaceStub::Uniform2iv( - GLint /* location */, GLsizei /* count */, const GLint* /* v */) { -} -void GLES2InterfaceStub::Uniform3f( - GLint /* location */, GLfloat /* x */, GLfloat /* y */, GLfloat /* z */) { -} -void GLES2InterfaceStub::Uniform3fv( - GLint /* location */, GLsizei /* count */, const GLfloat* /* v */) { -} -void GLES2InterfaceStub::Uniform3i( - GLint /* location */, GLint /* x */, GLint /* y */, GLint /* z */) { -} -void GLES2InterfaceStub::Uniform3iv( - GLint /* location */, GLsizei /* count */, const GLint* /* v */) { -} -void GLES2InterfaceStub::Uniform4f( - GLint /* location */, GLfloat /* x */, GLfloat /* y */, GLfloat /* z */, - GLfloat /* w */) { -} -void GLES2InterfaceStub::Uniform4fv( - GLint /* location */, GLsizei /* count */, const GLfloat* /* v */) { -} -void GLES2InterfaceStub::Uniform4i( - GLint /* location */, GLint /* x */, GLint /* y */, GLint /* z */, - GLint /* w */) { -} -void GLES2InterfaceStub::Uniform4iv( - GLint /* location */, GLsizei /* count */, const GLint* /* v */) { -} -void GLES2InterfaceStub::UniformMatrix2fv( - GLint /* location */, GLsizei /* count */, GLboolean /* transpose */, - const GLfloat* /* value */) { -} -void GLES2InterfaceStub::UniformMatrix3fv( - GLint /* location */, GLsizei /* count */, GLboolean /* transpose */, - const GLfloat* /* value */) { -} -void GLES2InterfaceStub::UniformMatrix4fv( - GLint /* location */, GLsizei /* count */, GLboolean /* transpose */, - const GLfloat* /* value */) { -} -void GLES2InterfaceStub::UseProgram(GLuint /* program */) { -} -void GLES2InterfaceStub::ValidateProgram(GLuint /* program */) { -} -void GLES2InterfaceStub::VertexAttrib1f(GLuint /* indx */, GLfloat /* x */) { -} -void GLES2InterfaceStub::VertexAttrib1fv( - GLuint /* indx */, const GLfloat* /* values */) { -} -void GLES2InterfaceStub::VertexAttrib2f( - GLuint /* indx */, GLfloat /* x */, GLfloat /* y */) { -} -void GLES2InterfaceStub::VertexAttrib2fv( - GLuint /* indx */, const GLfloat* /* values */) { -} -void GLES2InterfaceStub::VertexAttrib3f( - GLuint /* indx */, GLfloat /* x */, GLfloat /* y */, GLfloat /* z */) { -} -void GLES2InterfaceStub::VertexAttrib3fv( - GLuint /* indx */, const GLfloat* /* values */) { -} -void GLES2InterfaceStub::VertexAttrib4f( - GLuint /* indx */, GLfloat /* x */, GLfloat /* y */, GLfloat /* z */, - GLfloat /* w */) { -} -void GLES2InterfaceStub::VertexAttrib4fv( - GLuint /* indx */, const GLfloat* /* values */) { -} -void GLES2InterfaceStub::VertexAttribPointer( - GLuint /* indx */, GLint /* size */, GLenum /* type */, - GLboolean /* normalized */, GLsizei /* stride */, const void* /* ptr */) { -} -void GLES2InterfaceStub::Viewport( - GLint /* x */, GLint /* y */, GLsizei /* width */, GLsizei /* height */) { -} -void GLES2InterfaceStub::BlitFramebufferCHROMIUM( - GLint /* srcX0 */, GLint /* srcY0 */, GLint /* srcX1 */, GLint /* srcY1 */, - GLint /* dstX0 */, GLint /* dstY0 */, GLint /* dstX1 */, GLint /* dstY1 */, - GLbitfield /* mask */, GLenum /* filter */) { -} +GLboolean GLES2InterfaceStub::IsShader(GLuint /* shader */) { return 0; } +GLboolean GLES2InterfaceStub::IsTexture(GLuint /* texture */) { return 0; } +void GLES2InterfaceStub::LineWidth(GLfloat /* width */) {} +void GLES2InterfaceStub::LinkProgram(GLuint /* program */) {} +void GLES2InterfaceStub::PixelStorei(GLenum /* pname */, GLint /* param */) {} +void GLES2InterfaceStub::PolygonOffset(GLfloat /* factor */, + GLfloat /* units */) {} +void GLES2InterfaceStub::ReadPixels(GLint /* x */, + GLint /* y */, + GLsizei /* width */, + GLsizei /* height */, + GLenum /* format */, + GLenum /* type */, + void* /* pixels */) {} +void GLES2InterfaceStub::ReleaseShaderCompiler() {} +void GLES2InterfaceStub::RenderbufferStorage(GLenum /* target */, + GLenum /* internalformat */, + GLsizei /* width */, + GLsizei /* height */) {} +void GLES2InterfaceStub::SampleCoverage(GLclampf /* value */, + GLboolean /* invert */) {} +void GLES2InterfaceStub::Scissor(GLint /* x */, + GLint /* y */, + GLsizei /* width */, + GLsizei /* height */) {} +void GLES2InterfaceStub::ShaderBinary(GLsizei /* n */, + const GLuint* /* shaders */, + GLenum /* binaryformat */, + const void* /* binary */, + GLsizei /* length */) {} +void GLES2InterfaceStub::ShaderSource(GLuint /* shader */, + GLsizei /* count */, + const GLchar* const* /* str */, + const GLint* /* length */) {} +void GLES2InterfaceStub::ShallowFinishCHROMIUM() {} +void GLES2InterfaceStub::ShallowFlushCHROMIUM() {} +void GLES2InterfaceStub::StencilFunc(GLenum /* func */, + GLint /* ref */, + GLuint /* mask */) {} +void GLES2InterfaceStub::StencilFuncSeparate(GLenum /* face */, + GLenum /* func */, + GLint /* ref */, + GLuint /* mask */) {} +void GLES2InterfaceStub::StencilMask(GLuint /* mask */) {} +void GLES2InterfaceStub::StencilMaskSeparate(GLenum /* face */, + GLuint /* mask */) {} +void GLES2InterfaceStub::StencilOp(GLenum /* fail */, + GLenum /* zfail */, + GLenum /* zpass */) {} +void GLES2InterfaceStub::StencilOpSeparate(GLenum /* face */, + GLenum /* fail */, + GLenum /* zfail */, + GLenum /* zpass */) {} +void GLES2InterfaceStub::TexImage2D(GLenum /* target */, + GLint /* level */, + GLint /* internalformat */, + GLsizei /* width */, + GLsizei /* height */, + GLint /* border */, + GLenum /* format */, + GLenum /* type */, + const void* /* pixels */) {} +void GLES2InterfaceStub::TexParameterf(GLenum /* target */, + GLenum /* pname */, + GLfloat /* param */) {} +void GLES2InterfaceStub::TexParameterfv(GLenum /* target */, + GLenum /* pname */, + const GLfloat* /* params */) {} +void GLES2InterfaceStub::TexParameteri(GLenum /* target */, + GLenum /* pname */, + GLint /* param */) {} +void GLES2InterfaceStub::TexParameteriv(GLenum /* target */, + GLenum /* pname */, + const GLint* /* params */) {} +void GLES2InterfaceStub::TexSubImage2D(GLenum /* target */, + GLint /* level */, + GLint /* xoffset */, + GLint /* yoffset */, + GLsizei /* width */, + GLsizei /* height */, + GLenum /* format */, + GLenum /* type */, + const void* /* pixels */) {} +void GLES2InterfaceStub::Uniform1f(GLint /* location */, GLfloat /* x */) {} +void GLES2InterfaceStub::Uniform1fv(GLint /* location */, + GLsizei /* count */, + const GLfloat* /* v */) {} +void GLES2InterfaceStub::Uniform1i(GLint /* location */, GLint /* x */) {} +void GLES2InterfaceStub::Uniform1iv(GLint /* location */, + GLsizei /* count */, + const GLint* /* v */) {} +void GLES2InterfaceStub::Uniform2f(GLint /* location */, + GLfloat /* x */, + GLfloat /* y */) {} +void GLES2InterfaceStub::Uniform2fv(GLint /* location */, + GLsizei /* count */, + const GLfloat* /* v */) {} +void GLES2InterfaceStub::Uniform2i(GLint /* location */, + GLint /* x */, + GLint /* y */) {} +void GLES2InterfaceStub::Uniform2iv(GLint /* location */, + GLsizei /* count */, + const GLint* /* v */) {} +void GLES2InterfaceStub::Uniform3f(GLint /* location */, + GLfloat /* x */, + GLfloat /* y */, + GLfloat /* z */) {} +void GLES2InterfaceStub::Uniform3fv(GLint /* location */, + GLsizei /* count */, + const GLfloat* /* v */) {} +void GLES2InterfaceStub::Uniform3i(GLint /* location */, + GLint /* x */, + GLint /* y */, + GLint /* z */) {} +void GLES2InterfaceStub::Uniform3iv(GLint /* location */, + GLsizei /* count */, + const GLint* /* v */) {} +void GLES2InterfaceStub::Uniform4f(GLint /* location */, + GLfloat /* x */, + GLfloat /* y */, + GLfloat /* z */, + GLfloat /* w */) {} +void GLES2InterfaceStub::Uniform4fv(GLint /* location */, + GLsizei /* count */, + const GLfloat* /* v */) {} +void GLES2InterfaceStub::Uniform4i(GLint /* location */, + GLint /* x */, + GLint /* y */, + GLint /* z */, + GLint /* w */) {} +void GLES2InterfaceStub::Uniform4iv(GLint /* location */, + GLsizei /* count */, + const GLint* /* v */) {} +void GLES2InterfaceStub::UniformMatrix2fv(GLint /* location */, + GLsizei /* count */, + GLboolean /* transpose */, + const GLfloat* /* value */) {} +void GLES2InterfaceStub::UniformMatrix3fv(GLint /* location */, + GLsizei /* count */, + GLboolean /* transpose */, + const GLfloat* /* value */) {} +void GLES2InterfaceStub::UniformMatrix4fv(GLint /* location */, + GLsizei /* count */, + GLboolean /* transpose */, + const GLfloat* /* value */) {} +void GLES2InterfaceStub::UseProgram(GLuint /* program */) {} +void GLES2InterfaceStub::ValidateProgram(GLuint /* program */) {} +void GLES2InterfaceStub::VertexAttrib1f(GLuint /* indx */, GLfloat /* x */) {} +void GLES2InterfaceStub::VertexAttrib1fv(GLuint /* indx */, + const GLfloat* /* values */) {} +void GLES2InterfaceStub::VertexAttrib2f(GLuint /* indx */, + GLfloat /* x */, + GLfloat /* y */) {} +void GLES2InterfaceStub::VertexAttrib2fv(GLuint /* indx */, + const GLfloat* /* values */) {} +void GLES2InterfaceStub::VertexAttrib3f(GLuint /* indx */, + GLfloat /* x */, + GLfloat /* y */, + GLfloat /* z */) {} +void GLES2InterfaceStub::VertexAttrib3fv(GLuint /* indx */, + const GLfloat* /* values */) {} +void GLES2InterfaceStub::VertexAttrib4f(GLuint /* indx */, + GLfloat /* x */, + GLfloat /* y */, + GLfloat /* z */, + GLfloat /* w */) {} +void GLES2InterfaceStub::VertexAttrib4fv(GLuint /* indx */, + const GLfloat* /* values */) {} +void GLES2InterfaceStub::VertexAttribPointer(GLuint /* indx */, + GLint /* size */, + GLenum /* type */, + GLboolean /* normalized */, + GLsizei /* stride */, + const void* /* ptr */) {} +void GLES2InterfaceStub::Viewport(GLint /* x */, + GLint /* y */, + GLsizei /* width */, + GLsizei /* height */) {} +void GLES2InterfaceStub::BlitFramebufferCHROMIUM(GLint /* srcX0 */, + GLint /* srcY0 */, + GLint /* srcX1 */, + GLint /* srcY1 */, + GLint /* dstX0 */, + GLint /* dstY0 */, + GLint /* dstX1 */, + GLint /* dstY1 */, + GLbitfield /* mask */, + GLenum /* filter */) {} void GLES2InterfaceStub::RenderbufferStorageMultisampleCHROMIUM( - GLenum /* target */, GLsizei /* samples */, GLenum /* internalformat */, - GLsizei /* width */, GLsizei /* height */) { -} + GLenum /* target */, + GLsizei /* samples */, + GLenum /* internalformat */, + GLsizei /* width */, + GLsizei /* height */) {} void GLES2InterfaceStub::RenderbufferStorageMultisampleEXT( - GLenum /* target */, GLsizei /* samples */, GLenum /* internalformat */, - GLsizei /* width */, GLsizei /* height */) { -} + GLenum /* target */, + GLsizei /* samples */, + GLenum /* internalformat */, + GLsizei /* width */, + GLsizei /* height */) {} void GLES2InterfaceStub::FramebufferTexture2DMultisampleEXT( - GLenum /* target */, GLenum /* attachment */, GLenum /* textarget */, - GLuint /* texture */, GLint /* level */, GLsizei /* samples */) { -} -void GLES2InterfaceStub::TexStorage2DEXT( - GLenum /* target */, GLsizei /* levels */, GLenum /* internalFormat */, - GLsizei /* width */, GLsizei /* height */) { -} -void GLES2InterfaceStub::GenQueriesEXT( - GLsizei /* n */, GLuint* /* queries */) { -} -void GLES2InterfaceStub::DeleteQueriesEXT( - GLsizei /* n */, const GLuint* /* queries */) { -} -GLboolean GLES2InterfaceStub::IsQueryEXT(GLuint /* id */) { - return 0; -} -void GLES2InterfaceStub::BeginQueryEXT(GLenum /* target */, GLuint /* id */) { -} -void GLES2InterfaceStub::EndQueryEXT(GLenum /* target */) { -} -void GLES2InterfaceStub::GetQueryivEXT( - GLenum /* target */, GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetQueryObjectuivEXT( - GLuint /* id */, GLenum /* pname */, GLuint* /* params */) { -} -void GLES2InterfaceStub::InsertEventMarkerEXT( - GLsizei /* length */, const GLchar* /* marker */) { -} -void GLES2InterfaceStub::PushGroupMarkerEXT( - GLsizei /* length */, const GLchar* /* marker */) { -} -void GLES2InterfaceStub::PopGroupMarkerEXT() { -} -void GLES2InterfaceStub::GenVertexArraysOES( - GLsizei /* n */, GLuint* /* arrays */) { -} -void GLES2InterfaceStub::DeleteVertexArraysOES( - GLsizei /* n */, const GLuint* /* arrays */) { -} -GLboolean GLES2InterfaceStub::IsVertexArrayOES(GLuint /* array */) { - return 0; -} -void GLES2InterfaceStub::BindVertexArrayOES(GLuint /* array */) { -} -void GLES2InterfaceStub::SwapBuffers() { -} -GLuint GLES2InterfaceStub::GetMaxValueInBufferCHROMIUM( - GLuint /* buffer_id */, GLsizei /* count */, GLenum /* type */, - GLuint /* offset */) { + GLenum /* target */, + GLenum /* attachment */, + GLenum /* textarget */, + GLuint /* texture */, + GLint /* level */, + GLsizei /* samples */) {} +void GLES2InterfaceStub::TexStorage2DEXT(GLenum /* target */, + GLsizei /* levels */, + GLenum /* internalFormat */, + GLsizei /* width */, + GLsizei /* height */) {} +void GLES2InterfaceStub::GenQueriesEXT(GLsizei /* n */, GLuint* /* queries */) { +} +void GLES2InterfaceStub::DeleteQueriesEXT(GLsizei /* n */, + const GLuint* /* queries */) {} +GLboolean GLES2InterfaceStub::IsQueryEXT(GLuint /* id */) { return 0; } +void GLES2InterfaceStub::BeginQueryEXT(GLenum /* target */, GLuint /* id */) {} +void GLES2InterfaceStub::EndQueryEXT(GLenum /* target */) {} +void GLES2InterfaceStub::GetQueryivEXT(GLenum /* target */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetQueryObjectuivEXT(GLuint /* id */, + GLenum /* pname */, + GLuint* /* params */) {} +void GLES2InterfaceStub::InsertEventMarkerEXT(GLsizei /* length */, + const GLchar* /* marker */) {} +void GLES2InterfaceStub::PushGroupMarkerEXT(GLsizei /* length */, + const GLchar* /* marker */) {} +void GLES2InterfaceStub::PopGroupMarkerEXT() {} +void GLES2InterfaceStub::GenVertexArraysOES(GLsizei /* n */, + GLuint* /* arrays */) {} +void GLES2InterfaceStub::DeleteVertexArraysOES(GLsizei /* n */, + const GLuint* /* arrays */) {} +GLboolean GLES2InterfaceStub::IsVertexArrayOES(GLuint /* array */) { return 0; } +void GLES2InterfaceStub::BindVertexArrayOES(GLuint /* array */) {} +void GLES2InterfaceStub::SwapBuffers() {} +GLuint GLES2InterfaceStub::GetMaxValueInBufferCHROMIUM(GLuint /* buffer_id */, + GLsizei /* count */, + GLenum /* type */, + GLuint /* offset */) { return 0; } -void GLES2InterfaceStub::GenSharedIdsCHROMIUM( - GLuint /* namespace_id */, GLuint /* id_offset */, GLsizei /* n */, - GLuint* /* ids */) { -} -void GLES2InterfaceStub::DeleteSharedIdsCHROMIUM( - GLuint /* namespace_id */, GLsizei /* n */, const GLuint* /* ids */) { -} -void GLES2InterfaceStub::RegisterSharedIdsCHROMIUM( - GLuint /* namespace_id */, GLsizei /* n */, const GLuint* /* ids */) { -} -GLboolean GLES2InterfaceStub::EnableFeatureCHROMIUM( - const char* /* feature */) { +void GLES2InterfaceStub::GenSharedIdsCHROMIUM(GLuint /* namespace_id */, + GLuint /* id_offset */, + GLsizei /* n */, + GLuint* /* ids */) {} +void GLES2InterfaceStub::DeleteSharedIdsCHROMIUM(GLuint /* namespace_id */, + GLsizei /* n */, + const GLuint* /* ids */) {} +void GLES2InterfaceStub::RegisterSharedIdsCHROMIUM(GLuint /* namespace_id */, + GLsizei /* n */, + const GLuint* /* ids */) {} +GLboolean GLES2InterfaceStub::EnableFeatureCHROMIUM(const char* /* feature */) { return 0; } -void* GLES2InterfaceStub::MapBufferCHROMIUM( - GLuint /* target */, GLenum /* access */) { +void* GLES2InterfaceStub::MapBufferCHROMIUM(GLuint /* target */, + GLenum /* access */) { return 0; } GLboolean GLES2InterfaceStub::UnmapBufferCHROMIUM(GLuint /* target */) { return 0; } -void* GLES2InterfaceStub::MapImageCHROMIUM( - GLuint /* image_id */, GLenum /* access */) { +void* GLES2InterfaceStub::MapImageCHROMIUM(GLuint /* image_id */, + GLenum /* access */) { return 0; } -void GLES2InterfaceStub::UnmapImageCHROMIUM(GLuint /* image_id */) { -} -void* GLES2InterfaceStub::MapBufferSubDataCHROMIUM( - GLuint /* target */, GLintptr /* offset */, GLsizeiptr /* size */, - GLenum /* access */) { +void GLES2InterfaceStub::UnmapImageCHROMIUM(GLuint /* image_id */) {} +void* GLES2InterfaceStub::MapBufferSubDataCHROMIUM(GLuint /* target */, + GLintptr /* offset */, + GLsizeiptr /* size */, + GLenum /* access */) { return 0; } -void GLES2InterfaceStub::UnmapBufferSubDataCHROMIUM(const void* /* mem */) { -} -void* GLES2InterfaceStub::MapTexSubImage2DCHROMIUM( - GLenum /* target */, GLint /* level */, GLint /* xoffset */, - GLint /* yoffset */, GLsizei /* width */, GLsizei /* height */, - GLenum /* format */, GLenum /* type */, GLenum /* access */) { +void GLES2InterfaceStub::UnmapBufferSubDataCHROMIUM(const void* /* mem */) {} +void* GLES2InterfaceStub::MapTexSubImage2DCHROMIUM(GLenum /* target */, + GLint /* level */, + GLint /* xoffset */, + GLint /* yoffset */, + GLsizei /* width */, + GLsizei /* height */, + GLenum /* format */, + GLenum /* type */, + GLenum /* access */) { return 0; } -void GLES2InterfaceStub::UnmapTexSubImage2DCHROMIUM(const void* /* mem */) { -} -void GLES2InterfaceStub::ResizeCHROMIUM( - GLuint /* width */, GLuint /* height */, GLfloat /* scale_factor */) { -} +void GLES2InterfaceStub::UnmapTexSubImage2DCHROMIUM(const void* /* mem */) {} +void GLES2InterfaceStub::ResizeCHROMIUM(GLuint /* width */, + GLuint /* height */, + GLfloat /* scale_factor */) {} const GLchar* GLES2InterfaceStub::GetRequestableExtensionsCHROMIUM() { return 0; } -void GLES2InterfaceStub::RequestExtensionCHROMIUM( - const char* /* extension */) { -} -void GLES2InterfaceStub::RateLimitOffscreenContextCHROMIUM() { -} -void GLES2InterfaceStub::GetMultipleIntegervCHROMIUM( - const GLenum* /* pnames */, GLuint /* count */, GLint* /* results */, - GLsizeiptr /* size */) { -} -void GLES2InterfaceStub::GetProgramInfoCHROMIUM( - GLuint /* program */, GLsizei /* bufsize */, GLsizei* /* size */, - void* /* info */) { -} +void GLES2InterfaceStub::RequestExtensionCHROMIUM(const char* /* extension */) { +} +void GLES2InterfaceStub::RateLimitOffscreenContextCHROMIUM() {} +void GLES2InterfaceStub::GetMultipleIntegervCHROMIUM(const GLenum* /* pnames */, + GLuint /* count */, + GLint* /* results */, + GLsizeiptr /* size */) {} +void GLES2InterfaceStub::GetProgramInfoCHROMIUM(GLuint /* program */, + GLsizei /* bufsize */, + GLsizei* /* size */, + void* /* info */) {} GLuint GLES2InterfaceStub::CreateStreamTextureCHROMIUM(GLuint /* texture */) { return 0; } -GLuint GLES2InterfaceStub::CreateImageCHROMIUM( - GLsizei /* width */, GLsizei /* height */, GLenum /* internalformat */) { +GLuint GLES2InterfaceStub::CreateImageCHROMIUM(GLsizei /* width */, + GLsizei /* height */, + GLenum /* internalformat */) { return 0; } -void GLES2InterfaceStub::DestroyImageCHROMIUM(GLuint /* image_id */) { -} -void GLES2InterfaceStub::GetImageParameterivCHROMIUM( - GLuint /* image_id */, GLenum /* pname */, GLint* /* params */) { -} -void GLES2InterfaceStub::GetTranslatedShaderSourceANGLE( - GLuint /* shader */, GLsizei /* bufsize */, GLsizei* /* length */, - char* /* source */) { -} -void GLES2InterfaceStub::PostSubBufferCHROMIUM( - GLint /* x */, GLint /* y */, GLint /* width */, GLint /* height */) { -} -void GLES2InterfaceStub::TexImageIOSurface2DCHROMIUM( - GLenum /* target */, GLsizei /* width */, GLsizei /* height */, - GLuint /* ioSurfaceId */, GLuint /* plane */) { -} -void GLES2InterfaceStub::CopyTextureCHROMIUM( - GLenum /* target */, GLenum /* source_id */, GLenum /* dest_id */, - GLint /* level */, GLint /* internalformat */, GLenum /* dest_type */) { -} -void GLES2InterfaceStub::DrawArraysInstancedANGLE( - GLenum /* mode */, GLint /* first */, GLsizei /* count */, - GLsizei /* primcount */) { -} -void GLES2InterfaceStub::DrawElementsInstancedANGLE( - GLenum /* mode */, GLsizei /* count */, GLenum /* type */, - const void* /* indices */, GLsizei /* primcount */) { -} -void GLES2InterfaceStub::VertexAttribDivisorANGLE( - GLuint /* index */, GLuint /* divisor */) { -} -void GLES2InterfaceStub::GenMailboxCHROMIUM(GLbyte* /* mailbox */) { -} -void GLES2InterfaceStub::ProduceTextureCHROMIUM( - GLenum /* target */, const GLbyte* /* mailbox */) { -} -void GLES2InterfaceStub::ConsumeTextureCHROMIUM( - GLenum /* target */, const GLbyte* /* mailbox */) { -} -void GLES2InterfaceStub::BindUniformLocationCHROMIUM( - GLuint /* program */, GLint /* location */, const char* /* name */) { -} -void GLES2InterfaceStub::BindTexImage2DCHROMIUM( - GLenum /* target */, GLint /* imageId */) { -} -void GLES2InterfaceStub::ReleaseTexImage2DCHROMIUM( - GLenum /* target */, GLint /* imageId */) { -} -void GLES2InterfaceStub::TraceBeginCHROMIUM(const char* /* name */) { -} -void GLES2InterfaceStub::TraceEndCHROMIUM() { -} -void GLES2InterfaceStub::AsyncTexSubImage2DCHROMIUM( - GLenum /* target */, GLint /* level */, GLint /* xoffset */, - GLint /* yoffset */, GLsizei /* width */, GLsizei /* height */, - GLenum /* format */, GLenum /* type */, const void* /* data */) { -} -void GLES2InterfaceStub::AsyncTexImage2DCHROMIUM( - GLenum /* target */, GLint /* level */, GLint /* internalformat */, - GLsizei /* width */, GLsizei /* height */, GLint /* border */, - GLenum /* format */, GLenum /* type */, const void* /* pixels */) { -} -void GLES2InterfaceStub::WaitAsyncTexImage2DCHROMIUM(GLenum /* target */) { -} +void GLES2InterfaceStub::DestroyImageCHROMIUM(GLuint /* image_id */) {} +void GLES2InterfaceStub::GetImageParameterivCHROMIUM(GLuint /* image_id */, + GLenum /* pname */, + GLint* /* params */) {} +void GLES2InterfaceStub::GetTranslatedShaderSourceANGLE(GLuint /* shader */, + GLsizei /* bufsize */, + GLsizei* /* length */, + char* /* source */) {} +void GLES2InterfaceStub::PostSubBufferCHROMIUM(GLint /* x */, + GLint /* y */, + GLint /* width */, + GLint /* height */) {} +void GLES2InterfaceStub::TexImageIOSurface2DCHROMIUM(GLenum /* target */, + GLsizei /* width */, + GLsizei /* height */, + GLuint /* ioSurfaceId */, + GLuint /* plane */) {} +void GLES2InterfaceStub::CopyTextureCHROMIUM(GLenum /* target */, + GLenum /* source_id */, + GLenum /* dest_id */, + GLint /* level */, + GLint /* internalformat */, + GLenum /* dest_type */) {} +void GLES2InterfaceStub::DrawArraysInstancedANGLE(GLenum /* mode */, + GLint /* first */, + GLsizei /* count */, + GLsizei /* primcount */) {} +void GLES2InterfaceStub::DrawElementsInstancedANGLE(GLenum /* mode */, + GLsizei /* count */, + GLenum /* type */, + const void* /* indices */, + GLsizei /* primcount */) {} +void GLES2InterfaceStub::VertexAttribDivisorANGLE(GLuint /* index */, + GLuint /* divisor */) {} +void GLES2InterfaceStub::GenMailboxCHROMIUM(GLbyte* /* mailbox */) {} +void GLES2InterfaceStub::ProduceTextureCHROMIUM(GLenum /* target */, + const GLbyte* /* mailbox */) {} +void GLES2InterfaceStub::ConsumeTextureCHROMIUM(GLenum /* target */, + const GLbyte* /* mailbox */) {} +void GLES2InterfaceStub::BindUniformLocationCHROMIUM(GLuint /* program */, + GLint /* location */, + const char* /* name */) {} +void GLES2InterfaceStub::BindTexImage2DCHROMIUM(GLenum /* target */, + GLint /* imageId */) {} +void GLES2InterfaceStub::ReleaseTexImage2DCHROMIUM(GLenum /* target */, + GLint /* imageId */) {} +void GLES2InterfaceStub::TraceBeginCHROMIUM(const char* /* name */) {} +void GLES2InterfaceStub::TraceEndCHROMIUM() {} +void GLES2InterfaceStub::AsyncTexSubImage2DCHROMIUM(GLenum /* target */, + GLint /* level */, + GLint /* xoffset */, + GLint /* yoffset */, + GLsizei /* width */, + GLsizei /* height */, + GLenum /* format */, + GLenum /* type */, + const void* /* data */) {} +void GLES2InterfaceStub::AsyncTexImage2DCHROMIUM(GLenum /* target */, + GLint /* level */, + GLint /* internalformat */, + GLsizei /* width */, + GLsizei /* height */, + GLint /* border */, + GLenum /* format */, + GLenum /* type */, + const void* /* pixels */) {} +void GLES2InterfaceStub::WaitAsyncTexImage2DCHROMIUM(GLenum /* target */) {} void GLES2InterfaceStub::DiscardFramebufferEXT( - GLenum /* target */, GLsizei /* count */, - const GLenum* /* attachments */) { -} -void GLES2InterfaceStub::LoseContextCHROMIUM( - GLenum /* current */, GLenum /* other */) { -} -GLuint GLES2InterfaceStub::InsertSyncPointCHROMIUM() { - return 0; -} -void GLES2InterfaceStub::WaitSyncPointCHROMIUM(GLuint /* sync_point */) { -} -void GLES2InterfaceStub::DrawBuffersEXT( - GLsizei /* count */, const GLenum* /* bufs */) { -} -void GLES2InterfaceStub::DiscardBackbufferCHROMIUM() { -} + GLenum /* target */, + GLsizei /* count */, + const GLenum* /* attachments */) {} +void GLES2InterfaceStub::LoseContextCHROMIUM(GLenum /* current */, + GLenum /* other */) {} +GLuint GLES2InterfaceStub::InsertSyncPointCHROMIUM() { return 0; } +void GLES2InterfaceStub::WaitSyncPointCHROMIUM(GLuint /* sync_point */) {} +void GLES2InterfaceStub::DrawBuffersEXT(GLsizei /* count */, + const GLenum* /* bufs */) {} +void GLES2InterfaceStub::DiscardBackbufferCHROMIUM() {} #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_INTERFACE_STUB_IMPL_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h index bd2d9a2..c1ae19e 100644 --- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_trace_implementation.h @@ -12,56 +14,86 @@ virtual void ActiveTexture(GLenum texture) OVERRIDE; virtual void AttachShader(GLuint program, GLuint shader) OVERRIDE; -virtual void BindAttribLocation( - GLuint program, GLuint index, const char* name) OVERRIDE; +virtual void BindAttribLocation(GLuint program, + GLuint index, + const char* name) OVERRIDE; virtual void BindBuffer(GLenum target, GLuint buffer) OVERRIDE; virtual void BindFramebuffer(GLenum target, GLuint framebuffer) OVERRIDE; virtual void BindRenderbuffer(GLenum target, GLuint renderbuffer) OVERRIDE; virtual void BindTexture(GLenum target, GLuint texture) OVERRIDE; -virtual void BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) OVERRIDE; +virtual void BlendColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) OVERRIDE; virtual void BlendEquation(GLenum mode) OVERRIDE; virtual void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) OVERRIDE; virtual void BlendFunc(GLenum sfactor, GLenum dfactor) OVERRIDE; -virtual void BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) OVERRIDE; -virtual void BufferData( - GLenum target, GLsizeiptr size, const void* data, GLenum usage) OVERRIDE; -virtual void BufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, - const void* data) OVERRIDE; +virtual void BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) OVERRIDE; +virtual void BufferData(GLenum target, + GLsizeiptr size, + const void* data, + GLenum usage) OVERRIDE; +virtual void BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data) OVERRIDE; virtual GLenum CheckFramebufferStatus(GLenum target) OVERRIDE; virtual void Clear(GLbitfield mask) OVERRIDE; -virtual void ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) OVERRIDE; +virtual void ClearColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) OVERRIDE; virtual void ClearDepthf(GLclampf depth) OVERRIDE; virtual void ClearStencil(GLint s) OVERRIDE; -virtual void ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) OVERRIDE; +virtual void ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) OVERRIDE; virtual void CompileShader(GLuint shader) OVERRIDE; -virtual void CompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const void* data) OVERRIDE; -virtual void CompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, - const void* data) OVERRIDE; -virtual void CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) OVERRIDE; -virtual void CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) OVERRIDE; +virtual void CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data) OVERRIDE; +virtual void CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data) OVERRIDE; +virtual void CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) OVERRIDE; +virtual void CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) OVERRIDE; virtual GLuint CreateProgram() OVERRIDE; virtual GLuint CreateShader(GLenum type) OVERRIDE; virtual void CullFace(GLenum mode) OVERRIDE; virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) OVERRIDE; -virtual void DeleteFramebuffers( - GLsizei n, const GLuint* framebuffers) OVERRIDE; +virtual void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) OVERRIDE; virtual void DeleteProgram(GLuint program) OVERRIDE; -virtual void DeleteRenderbuffers( - GLsizei n, const GLuint* renderbuffers) OVERRIDE; +virtual void DeleteRenderbuffers(GLsizei n, + const GLuint* renderbuffers) OVERRIDE; virtual void DeleteShader(GLuint shader) OVERRIDE; virtual void DeleteTextures(GLsizei n, const GLuint* textures) OVERRIDE; virtual void DepthFunc(GLenum func) OVERRIDE; @@ -71,72 +103,103 @@ virtual void DetachShader(GLuint program, GLuint shader) OVERRIDE; virtual void Disable(GLenum cap) OVERRIDE; virtual void DisableVertexAttribArray(GLuint index) OVERRIDE; virtual void DrawArrays(GLenum mode, GLint first, GLsizei count) OVERRIDE; -virtual void DrawElements( - GLenum mode, GLsizei count, GLenum type, const void* indices) OVERRIDE; +virtual void DrawElements(GLenum mode, + GLsizei count, + GLenum type, + const void* indices) OVERRIDE; virtual void Enable(GLenum cap) OVERRIDE; virtual void EnableVertexAttribArray(GLuint index) OVERRIDE; virtual void Finish() OVERRIDE; virtual void Flush() OVERRIDE; -virtual void FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) OVERRIDE; -virtual void FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) OVERRIDE; +virtual void FramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) OVERRIDE; +virtual void FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) OVERRIDE; virtual void FrontFace(GLenum mode) OVERRIDE; virtual void GenBuffers(GLsizei n, GLuint* buffers) OVERRIDE; virtual void GenerateMipmap(GLenum target) OVERRIDE; virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) OVERRIDE; virtual void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) OVERRIDE; virtual void GenTextures(GLsizei n, GLuint* textures) OVERRIDE; -virtual void GetActiveAttrib( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) OVERRIDE; -virtual void GetActiveUniform( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) OVERRIDE; -virtual void GetAttachedShaders( - GLuint program, GLsizei maxcount, GLsizei* count, - GLuint* shaders) OVERRIDE; +virtual void GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) OVERRIDE; +virtual void GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) OVERRIDE; +virtual void GetAttachedShaders(GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders) OVERRIDE; virtual GLint GetAttribLocation(GLuint program, const char* name) OVERRIDE; virtual void GetBooleanv(GLenum pname, GLboolean* params) OVERRIDE; -virtual void GetBufferParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetBufferParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; virtual GLenum GetError() OVERRIDE; virtual void GetFloatv(GLenum pname, GLfloat* params) OVERRIDE; -virtual void GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) OVERRIDE; +virtual void GetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) OVERRIDE; virtual void GetIntegerv(GLenum pname, GLint* params) OVERRIDE; -virtual void GetProgramiv( - GLuint program, GLenum pname, GLint* params) OVERRIDE; -virtual void GetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) OVERRIDE; -virtual void GetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetProgramiv(GLuint program, GLenum pname, GLint* params) OVERRIDE; +virtual void GetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) OVERRIDE; +virtual void GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) OVERRIDE; -virtual void GetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) OVERRIDE; -virtual void GetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, GLint* range, - GLint* precision) OVERRIDE; -virtual void GetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) OVERRIDE; +virtual void GetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) OVERRIDE; +virtual void GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision) OVERRIDE; +virtual void GetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) OVERRIDE; virtual const GLubyte* GetString(GLenum name) OVERRIDE; -virtual void GetTexParameterfv( - GLenum target, GLenum pname, GLfloat* params) OVERRIDE; -virtual void GetTexParameteriv( - GLenum target, GLenum pname, GLint* params) OVERRIDE; -virtual void GetUniformfv( - GLuint program, GLint location, GLfloat* params) OVERRIDE; -virtual void GetUniformiv( - GLuint program, GLint location, GLint* params) OVERRIDE; +virtual void GetTexParameterfv(GLenum target, + GLenum pname, + GLfloat* params) OVERRIDE; +virtual void GetTexParameteriv(GLenum target, + GLenum pname, + GLint* params) OVERRIDE; +virtual void GetUniformfv(GLuint program, + GLint location, + GLfloat* params) OVERRIDE; +virtual void GetUniformiv(GLuint program, + GLint location, + GLint* params) OVERRIDE; virtual GLint GetUniformLocation(GLuint program, const char* name) OVERRIDE; -virtual void GetVertexAttribfv( - GLuint index, GLenum pname, GLfloat* params) OVERRIDE; -virtual void GetVertexAttribiv( - GLuint index, GLenum pname, GLint* params) OVERRIDE; -virtual void GetVertexAttribPointerv( - GLuint index, GLenum pname, void** pointer) OVERRIDE; +virtual void GetVertexAttribfv(GLuint index, + GLenum pname, + GLfloat* params) OVERRIDE; +virtual void GetVertexAttribiv(GLuint index, + GLenum pname, + GLint* params) OVERRIDE; +virtual void GetVertexAttribPointerv(GLuint index, + GLenum pname, + void** pointer) OVERRIDE; virtual void Hint(GLenum target, GLenum mode) OVERRIDE; virtual GLboolean IsBuffer(GLuint buffer) OVERRIDE; virtual GLboolean IsEnabled(GLenum cap) OVERRIDE; @@ -149,125 +212,175 @@ virtual void LineWidth(GLfloat width) OVERRIDE; virtual void LinkProgram(GLuint program) OVERRIDE; virtual void PixelStorei(GLenum pname, GLint param) OVERRIDE; virtual void PolygonOffset(GLfloat factor, GLfloat units) OVERRIDE; -virtual void ReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - void* pixels) OVERRIDE; +virtual void ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels) OVERRIDE; virtual void ReleaseShaderCompiler() OVERRIDE; -virtual void RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; +virtual void RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; virtual void SampleCoverage(GLclampf value, GLboolean invert) OVERRIDE; virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; -virtual void ShaderBinary( - GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, - GLsizei length) OVERRIDE; -virtual void ShaderSource( - GLuint shader, GLsizei count, const GLchar* const* str, - const GLint* length) OVERRIDE; +virtual void ShaderBinary(GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length) OVERRIDE; +virtual void ShaderSource(GLuint shader, + GLsizei count, + const GLchar* const* str, + const GLint* length) OVERRIDE; virtual void ShallowFinishCHROMIUM() OVERRIDE; virtual void ShallowFlushCHROMIUM() OVERRIDE; virtual void StencilFunc(GLenum func, GLint ref, GLuint mask) OVERRIDE; -virtual void StencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) OVERRIDE; +virtual void StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask) OVERRIDE; virtual void StencilMask(GLuint mask) OVERRIDE; virtual void StencilMaskSeparate(GLenum face, GLuint mask) OVERRIDE; virtual void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) OVERRIDE; -virtual void StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) OVERRIDE; -virtual void TexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) OVERRIDE; -virtual void TexParameterf( - GLenum target, GLenum pname, GLfloat param) OVERRIDE; -virtual void TexParameterfv( - GLenum target, GLenum pname, const GLfloat* params) OVERRIDE; +virtual void StencilOpSeparate(GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass) OVERRIDE; +virtual void TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; +virtual void TexParameterf(GLenum target, GLenum pname, GLfloat param) OVERRIDE; +virtual void TexParameterfv(GLenum target, + GLenum pname, + const GLfloat* params) OVERRIDE; virtual void TexParameteri(GLenum target, GLenum pname, GLint param) OVERRIDE; -virtual void TexParameteriv( - GLenum target, GLenum pname, const GLint* params) OVERRIDE; -virtual void TexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) OVERRIDE; +virtual void TexParameteriv(GLenum target, + GLenum pname, + const GLint* params) OVERRIDE; +virtual void TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; virtual void Uniform1f(GLint location, GLfloat x) OVERRIDE; -virtual void Uniform1fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform1fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform1i(GLint location, GLint x) OVERRIDE; -virtual void Uniform1iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform1iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; virtual void Uniform2f(GLint location, GLfloat x, GLfloat y) OVERRIDE; -virtual void Uniform2fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform2fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform2i(GLint location, GLint x, GLint y) OVERRIDE; -virtual void Uniform2iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void Uniform3f( - GLint location, GLfloat x, GLfloat y, GLfloat z) OVERRIDE; -virtual void Uniform3fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; +virtual void Uniform2iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) + OVERRIDE; +virtual void Uniform3fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; virtual void Uniform3i(GLint location, GLint x, GLint y, GLint z) OVERRIDE; -virtual void Uniform3iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void Uniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) OVERRIDE; -virtual void Uniform4fv( - GLint location, GLsizei count, const GLfloat* v) OVERRIDE; -virtual void Uniform4i( - GLint location, GLint x, GLint y, GLint z, GLint w) OVERRIDE; -virtual void Uniform4iv( - GLint location, GLsizei count, const GLint* v) OVERRIDE; -virtual void UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; -virtual void UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; -virtual void UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value) OVERRIDE; +virtual void Uniform3iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void Uniform4f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) OVERRIDE; +virtual void Uniform4fv(GLint location, + GLsizei count, + const GLfloat* v) OVERRIDE; +virtual void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) + OVERRIDE; +virtual void Uniform4iv(GLint location, GLsizei count, const GLint* v) OVERRIDE; +virtual void UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; +virtual void UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; +virtual void UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) OVERRIDE; virtual void UseProgram(GLuint program) OVERRIDE; virtual void ValidateProgram(GLuint program) OVERRIDE; virtual void VertexAttrib1f(GLuint indx, GLfloat x) OVERRIDE; virtual void VertexAttrib1fv(GLuint indx, const GLfloat* values) OVERRIDE; virtual void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) OVERRIDE; virtual void VertexAttrib2fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttrib3f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z) OVERRIDE; +virtual void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) + OVERRIDE; virtual void VertexAttrib3fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) OVERRIDE; +virtual void VertexAttrib4f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) OVERRIDE; virtual void VertexAttrib4fv(GLuint indx, const GLfloat* values) OVERRIDE; -virtual void VertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, - const void* ptr) OVERRIDE; -virtual void Viewport( - GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; -virtual void BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, - GLenum filter) OVERRIDE; -virtual void RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; -virtual void RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) OVERRIDE; -virtual void FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) OVERRIDE; -virtual void TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) OVERRIDE; +virtual void VertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr) OVERRIDE; +virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) OVERRIDE; +virtual void BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) OVERRIDE; +virtual void RenderbufferStorageMultisampleCHROMIUM(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; +virtual void RenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) OVERRIDE; +virtual void FramebufferTexture2DMultisampleEXT(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) OVERRIDE; +virtual void TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) OVERRIDE; virtual void GenQueriesEXT(GLsizei n, GLuint* queries) OVERRIDE; virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) OVERRIDE; virtual GLboolean IsQueryEXT(GLuint id) OVERRIDE; virtual void BeginQueryEXT(GLenum target, GLuint id) OVERRIDE; virtual void EndQueryEXT(GLenum target) OVERRIDE; -virtual void GetQueryivEXT( - GLenum target, GLenum pname, GLint* params) OVERRIDE; -virtual void GetQueryObjectuivEXT( - GLuint id, GLenum pname, GLuint* params) OVERRIDE; -virtual void InsertEventMarkerEXT( - GLsizei length, const GLchar* marker) OVERRIDE; +virtual void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) OVERRIDE; +virtual void GetQueryObjectuivEXT(GLuint id, + GLenum pname, + GLuint* params) OVERRIDE; +virtual void InsertEventMarkerEXT(GLsizei length, + const GLchar* marker) OVERRIDE; virtual void PushGroupMarkerEXT(GLsizei length, const GLchar* marker) OVERRIDE; virtual void PopGroupMarkerEXT() OVERRIDE; virtual void GenVertexArraysOES(GLsizei n, GLuint* arrays) OVERRIDE; @@ -275,83 +388,126 @@ virtual void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) OVERRIDE; virtual GLboolean IsVertexArrayOES(GLuint array) OVERRIDE; virtual void BindVertexArrayOES(GLuint array) OVERRIDE; virtual void SwapBuffers() OVERRIDE; -virtual GLuint GetMaxValueInBufferCHROMIUM( - GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) OVERRIDE; -virtual void GenSharedIdsCHROMIUM( - GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) OVERRIDE; -virtual void DeleteSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) OVERRIDE; -virtual void RegisterSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) OVERRIDE; +virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id, + GLsizei count, + GLenum type, + GLuint offset) OVERRIDE; +virtual void GenSharedIdsCHROMIUM(GLuint namespace_id, + GLuint id_offset, + GLsizei n, + GLuint* ids) OVERRIDE; +virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) OVERRIDE; +virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) OVERRIDE; virtual GLboolean EnableFeatureCHROMIUM(const char* feature) OVERRIDE; virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) OVERRIDE; virtual GLboolean UnmapBufferCHROMIUM(GLuint target) OVERRIDE; virtual void* MapImageCHROMIUM(GLuint image_id, GLenum access) OVERRIDE; virtual void UnmapImageCHROMIUM(GLuint image_id) OVERRIDE; -virtual void* MapBufferSubDataCHROMIUM( - GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) OVERRIDE; +virtual void* MapBufferSubDataCHROMIUM(GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access) OVERRIDE; virtual void UnmapBufferSubDataCHROMIUM(const void* mem) OVERRIDE; -virtual void* MapTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLenum access) OVERRIDE; +virtual void* MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) OVERRIDE; virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) OVERRIDE; -virtual void ResizeCHROMIUM( - GLuint width, GLuint height, GLfloat scale_factor) OVERRIDE; +virtual void ResizeCHROMIUM(GLuint width, + GLuint height, + GLfloat scale_factor) OVERRIDE; virtual const GLchar* GetRequestableExtensionsCHROMIUM() OVERRIDE; virtual void RequestExtensionCHROMIUM(const char* extension) OVERRIDE; virtual void RateLimitOffscreenContextCHROMIUM() OVERRIDE; -virtual void GetMultipleIntegervCHROMIUM( - const GLenum* pnames, GLuint count, GLint* results, - GLsizeiptr size) OVERRIDE; -virtual void GetProgramInfoCHROMIUM( - GLuint program, GLsizei bufsize, GLsizei* size, void* info) OVERRIDE; +virtual void GetMultipleIntegervCHROMIUM(const GLenum* pnames, + GLuint count, + GLint* results, + GLsizeiptr size) OVERRIDE; +virtual void GetProgramInfoCHROMIUM(GLuint program, + GLsizei bufsize, + GLsizei* size, + void* info) OVERRIDE; virtual GLuint CreateStreamTextureCHROMIUM(GLuint texture) OVERRIDE; -virtual GLuint CreateImageCHROMIUM( - GLsizei width, GLsizei height, GLenum internalformat) OVERRIDE; +virtual GLuint CreateImageCHROMIUM(GLsizei width, + GLsizei height, + GLenum internalformat) OVERRIDE; virtual void DestroyImageCHROMIUM(GLuint image_id) OVERRIDE; -virtual void GetImageParameterivCHROMIUM( - GLuint image_id, GLenum pname, GLint* params) OVERRIDE; -virtual void GetTranslatedShaderSourceANGLE( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) OVERRIDE; -virtual void PostSubBufferCHROMIUM( - GLint x, GLint y, GLint width, GLint height) OVERRIDE; -virtual void TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) OVERRIDE; -virtual void CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) OVERRIDE; -virtual void DrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) OVERRIDE; -virtual void DrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, const void* indices, - GLsizei primcount) OVERRIDE; +virtual void GetImageParameterivCHROMIUM(GLuint image_id, + GLenum pname, + GLint* params) OVERRIDE; +virtual void GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) OVERRIDE; +virtual void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) + OVERRIDE; +virtual void TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) OVERRIDE; +virtual void CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) OVERRIDE; +virtual void DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) OVERRIDE; +virtual void DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount) OVERRIDE; virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) OVERRIDE; virtual void GenMailboxCHROMIUM(GLbyte* mailbox) OVERRIDE; -virtual void ProduceTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) OVERRIDE; -virtual void ConsumeTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) OVERRIDE; -virtual void BindUniformLocationCHROMIUM( - GLuint program, GLint location, const char* name) OVERRIDE; +virtual void ProduceTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) OVERRIDE; +virtual void ConsumeTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) OVERRIDE; +virtual void BindUniformLocationCHROMIUM(GLuint program, + GLint location, + const char* name) OVERRIDE; virtual void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) OVERRIDE; virtual void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) OVERRIDE; virtual void TraceBeginCHROMIUM(const char* name) OVERRIDE; virtual void TraceEndCHROMIUM() OVERRIDE; -virtual void AsyncTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* data) OVERRIDE; -virtual void AsyncTexImage2DCHROMIUM( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) OVERRIDE; +virtual void AsyncTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* data) OVERRIDE; +virtual void AsyncTexImage2DCHROMIUM(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) OVERRIDE; virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) OVERRIDE; -virtual void DiscardFramebufferEXT( - GLenum target, GLsizei count, const GLenum* attachments) OVERRIDE; +virtual void DiscardFramebufferEXT(GLenum target, + GLsizei count, + const GLenum* attachments) OVERRIDE; virtual void LoseContextCHROMIUM(GLenum current, GLenum other) OVERRIDE; virtual GLuint InsertSyncPointCHROMIUM() OVERRIDE; virtual void WaitSyncPointCHROMIUM(GLuint sync_point) OVERRIDE; virtual void DrawBuffersEXT(GLsizei count, const GLenum* bufs) OVERRIDE; virtual void DiscardBackbufferCHROMIUM() OVERRIDE; #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_TRACE_IMPLEMENTATION_AUTOGEN_H_ - diff --git a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h index c8a052b..7127b8c 100644 --- a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h +++ b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file is included by gles2_trace_implementation.cc @@ -20,8 +22,9 @@ void GLES2TraceImplementation::AttachShader(GLuint program, GLuint shader) { gl_->AttachShader(program, shader); } -void GLES2TraceImplementation::BindAttribLocation( - GLuint program, GLuint index, const char* name) { +void GLES2TraceImplementation::BindAttribLocation(GLuint program, + GLuint index, + const char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BindAttribLocation"); gl_->BindAttribLocation(program, index, name); } @@ -31,14 +34,14 @@ void GLES2TraceImplementation::BindBuffer(GLenum target, GLuint buffer) { gl_->BindBuffer(target, buffer); } -void GLES2TraceImplementation::BindFramebuffer( - GLenum target, GLuint framebuffer) { +void GLES2TraceImplementation::BindFramebuffer(GLenum target, + GLuint framebuffer) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BindFramebuffer"); gl_->BindFramebuffer(target, framebuffer); } -void GLES2TraceImplementation::BindRenderbuffer( - GLenum target, GLuint renderbuffer) { +void GLES2TraceImplementation::BindRenderbuffer(GLenum target, + GLuint renderbuffer) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BindRenderbuffer"); gl_->BindRenderbuffer(target, renderbuffer); } @@ -48,8 +51,10 @@ void GLES2TraceImplementation::BindTexture(GLenum target, GLuint texture) { gl_->BindTexture(target, texture); } -void GLES2TraceImplementation::BlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLES2TraceImplementation::BlendColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BlendColor"); gl_->BlendColor(red, green, blue, alpha); } @@ -59,8 +64,8 @@ void GLES2TraceImplementation::BlendEquation(GLenum mode) { gl_->BlendEquation(mode); } -void GLES2TraceImplementation::BlendEquationSeparate( - GLenum modeRGB, GLenum modeAlpha) { +void GLES2TraceImplementation::BlendEquationSeparate(GLenum modeRGB, + GLenum modeAlpha) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BlendEquationSeparate"); gl_->BlendEquationSeparate(modeRGB, modeAlpha); } @@ -70,20 +75,26 @@ void GLES2TraceImplementation::BlendFunc(GLenum sfactor, GLenum dfactor) { gl_->BlendFunc(sfactor, dfactor); } -void GLES2TraceImplementation::BlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { +void GLES2TraceImplementation::BlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BlendFuncSeparate"); gl_->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); } -void GLES2TraceImplementation::BufferData( - GLenum target, GLsizeiptr size, const void* data, GLenum usage) { +void GLES2TraceImplementation::BufferData(GLenum target, + GLsizeiptr size, + const void* data, + GLenum usage) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BufferData"); gl_->BufferData(target, size, data, usage); } -void GLES2TraceImplementation::BufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { +void GLES2TraceImplementation::BufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BufferSubData"); gl_->BufferSubData(target, offset, size, data); } @@ -98,8 +109,10 @@ void GLES2TraceImplementation::Clear(GLbitfield mask) { gl_->Clear(mask); } -void GLES2TraceImplementation::ClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLES2TraceImplementation::ClearColor(GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ClearColor"); gl_->ClearColor(red, green, blue, alpha); } @@ -114,8 +127,10 @@ void GLES2TraceImplementation::ClearStencil(GLint s) { gl_->ClearStencil(s); } -void GLES2TraceImplementation::ColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { +void GLES2TraceImplementation::ColorMask(GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ColorMask"); gl_->ColorMask(red, green, blue, alpha); } @@ -125,33 +140,54 @@ void GLES2TraceImplementation::CompileShader(GLuint shader) { gl_->CompileShader(shader); } -void GLES2TraceImplementation::CompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, const void* data) { +void GLES2TraceImplementation::CompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::CompressedTexImage2D"); gl_->CompressedTexImage2D( target, level, internalformat, width, height, border, imageSize, data); } -void GLES2TraceImplementation::CompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, const void* data) { +void GLES2TraceImplementation::CompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::CompressedTexSubImage2D"); gl_->CompressedTexSubImage2D( target, level, xoffset, yoffset, width, height, format, imageSize, data); } -void GLES2TraceImplementation::CopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) { +void GLES2TraceImplementation::CopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::CopyTexImage2D"); gl_->CopyTexImage2D( target, level, internalformat, x, y, width, height, border); } -void GLES2TraceImplementation::CopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) { +void GLES2TraceImplementation::CopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::CopyTexSubImage2D"); gl_->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } @@ -171,14 +207,13 @@ void GLES2TraceImplementation::CullFace(GLenum mode) { gl_->CullFace(mode); } -void GLES2TraceImplementation::DeleteBuffers( - GLsizei n, const GLuint* buffers) { +void GLES2TraceImplementation::DeleteBuffers(GLsizei n, const GLuint* buffers) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteBuffers"); gl_->DeleteBuffers(n, buffers); } -void GLES2TraceImplementation::DeleteFramebuffers( - GLsizei n, const GLuint* framebuffers) { +void GLES2TraceImplementation::DeleteFramebuffers(GLsizei n, + const GLuint* framebuffers) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteFramebuffers"); gl_->DeleteFramebuffers(n, framebuffers); } @@ -189,7 +224,8 @@ void GLES2TraceImplementation::DeleteProgram(GLuint program) { } void GLES2TraceImplementation::DeleteRenderbuffers( - GLsizei n, const GLuint* renderbuffers) { + GLsizei n, + const GLuint* renderbuffers) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteRenderbuffers"); gl_->DeleteRenderbuffers(n, renderbuffers); } @@ -199,8 +235,8 @@ void GLES2TraceImplementation::DeleteShader(GLuint shader) { gl_->DeleteShader(shader); } -void GLES2TraceImplementation::DeleteTextures( - GLsizei n, const GLuint* textures) { +void GLES2TraceImplementation::DeleteTextures(GLsizei n, + const GLuint* textures) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteTextures"); gl_->DeleteTextures(n, textures); } @@ -235,14 +271,17 @@ void GLES2TraceImplementation::DisableVertexAttribArray(GLuint index) { gl_->DisableVertexAttribArray(index); } -void GLES2TraceImplementation::DrawArrays( - GLenum mode, GLint first, GLsizei count) { +void GLES2TraceImplementation::DrawArrays(GLenum mode, + GLint first, + GLsizei count) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DrawArrays"); gl_->DrawArrays(mode, first, count); } -void GLES2TraceImplementation::DrawElements( - GLenum mode, GLsizei count, GLenum type, const void* indices) { +void GLES2TraceImplementation::DrawElements(GLenum mode, + GLsizei count, + GLenum type, + const void* indices) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DrawElements"); gl_->DrawElements(mode, count, type, indices); } @@ -268,16 +307,20 @@ void GLES2TraceImplementation::Flush() { } void GLES2TraceImplementation::FramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::FramebufferRenderbuffer"); gl_->FramebufferRenderbuffer( target, attachment, renderbuffertarget, renderbuffer); } -void GLES2TraceImplementation::FramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) { +void GLES2TraceImplementation::FramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::FramebufferTexture2D"); gl_->FramebufferTexture2D(target, attachment, textarget, texture, level); } @@ -297,14 +340,14 @@ void GLES2TraceImplementation::GenerateMipmap(GLenum target) { gl_->GenerateMipmap(target); } -void GLES2TraceImplementation::GenFramebuffers( - GLsizei n, GLuint* framebuffers) { +void GLES2TraceImplementation::GenFramebuffers(GLsizei n, + GLuint* framebuffers) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GenFramebuffers"); gl_->GenFramebuffers(n, framebuffers); } -void GLES2TraceImplementation::GenRenderbuffers( - GLsizei n, GLuint* renderbuffers) { +void GLES2TraceImplementation::GenRenderbuffers(GLsizei n, + GLuint* renderbuffers) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GenRenderbuffers"); gl_->GenRenderbuffers(n, renderbuffers); } @@ -314,28 +357,38 @@ void GLES2TraceImplementation::GenTextures(GLsizei n, GLuint* textures) { gl_->GenTextures(n, textures); } -void GLES2TraceImplementation::GetActiveAttrib( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) { +void GLES2TraceImplementation::GetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetActiveAttrib"); gl_->GetActiveAttrib(program, index, bufsize, length, size, type, name); } -void GLES2TraceImplementation::GetActiveUniform( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) { +void GLES2TraceImplementation::GetActiveUniform(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetActiveUniform"); gl_->GetActiveUniform(program, index, bufsize, length, size, type, name); } -void GLES2TraceImplementation::GetAttachedShaders( - GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { +void GLES2TraceImplementation::GetAttachedShaders(GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetAttachedShaders"); gl_->GetAttachedShaders(program, maxcount, count, shaders); } -GLint GLES2TraceImplementation::GetAttribLocation( - GLuint program, const char* name) { +GLint GLES2TraceImplementation::GetAttribLocation(GLuint program, + const char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetAttribLocation"); return gl_->GetAttribLocation(program, name); } @@ -345,8 +398,9 @@ void GLES2TraceImplementation::GetBooleanv(GLenum pname, GLboolean* params) { gl_->GetBooleanv(pname, params); } -void GLES2TraceImplementation::GetBufferParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GLES2TraceImplementation::GetBufferParameteriv(GLenum target, + GLenum pname, + GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetBufferParameteriv"); gl_->GetBufferParameteriv(target, pname, params); } @@ -362,8 +416,12 @@ void GLES2TraceImplementation::GetFloatv(GLenum pname, GLfloat* params) { } void GLES2TraceImplementation::GetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetFramebufferAttachmentParameteriv"); // NOLINT + GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::GetFramebufferAttachmentParameteriv"); // NOLINT gl_->GetFramebufferAttachmentParameteriv(target, attachment, pname, params); } @@ -372,44 +430,56 @@ void GLES2TraceImplementation::GetIntegerv(GLenum pname, GLint* params) { gl_->GetIntegerv(pname, params); } -void GLES2TraceImplementation::GetProgramiv( - GLuint program, GLenum pname, GLint* params) { +void GLES2TraceImplementation::GetProgramiv(GLuint program, + GLenum pname, + GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetProgramiv"); gl_->GetProgramiv(program, pname, params); } -void GLES2TraceImplementation::GetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { +void GLES2TraceImplementation::GetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetProgramInfoLog"); gl_->GetProgramInfoLog(program, bufsize, length, infolog); } -void GLES2TraceImplementation::GetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetRenderbufferParameteriv"); // NOLINT +void GLES2TraceImplementation::GetRenderbufferParameteriv(GLenum target, + GLenum pname, + GLint* params) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::GetRenderbufferParameteriv"); // NOLINT gl_->GetRenderbufferParameteriv(target, pname, params); } -void GLES2TraceImplementation::GetShaderiv( - GLuint shader, GLenum pname, GLint* params) { +void GLES2TraceImplementation::GetShaderiv(GLuint shader, + GLenum pname, + GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetShaderiv"); gl_->GetShaderiv(shader, pname, params); } -void GLES2TraceImplementation::GetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { +void GLES2TraceImplementation::GetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetShaderInfoLog"); gl_->GetShaderInfoLog(shader, bufsize, length, infolog); } -void GLES2TraceImplementation::GetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { +void GLES2TraceImplementation::GetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetShaderPrecisionFormat"); gl_->GetShaderPrecisionFormat(shadertype, precisiontype, range, precision); } -void GLES2TraceImplementation::GetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { +void GLES2TraceImplementation::GetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetShaderSource"); gl_->GetShaderSource(shader, bufsize, length, source); } @@ -419,50 +489,57 @@ const GLubyte* GLES2TraceImplementation::GetString(GLenum name) { return gl_->GetString(name); } -void GLES2TraceImplementation::GetTexParameterfv( - GLenum target, GLenum pname, GLfloat* params) { +void GLES2TraceImplementation::GetTexParameterfv(GLenum target, + GLenum pname, + GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetTexParameterfv"); gl_->GetTexParameterfv(target, pname, params); } -void GLES2TraceImplementation::GetTexParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GLES2TraceImplementation::GetTexParameteriv(GLenum target, + GLenum pname, + GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetTexParameteriv"); gl_->GetTexParameteriv(target, pname, params); } -void GLES2TraceImplementation::GetUniformfv( - GLuint program, GLint location, GLfloat* params) { +void GLES2TraceImplementation::GetUniformfv(GLuint program, + GLint location, + GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetUniformfv"); gl_->GetUniformfv(program, location, params); } -void GLES2TraceImplementation::GetUniformiv( - GLuint program, GLint location, GLint* params) { +void GLES2TraceImplementation::GetUniformiv(GLuint program, + GLint location, + GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetUniformiv"); gl_->GetUniformiv(program, location, params); } -GLint GLES2TraceImplementation::GetUniformLocation( - GLuint program, const char* name) { +GLint GLES2TraceImplementation::GetUniformLocation(GLuint program, + const char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetUniformLocation"); return gl_->GetUniformLocation(program, name); } -void GLES2TraceImplementation::GetVertexAttribfv( - GLuint index, GLenum pname, GLfloat* params) { +void GLES2TraceImplementation::GetVertexAttribfv(GLuint index, + GLenum pname, + GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetVertexAttribfv"); gl_->GetVertexAttribfv(index, pname, params); } -void GLES2TraceImplementation::GetVertexAttribiv( - GLuint index, GLenum pname, GLint* params) { +void GLES2TraceImplementation::GetVertexAttribiv(GLuint index, + GLenum pname, + GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetVertexAttribiv"); gl_->GetVertexAttribiv(index, pname, params); } -void GLES2TraceImplementation::GetVertexAttribPointerv( - GLuint index, GLenum pname, void** pointer) { +void GLES2TraceImplementation::GetVertexAttribPointerv(GLuint index, + GLenum pname, + void** pointer) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetVertexAttribPointerv"); gl_->GetVertexAttribPointerv(index, pname, pointer); } @@ -527,9 +604,13 @@ void GLES2TraceImplementation::PolygonOffset(GLfloat factor, GLfloat units) { gl_->PolygonOffset(factor, units); } -void GLES2TraceImplementation::ReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - void* pixels) { +void GLES2TraceImplementation::ReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ReadPixels"); gl_->ReadPixels(x, y, width, height, format, type, pixels); } @@ -539,34 +620,41 @@ void GLES2TraceImplementation::ReleaseShaderCompiler() { gl_->ReleaseShaderCompiler(); } -void GLES2TraceImplementation::RenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { +void GLES2TraceImplementation::RenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::RenderbufferStorage"); gl_->RenderbufferStorage(target, internalformat, width, height); } -void GLES2TraceImplementation::SampleCoverage( - GLclampf value, GLboolean invert) { +void GLES2TraceImplementation::SampleCoverage(GLclampf value, + GLboolean invert) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::SampleCoverage"); gl_->SampleCoverage(value, invert); } -void GLES2TraceImplementation::Scissor( - GLint x, GLint y, GLsizei width, GLsizei height) { +void GLES2TraceImplementation::Scissor(GLint x, + GLint y, + GLsizei width, + GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Scissor"); gl_->Scissor(x, y, width, height); } -void GLES2TraceImplementation::ShaderBinary( - GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, - GLsizei length) { +void GLES2TraceImplementation::ShaderBinary(GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ShaderBinary"); gl_->ShaderBinary(n, shaders, binaryformat, binary, length); } -void GLES2TraceImplementation::ShaderSource( - GLuint shader, GLsizei count, const GLchar* const* str, - const GLint* length) { +void GLES2TraceImplementation::ShaderSource(GLuint shader, + GLsizei count, + const GLchar* const* str, + const GLint* length) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ShaderSource"); gl_->ShaderSource(shader, count, str, length); } @@ -581,14 +669,17 @@ void GLES2TraceImplementation::ShallowFlushCHROMIUM() { gl_->ShallowFlushCHROMIUM(); } -void GLES2TraceImplementation::StencilFunc( - GLenum func, GLint ref, GLuint mask) { +void GLES2TraceImplementation::StencilFunc(GLenum func, + GLint ref, + GLuint mask) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::StencilFunc"); gl_->StencilFunc(func, ref, mask); } -void GLES2TraceImplementation::StencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) { +void GLES2TraceImplementation::StencilFuncSeparate(GLenum face, + GLenum func, + GLint ref, + GLuint mask) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::StencilFuncSeparate"); gl_->StencilFuncSeparate(face, func, ref, mask); } @@ -603,55 +694,79 @@ void GLES2TraceImplementation::StencilMaskSeparate(GLenum face, GLuint mask) { gl_->StencilMaskSeparate(face, mask); } -void GLES2TraceImplementation::StencilOp( - GLenum fail, GLenum zfail, GLenum zpass) { +void GLES2TraceImplementation::StencilOp(GLenum fail, + GLenum zfail, + GLenum zpass) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::StencilOp"); gl_->StencilOp(fail, zfail, zpass); } -void GLES2TraceImplementation::StencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { +void GLES2TraceImplementation::StencilOpSeparate(GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::StencilOpSeparate"); gl_->StencilOpSeparate(face, fail, zfail, zpass); } -void GLES2TraceImplementation::TexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) { +void GLES2TraceImplementation::TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexImage2D"); - gl_->TexImage2D( - target, level, internalformat, width, height, border, format, type, - pixels); -} - -void GLES2TraceImplementation::TexParameterf( - GLenum target, GLenum pname, GLfloat param) { + gl_->TexImage2D(target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); +} + +void GLES2TraceImplementation::TexParameterf(GLenum target, + GLenum pname, + GLfloat param) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexParameterf"); gl_->TexParameterf(target, pname, param); } -void GLES2TraceImplementation::TexParameterfv( - GLenum target, GLenum pname, const GLfloat* params) { +void GLES2TraceImplementation::TexParameterfv(GLenum target, + GLenum pname, + const GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexParameterfv"); gl_->TexParameterfv(target, pname, params); } -void GLES2TraceImplementation::TexParameteri( - GLenum target, GLenum pname, GLint param) { +void GLES2TraceImplementation::TexParameteri(GLenum target, + GLenum pname, + GLint param) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexParameteri"); gl_->TexParameteri(target, pname, param); } -void GLES2TraceImplementation::TexParameteriv( - GLenum target, GLenum pname, const GLint* params) { +void GLES2TraceImplementation::TexParameteriv(GLenum target, + GLenum pname, + const GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexParameteriv"); gl_->TexParameteriv(target, pname, params); } -void GLES2TraceImplementation::TexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) { +void GLES2TraceImplementation::TexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexSubImage2D"); gl_->TexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels); @@ -662,8 +777,9 @@ void GLES2TraceImplementation::Uniform1f(GLint location, GLfloat x) { gl_->Uniform1f(location, x); } -void GLES2TraceImplementation::Uniform1fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2TraceImplementation::Uniform1fv(GLint location, + GLsizei count, + const GLfloat* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform1fv"); gl_->Uniform1fv(location, count, v); } @@ -673,20 +789,21 @@ void GLES2TraceImplementation::Uniform1i(GLint location, GLint x) { gl_->Uniform1i(location, x); } -void GLES2TraceImplementation::Uniform1iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2TraceImplementation::Uniform1iv(GLint location, + GLsizei count, + const GLint* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform1iv"); gl_->Uniform1iv(location, count, v); } -void GLES2TraceImplementation::Uniform2f( - GLint location, GLfloat x, GLfloat y) { +void GLES2TraceImplementation::Uniform2f(GLint location, GLfloat x, GLfloat y) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform2f"); gl_->Uniform2f(location, x, y); } -void GLES2TraceImplementation::Uniform2fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2TraceImplementation::Uniform2fv(GLint location, + GLsizei count, + const GLfloat* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform2fv"); gl_->Uniform2fv(location, count, v); } @@ -696,74 +813,95 @@ void GLES2TraceImplementation::Uniform2i(GLint location, GLint x, GLint y) { gl_->Uniform2i(location, x, y); } -void GLES2TraceImplementation::Uniform2iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2TraceImplementation::Uniform2iv(GLint location, + GLsizei count, + const GLint* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform2iv"); gl_->Uniform2iv(location, count, v); } -void GLES2TraceImplementation::Uniform3f( - GLint location, GLfloat x, GLfloat y, GLfloat z) { +void GLES2TraceImplementation::Uniform3f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform3f"); gl_->Uniform3f(location, x, y, z); } -void GLES2TraceImplementation::Uniform3fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2TraceImplementation::Uniform3fv(GLint location, + GLsizei count, + const GLfloat* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform3fv"); gl_->Uniform3fv(location, count, v); } -void GLES2TraceImplementation::Uniform3i( - GLint location, GLint x, GLint y, GLint z) { +void GLES2TraceImplementation::Uniform3i(GLint location, + GLint x, + GLint y, + GLint z) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform3i"); gl_->Uniform3i(location, x, y, z); } -void GLES2TraceImplementation::Uniform3iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2TraceImplementation::Uniform3iv(GLint location, + GLsizei count, + const GLint* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform3iv"); gl_->Uniform3iv(location, count, v); } -void GLES2TraceImplementation::Uniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GLES2TraceImplementation::Uniform4f(GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform4f"); gl_->Uniform4f(location, x, y, z, w); } -void GLES2TraceImplementation::Uniform4fv( - GLint location, GLsizei count, const GLfloat* v) { +void GLES2TraceImplementation::Uniform4fv(GLint location, + GLsizei count, + const GLfloat* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform4fv"); gl_->Uniform4fv(location, count, v); } -void GLES2TraceImplementation::Uniform4i( - GLint location, GLint x, GLint y, GLint z, GLint w) { +void GLES2TraceImplementation::Uniform4i(GLint location, + GLint x, + GLint y, + GLint z, + GLint w) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform4i"); gl_->Uniform4i(location, x, y, z, w); } -void GLES2TraceImplementation::Uniform4iv( - GLint location, GLsizei count, const GLint* v) { +void GLES2TraceImplementation::Uniform4iv(GLint location, + GLsizei count, + const GLint* v) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Uniform4iv"); gl_->Uniform4iv(location, count, v); } -void GLES2TraceImplementation::UniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2TraceImplementation::UniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::UniformMatrix2fv"); gl_->UniformMatrix2fv(location, count, transpose, value); } -void GLES2TraceImplementation::UniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2TraceImplementation::UniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::UniformMatrix3fv"); gl_->UniformMatrix3fv(location, count, transpose, value); } -void GLES2TraceImplementation::UniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GLES2TraceImplementation::UniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::UniformMatrix4fv"); gl_->UniformMatrix4fv(location, count, transpose, value); } @@ -783,96 +921,129 @@ void GLES2TraceImplementation::VertexAttrib1f(GLuint indx, GLfloat x) { gl_->VertexAttrib1f(indx, x); } -void GLES2TraceImplementation::VertexAttrib1fv( - GLuint indx, const GLfloat* values) { +void GLES2TraceImplementation::VertexAttrib1fv(GLuint indx, + const GLfloat* values) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttrib1fv"); gl_->VertexAttrib1fv(indx, values); } -void GLES2TraceImplementation::VertexAttrib2f( - GLuint indx, GLfloat x, GLfloat y) { +void GLES2TraceImplementation::VertexAttrib2f(GLuint indx, + GLfloat x, + GLfloat y) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttrib2f"); gl_->VertexAttrib2f(indx, x, y); } -void GLES2TraceImplementation::VertexAttrib2fv( - GLuint indx, const GLfloat* values) { +void GLES2TraceImplementation::VertexAttrib2fv(GLuint indx, + const GLfloat* values) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttrib2fv"); gl_->VertexAttrib2fv(indx, values); } -void GLES2TraceImplementation::VertexAttrib3f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z) { +void GLES2TraceImplementation::VertexAttrib3f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttrib3f"); gl_->VertexAttrib3f(indx, x, y, z); } -void GLES2TraceImplementation::VertexAttrib3fv( - GLuint indx, const GLfloat* values) { +void GLES2TraceImplementation::VertexAttrib3fv(GLuint indx, + const GLfloat* values) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttrib3fv"); gl_->VertexAttrib3fv(indx, values); } -void GLES2TraceImplementation::VertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GLES2TraceImplementation::VertexAttrib4f(GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttrib4f"); gl_->VertexAttrib4f(indx, x, y, z, w); } -void GLES2TraceImplementation::VertexAttrib4fv( - GLuint indx, const GLfloat* values) { +void GLES2TraceImplementation::VertexAttrib4fv(GLuint indx, + const GLfloat* values) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttrib4fv"); gl_->VertexAttrib4fv(indx, values); } -void GLES2TraceImplementation::VertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, - const void* ptr) { +void GLES2TraceImplementation::VertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttribPointer"); gl_->VertexAttribPointer(indx, size, type, normalized, stride, ptr); } -void GLES2TraceImplementation::Viewport( - GLint x, GLint y, GLsizei width, GLsizei height) { +void GLES2TraceImplementation::Viewport(GLint x, + GLint y, + GLsizei width, + GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::Viewport"); gl_->Viewport(x, y, width, height); } -void GLES2TraceImplementation::BlitFramebufferCHROMIUM( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { +void GLES2TraceImplementation::BlitFramebufferCHROMIUM(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BlitFramebufferCHROMIUM"); gl_->BlitFramebufferCHROMIUM( srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } void GLES2TraceImplementation::RenderbufferStorageMultisampleCHROMIUM( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::RenderbufferStorageMultisampleCHROMIUM"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::RenderbufferStorageMultisampleCHROMIUM"); // NOLINT gl_->RenderbufferStorageMultisampleCHROMIUM( target, samples, internalformat, width, height); } void GLES2TraceImplementation::RenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::RenderbufferStorageMultisampleEXT"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::RenderbufferStorageMultisampleEXT"); // NOLINT gl_->RenderbufferStorageMultisampleEXT( target, samples, internalformat, width, height); } void GLES2TraceImplementation::FramebufferTexture2DMultisampleEXT( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLsizei samples) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::FramebufferTexture2DMultisampleEXT"); // NOLINT + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level, + GLsizei samples) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::FramebufferTexture2DMultisampleEXT"); // NOLINT gl_->FramebufferTexture2DMultisampleEXT( target, attachment, textarget, texture, level, samples); } -void GLES2TraceImplementation::TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, - GLsizei height) { +void GLES2TraceImplementation::TexStorage2DEXT(GLenum target, + GLsizei levels, + GLenum internalFormat, + GLsizei width, + GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexStorage2DEXT"); gl_->TexStorage2DEXT(target, levels, internalFormat, width, height); } @@ -882,8 +1053,8 @@ void GLES2TraceImplementation::GenQueriesEXT(GLsizei n, GLuint* queries) { gl_->GenQueriesEXT(n, queries); } -void GLES2TraceImplementation::DeleteQueriesEXT( - GLsizei n, const GLuint* queries) { +void GLES2TraceImplementation::DeleteQueriesEXT(GLsizei n, + const GLuint* queries) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteQueriesEXT"); gl_->DeleteQueriesEXT(n, queries); } @@ -903,26 +1074,28 @@ void GLES2TraceImplementation::EndQueryEXT(GLenum target) { gl_->EndQueryEXT(target); } -void GLES2TraceImplementation::GetQueryivEXT( - GLenum target, GLenum pname, GLint* params) { +void GLES2TraceImplementation::GetQueryivEXT(GLenum target, + GLenum pname, + GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetQueryivEXT"); gl_->GetQueryivEXT(target, pname, params); } -void GLES2TraceImplementation::GetQueryObjectuivEXT( - GLuint id, GLenum pname, GLuint* params) { +void GLES2TraceImplementation::GetQueryObjectuivEXT(GLuint id, + GLenum pname, + GLuint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetQueryObjectuivEXT"); gl_->GetQueryObjectuivEXT(id, pname, params); } -void GLES2TraceImplementation::InsertEventMarkerEXT( - GLsizei length, const GLchar* marker) { +void GLES2TraceImplementation::InsertEventMarkerEXT(GLsizei length, + const GLchar* marker) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::InsertEventMarkerEXT"); gl_->InsertEventMarkerEXT(length, marker); } -void GLES2TraceImplementation::PushGroupMarkerEXT( - GLsizei length, const GLchar* marker) { +void GLES2TraceImplementation::PushGroupMarkerEXT(GLsizei length, + const GLchar* marker) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::PushGroupMarkerEXT"); gl_->PushGroupMarkerEXT(length, marker); } @@ -937,8 +1110,8 @@ void GLES2TraceImplementation::GenVertexArraysOES(GLsizei n, GLuint* arrays) { gl_->GenVertexArraysOES(n, arrays); } -void GLES2TraceImplementation::DeleteVertexArraysOES( - GLsizei n, const GLuint* arrays) { +void GLES2TraceImplementation::DeleteVertexArraysOES(GLsizei n, + const GLuint* arrays) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteVertexArraysOES"); gl_->DeleteVertexArraysOES(n, arrays); } @@ -958,38 +1131,44 @@ void GLES2TraceImplementation::SwapBuffers() { gl_->SwapBuffers(); } -GLuint GLES2TraceImplementation::GetMaxValueInBufferCHROMIUM( - GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetMaxValueInBufferCHROMIUM"); // NOLINT +GLuint GLES2TraceImplementation::GetMaxValueInBufferCHROMIUM(GLuint buffer_id, + GLsizei count, + GLenum type, + GLuint offset) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::GetMaxValueInBufferCHROMIUM"); // NOLINT return gl_->GetMaxValueInBufferCHROMIUM(buffer_id, count, type, offset); } -void GLES2TraceImplementation::GenSharedIdsCHROMIUM( - GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) { +void GLES2TraceImplementation::GenSharedIdsCHROMIUM(GLuint namespace_id, + GLuint id_offset, + GLsizei n, + GLuint* ids) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GenSharedIdsCHROMIUM"); gl_->GenSharedIdsCHROMIUM(namespace_id, id_offset, n, ids); } -void GLES2TraceImplementation::DeleteSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) { +void GLES2TraceImplementation::DeleteSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteSharedIdsCHROMIUM"); gl_->DeleteSharedIdsCHROMIUM(namespace_id, n, ids); } -void GLES2TraceImplementation::RegisterSharedIdsCHROMIUM( - GLuint namespace_id, GLsizei n, const GLuint* ids) { +void GLES2TraceImplementation::RegisterSharedIdsCHROMIUM(GLuint namespace_id, + GLsizei n, + const GLuint* ids) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::RegisterSharedIdsCHROMIUM"); gl_->RegisterSharedIdsCHROMIUM(namespace_id, n, ids); } -GLboolean GLES2TraceImplementation::EnableFeatureCHROMIUM( - const char* feature) { +GLboolean GLES2TraceImplementation::EnableFeatureCHROMIUM(const char* feature) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::EnableFeatureCHROMIUM"); return gl_->EnableFeatureCHROMIUM(feature); } -void* GLES2TraceImplementation::MapBufferCHROMIUM( - GLuint target, GLenum access) { +void* GLES2TraceImplementation::MapBufferCHROMIUM(GLuint target, + GLenum access) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::MapBufferCHROMIUM"); return gl_->MapBufferCHROMIUM(target, access); } @@ -999,8 +1178,8 @@ GLboolean GLES2TraceImplementation::UnmapBufferCHROMIUM(GLuint target) { return gl_->UnmapBufferCHROMIUM(target); } -void* GLES2TraceImplementation::MapImageCHROMIUM( - GLuint image_id, GLenum access) { +void* GLES2TraceImplementation::MapImageCHROMIUM(GLuint image_id, + GLenum access) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::MapImageCHROMIUM"); return gl_->MapImageCHROMIUM(image_id, access); } @@ -1010,71 +1189,90 @@ void GLES2TraceImplementation::UnmapImageCHROMIUM(GLuint image_id) { gl_->UnmapImageCHROMIUM(image_id); } -void* GLES2TraceImplementation::MapBufferSubDataCHROMIUM( - GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) { +void* GLES2TraceImplementation::MapBufferSubDataCHROMIUM(GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::MapBufferSubDataCHROMIUM"); return gl_->MapBufferSubDataCHROMIUM(target, offset, size, access); } void GLES2TraceImplementation::UnmapBufferSubDataCHROMIUM(const void* mem) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::UnmapBufferSubDataCHROMIUM"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::UnmapBufferSubDataCHROMIUM"); // NOLINT gl_->UnmapBufferSubDataCHROMIUM(mem); } -void* GLES2TraceImplementation::MapTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLenum access) { +void* GLES2TraceImplementation::MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::MapTexSubImage2DCHROMIUM"); return gl_->MapTexSubImage2DCHROMIUM( target, level, xoffset, yoffset, width, height, format, type, access); } void GLES2TraceImplementation::UnmapTexSubImage2DCHROMIUM(const void* mem) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::UnmapTexSubImage2DCHROMIUM"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::UnmapTexSubImage2DCHROMIUM"); // NOLINT gl_->UnmapTexSubImage2DCHROMIUM(mem); } -void GLES2TraceImplementation::ResizeCHROMIUM( - GLuint width, GLuint height, GLfloat scale_factor) { +void GLES2TraceImplementation::ResizeCHROMIUM(GLuint width, + GLuint height, + GLfloat scale_factor) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ResizeCHROMIUM"); gl_->ResizeCHROMIUM(width, height, scale_factor); } const GLchar* GLES2TraceImplementation::GetRequestableExtensionsCHROMIUM() { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetRequestableExtensionsCHROMIUM"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::GetRequestableExtensionsCHROMIUM"); // NOLINT return gl_->GetRequestableExtensionsCHROMIUM(); } -void GLES2TraceImplementation::RequestExtensionCHROMIUM( - const char* extension) { +void GLES2TraceImplementation::RequestExtensionCHROMIUM(const char* extension) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::RequestExtensionCHROMIUM"); gl_->RequestExtensionCHROMIUM(extension); } void GLES2TraceImplementation::RateLimitOffscreenContextCHROMIUM() { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::RateLimitOffscreenContextCHROMIUM"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::RateLimitOffscreenContextCHROMIUM"); // NOLINT gl_->RateLimitOffscreenContextCHROMIUM(); } -void GLES2TraceImplementation::GetMultipleIntegervCHROMIUM( - const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetMultipleIntegervCHROMIUM"); // NOLINT +void GLES2TraceImplementation::GetMultipleIntegervCHROMIUM(const GLenum* pnames, + GLuint count, + GLint* results, + GLsizeiptr size) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::GetMultipleIntegervCHROMIUM"); // NOLINT gl_->GetMultipleIntegervCHROMIUM(pnames, count, results, size); } -void GLES2TraceImplementation::GetProgramInfoCHROMIUM( - GLuint program, GLsizei bufsize, GLsizei* size, void* info) { +void GLES2TraceImplementation::GetProgramInfoCHROMIUM(GLuint program, + GLsizei bufsize, + GLsizei* size, + void* info) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetProgramInfoCHROMIUM"); gl_->GetProgramInfoCHROMIUM(program, bufsize, size, info); } GLuint GLES2TraceImplementation::CreateStreamTextureCHROMIUM(GLuint texture) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::CreateStreamTextureCHROMIUM"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::CreateStreamTextureCHROMIUM"); // NOLINT return gl_->CreateStreamTextureCHROMIUM(texture); } -GLuint GLES2TraceImplementation::CreateImageCHROMIUM( - GLsizei width, GLsizei height, GLenum internalformat) { +GLuint GLES2TraceImplementation::CreateImageCHROMIUM(GLsizei width, + GLsizei height, + GLenum internalformat) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::CreateImageCHROMIUM"); return gl_->CreateImageCHROMIUM(width, height, internalformat); } @@ -1084,54 +1282,72 @@ void GLES2TraceImplementation::DestroyImageCHROMIUM(GLuint image_id) { gl_->DestroyImageCHROMIUM(image_id); } -void GLES2TraceImplementation::GetImageParameterivCHROMIUM( - GLuint image_id, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetImageParameterivCHROMIUM"); // NOLINT +void GLES2TraceImplementation::GetImageParameterivCHROMIUM(GLuint image_id, + GLenum pname, + GLint* params) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::GetImageParameterivCHROMIUM"); // NOLINT gl_->GetImageParameterivCHROMIUM(image_id, pname, params); } -void GLES2TraceImplementation::GetTranslatedShaderSourceANGLE( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetTranslatedShaderSourceANGLE"); // NOLINT +void GLES2TraceImplementation::GetTranslatedShaderSourceANGLE(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::GetTranslatedShaderSourceANGLE"); // NOLINT gl_->GetTranslatedShaderSourceANGLE(shader, bufsize, length, source); } -void GLES2TraceImplementation::PostSubBufferCHROMIUM( - GLint x, GLint y, GLint width, GLint height) { +void GLES2TraceImplementation::PostSubBufferCHROMIUM(GLint x, + GLint y, + GLint width, + GLint height) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::PostSubBufferCHROMIUM"); gl_->PostSubBufferCHROMIUM(x, y, width, height); } -void GLES2TraceImplementation::TexImageIOSurface2DCHROMIUM( - GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, - GLuint plane) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::TexImageIOSurface2DCHROMIUM"); // NOLINT +void GLES2TraceImplementation::TexImageIOSurface2DCHROMIUM(GLenum target, + GLsizei width, + GLsizei height, + GLuint ioSurfaceId, + GLuint plane) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::TexImageIOSurface2DCHROMIUM"); // NOLINT gl_->TexImageIOSurface2DCHROMIUM(target, width, height, ioSurfaceId, plane); } -void GLES2TraceImplementation::CopyTextureCHROMIUM( - GLenum target, GLenum source_id, GLenum dest_id, GLint level, - GLint internalformat, GLenum dest_type) { +void GLES2TraceImplementation::CopyTextureCHROMIUM(GLenum target, + GLenum source_id, + GLenum dest_id, + GLint level, + GLint internalformat, + GLenum dest_type) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::CopyTextureCHROMIUM"); gl_->CopyTextureCHROMIUM( target, source_id, dest_id, level, internalformat, dest_type); } -void GLES2TraceImplementation::DrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) { +void GLES2TraceImplementation::DrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DrawArraysInstancedANGLE"); gl_->DrawArraysInstancedANGLE(mode, first, count, primcount); } -void GLES2TraceImplementation::DrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, const void* indices, - GLsizei primcount) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DrawElementsInstancedANGLE"); // NOLINT +void GLES2TraceImplementation::DrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::DrawElementsInstancedANGLE"); // NOLINT gl_->DrawElementsInstancedANGLE(mode, count, type, indices, primcount); } -void GLES2TraceImplementation::VertexAttribDivisorANGLE( - GLuint index, GLuint divisor) { +void GLES2TraceImplementation::VertexAttribDivisorANGLE(GLuint index, + GLuint divisor) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::VertexAttribDivisorANGLE"); gl_->VertexAttribDivisorANGLE(index, divisor); } @@ -1141,32 +1357,34 @@ void GLES2TraceImplementation::GenMailboxCHROMIUM(GLbyte* mailbox) { gl_->GenMailboxCHROMIUM(mailbox); } -void GLES2TraceImplementation::ProduceTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) { +void GLES2TraceImplementation::ProduceTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ProduceTextureCHROMIUM"); gl_->ProduceTextureCHROMIUM(target, mailbox); } -void GLES2TraceImplementation::ConsumeTextureCHROMIUM( - GLenum target, const GLbyte* mailbox) { +void GLES2TraceImplementation::ConsumeTextureCHROMIUM(GLenum target, + const GLbyte* mailbox) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ConsumeTextureCHROMIUM"); gl_->ConsumeTextureCHROMIUM(target, mailbox); } -void GLES2TraceImplementation::BindUniformLocationCHROMIUM( - GLuint program, GLint location, const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BindUniformLocationCHROMIUM"); // NOLINT +void GLES2TraceImplementation::BindUniformLocationCHROMIUM(GLuint program, + GLint location, + const char* name) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::BindUniformLocationCHROMIUM"); // NOLINT gl_->BindUniformLocationCHROMIUM(program, location, name); } -void GLES2TraceImplementation::BindTexImage2DCHROMIUM( - GLenum target, GLint imageId) { +void GLES2TraceImplementation::BindTexImage2DCHROMIUM(GLenum target, + GLint imageId) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::BindTexImage2DCHROMIUM"); gl_->BindTexImage2DCHROMIUM(target, imageId); } -void GLES2TraceImplementation::ReleaseTexImage2DCHROMIUM( - GLenum target, GLint imageId) { +void GLES2TraceImplementation::ReleaseTexImage2DCHROMIUM(GLenum target, + GLint imageId) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ReleaseTexImage2DCHROMIUM"); gl_->ReleaseTexImage2DCHROMIUM(target, imageId); } @@ -1181,37 +1399,58 @@ void GLES2TraceImplementation::TraceEndCHROMIUM() { gl_->TraceEndCHROMIUM(); } -void GLES2TraceImplementation::AsyncTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::AsyncTexSubImage2DCHROMIUM"); // NOLINT +void GLES2TraceImplementation::AsyncTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* data) { + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::AsyncTexSubImage2DCHROMIUM"); // NOLINT gl_->AsyncTexSubImage2DCHROMIUM( target, level, xoffset, yoffset, width, height, format, type, data); } -void GLES2TraceImplementation::AsyncTexImage2DCHROMIUM( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) { +void GLES2TraceImplementation::AsyncTexImage2DCHROMIUM(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::AsyncTexImage2DCHROMIUM"); - gl_->AsyncTexImage2DCHROMIUM( - target, level, internalformat, width, height, border, format, type, - pixels); + gl_->AsyncTexImage2DCHROMIUM(target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } void GLES2TraceImplementation::WaitAsyncTexImage2DCHROMIUM(GLenum target) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::WaitAsyncTexImage2DCHROMIUM"); // NOLINT + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "GLES2Trace::WaitAsyncTexImage2DCHROMIUM"); // NOLINT gl_->WaitAsyncTexImage2DCHROMIUM(target); } void GLES2TraceImplementation::DiscardFramebufferEXT( - GLenum target, GLsizei count, const GLenum* attachments) { + GLenum target, + GLsizei count, + const GLenum* attachments) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DiscardFramebufferEXT"); gl_->DiscardFramebufferEXT(target, count, attachments); } -void GLES2TraceImplementation::LoseContextCHROMIUM( - GLenum current, GLenum other) { +void GLES2TraceImplementation::LoseContextCHROMIUM(GLenum current, + GLenum other) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::LoseContextCHROMIUM"); gl_->LoseContextCHROMIUM(current, other); } @@ -1226,8 +1465,8 @@ void GLES2TraceImplementation::WaitSyncPointCHROMIUM(GLuint sync_point) { gl_->WaitSyncPointCHROMIUM(sync_point); } -void GLES2TraceImplementation::DrawBuffersEXT( - GLsizei count, const GLenum* bufs) { +void GLES2TraceImplementation::DrawBuffersEXT(GLsizei count, + const GLenum* bufs) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DrawBuffersEXT"); gl_->DrawBuffersEXT(count, bufs); } @@ -1238,4 +1477,3 @@ void GLES2TraceImplementation::DiscardBackbufferCHROMIUM() { } #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_TRACE_IMPLEMENTATION_IMPL_AUTOGEN_H_ - diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h index 34c50c2..a3b6025 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ @@ -19,9 +21,7 @@ struct ActiveTexture { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _texture) { SetHeader(); @@ -37,8 +37,7 @@ struct ActiveTexture { uint32 texture; }; -COMPILE_ASSERT(sizeof(ActiveTexture) == 8, - Sizeof_ActiveTexture_is_not_8); +COMPILE_ASSERT(sizeof(ActiveTexture) == 8, Sizeof_ActiveTexture_is_not_8); COMPILE_ASSERT(offsetof(ActiveTexture, header) == 0, OffsetOf_ActiveTexture_header_not_0); COMPILE_ASSERT(offsetof(ActiveTexture, texture) == 4, @@ -54,9 +53,7 @@ struct AttachShader { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program, GLuint _shader) { SetHeader(); @@ -74,8 +71,7 @@ struct AttachShader { uint32 shader; }; -COMPILE_ASSERT(sizeof(AttachShader) == 12, - Sizeof_AttachShader_is_not_12); +COMPILE_ASSERT(sizeof(AttachShader) == 12, Sizeof_AttachShader_is_not_12); COMPILE_ASSERT(offsetof(AttachShader, header) == 0, OffsetOf_AttachShader_header_not_0); COMPILE_ASSERT(offsetof(AttachShader, program) == 4, @@ -93,13 +89,13 @@ struct BindAttribLocation { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, GLuint _index, uint32 _name_shm_id, - uint32 _name_shm_offset, uint32 _data_size) { + void Init(GLuint _program, + GLuint _index, + uint32 _name_shm_id, + uint32 _name_shm_offset, + uint32 _data_size) { SetHeader(); program = _program; index = _index; @@ -108,12 +104,14 @@ struct BindAttribLocation { data_size = _data_size; } - void* Set( - void* cmd, GLuint _program, GLuint _index, uint32 _name_shm_id, - uint32 _name_shm_offset, uint32 _data_size) { - static_cast<ValueType*>( - cmd)->Init( - _program, _index, _name_shm_id, _name_shm_offset, _data_size); + void* Set(void* cmd, + GLuint _program, + GLuint _index, + uint32 _name_shm_id, + uint32 _name_shm_offset, + uint32 _data_size) { + static_cast<ValueType*>(cmd) + ->Init(_program, _index, _name_shm_id, _name_shm_offset, _data_size); return NextCmdAddress<ValueType>(cmd); } @@ -150,9 +148,7 @@ struct BindAttribLocationBucket { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program, GLuint _index, uint32 _name_bucket_id) { SetHeader(); @@ -161,8 +157,7 @@ struct BindAttribLocationBucket { name_bucket_id = _name_bucket_id; } - void* Set( - void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id) { + void* Set(void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id) { static_cast<ValueType*>(cmd)->Init(_program, _index, _name_bucket_id); return NextCmdAddress<ValueType>(cmd); } @@ -194,9 +189,7 @@ struct BindBuffer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLuint _buffer) { SetHeader(); @@ -214,8 +207,7 @@ struct BindBuffer { uint32 buffer; }; -COMPILE_ASSERT(sizeof(BindBuffer) == 12, - Sizeof_BindBuffer_is_not_12); +COMPILE_ASSERT(sizeof(BindBuffer) == 12, Sizeof_BindBuffer_is_not_12); COMPILE_ASSERT(offsetof(BindBuffer, header) == 0, OffsetOf_BindBuffer_header_not_0); COMPILE_ASSERT(offsetof(BindBuffer, target) == 4, @@ -233,9 +225,7 @@ struct BindFramebuffer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLuint _framebuffer) { SetHeader(); @@ -253,8 +243,7 @@ struct BindFramebuffer { uint32 framebuffer; }; -COMPILE_ASSERT(sizeof(BindFramebuffer) == 12, - Sizeof_BindFramebuffer_is_not_12); +COMPILE_ASSERT(sizeof(BindFramebuffer) == 12, Sizeof_BindFramebuffer_is_not_12); COMPILE_ASSERT(offsetof(BindFramebuffer, header) == 0, OffsetOf_BindFramebuffer_header_not_0); COMPILE_ASSERT(offsetof(BindFramebuffer, target) == 4, @@ -272,9 +261,7 @@ struct BindRenderbuffer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLuint _renderbuffer) { SetHeader(); @@ -311,9 +298,7 @@ struct BindTexture { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLuint _texture) { SetHeader(); @@ -331,8 +316,7 @@ struct BindTexture { uint32 texture; }; -COMPILE_ASSERT(sizeof(BindTexture) == 12, - Sizeof_BindTexture_is_not_12); +COMPILE_ASSERT(sizeof(BindTexture) == 12, Sizeof_BindTexture_is_not_12); COMPILE_ASSERT(offsetof(BindTexture, header) == 0, OffsetOf_BindTexture_header_not_0); COMPILE_ASSERT(offsetof(BindTexture, target) == 4, @@ -350,9 +334,7 @@ struct BlendColor { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) { SetHeader(); @@ -362,9 +344,11 @@ struct BlendColor { alpha = _alpha; } - void* Set( - void* cmd, GLclampf _red, GLclampf _green, GLclampf _blue, - GLclampf _alpha) { + void* Set(void* cmd, + GLclampf _red, + GLclampf _green, + GLclampf _blue, + GLclampf _alpha) { static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha); return NextCmdAddress<ValueType>(cmd); } @@ -376,12 +360,10 @@ struct BlendColor { float alpha; }; -COMPILE_ASSERT(sizeof(BlendColor) == 20, - Sizeof_BlendColor_is_not_20); +COMPILE_ASSERT(sizeof(BlendColor) == 20, Sizeof_BlendColor_is_not_20); COMPILE_ASSERT(offsetof(BlendColor, header) == 0, OffsetOf_BlendColor_header_not_0); -COMPILE_ASSERT(offsetof(BlendColor, red) == 4, - OffsetOf_BlendColor_red_not_4); +COMPILE_ASSERT(offsetof(BlendColor, red) == 4, OffsetOf_BlendColor_red_not_4); COMPILE_ASSERT(offsetof(BlendColor, green) == 8, OffsetOf_BlendColor_green_not_8); COMPILE_ASSERT(offsetof(BlendColor, blue) == 12, @@ -399,9 +381,7 @@ struct BlendEquation { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _mode) { SetHeader(); @@ -417,8 +397,7 @@ struct BlendEquation { uint32 mode; }; -COMPILE_ASSERT(sizeof(BlendEquation) == 8, - Sizeof_BlendEquation_is_not_8); +COMPILE_ASSERT(sizeof(BlendEquation) == 8, Sizeof_BlendEquation_is_not_8); COMPILE_ASSERT(offsetof(BlendEquation, header) == 0, OffsetOf_BlendEquation_header_not_0); COMPILE_ASSERT(offsetof(BlendEquation, mode) == 4, @@ -434,9 +413,7 @@ struct BlendEquationSeparate { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _modeRGB, GLenum _modeAlpha) { SetHeader(); @@ -473,9 +450,7 @@ struct BlendFunc { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _sfactor, GLenum _dfactor) { SetHeader(); @@ -493,8 +468,7 @@ struct BlendFunc { uint32 dfactor; }; -COMPILE_ASSERT(sizeof(BlendFunc) == 12, - Sizeof_BlendFunc_is_not_12); +COMPILE_ASSERT(sizeof(BlendFunc) == 12, Sizeof_BlendFunc_is_not_12); COMPILE_ASSERT(offsetof(BlendFunc, header) == 0, OffsetOf_BlendFunc_header_not_0); COMPILE_ASSERT(offsetof(BlendFunc, sfactor) == 4, @@ -512,12 +486,12 @@ struct BlendFuncSeparate { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _srcRGB, GLenum _dstRGB, GLenum _srcAlpha, GLenum _dstAlpha) { + void Init(GLenum _srcRGB, + GLenum _dstRGB, + GLenum _srcAlpha, + GLenum _dstAlpha) { SetHeader(); srcRGB = _srcRGB; dstRGB = _dstRGB; @@ -525,9 +499,11 @@ struct BlendFuncSeparate { dstAlpha = _dstAlpha; } - void* Set( - void* cmd, GLenum _srcRGB, GLenum _dstRGB, GLenum _srcAlpha, - GLenum _dstAlpha) { + void* Set(void* cmd, + GLenum _srcRGB, + GLenum _dstRGB, + GLenum _srcAlpha, + GLenum _dstAlpha) { static_cast<ValueType*>(cmd)->Init(_srcRGB, _dstRGB, _srcAlpha, _dstAlpha); return NextCmdAddress<ValueType>(cmd); } @@ -562,13 +538,13 @@ struct BufferData { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLsizeiptr _size, uint32 _data_shm_id, - uint32 _data_shm_offset, GLenum _usage) { + void Init(GLenum _target, + GLsizeiptr _size, + uint32 _data_shm_id, + uint32 _data_shm_offset, + GLenum _usage) { SetHeader(); target = _target; size = _size; @@ -577,11 +553,14 @@ struct BufferData { usage = _usage; } - void* Set( - void* cmd, GLenum _target, GLsizeiptr _size, uint32 _data_shm_id, - uint32 _data_shm_offset, GLenum _usage) { - static_cast<ValueType*>( - cmd)->Init(_target, _size, _data_shm_id, _data_shm_offset, _usage); + void* Set(void* cmd, + GLenum _target, + GLsizeiptr _size, + uint32 _data_shm_id, + uint32 _data_shm_offset, + GLenum _usage) { + static_cast<ValueType*>(cmd) + ->Init(_target, _size, _data_shm_id, _data_shm_offset, _usage); return NextCmdAddress<ValueType>(cmd); } @@ -593,14 +572,12 @@ struct BufferData { uint32 usage; }; -COMPILE_ASSERT(sizeof(BufferData) == 24, - Sizeof_BufferData_is_not_24); +COMPILE_ASSERT(sizeof(BufferData) == 24, Sizeof_BufferData_is_not_24); COMPILE_ASSERT(offsetof(BufferData, header) == 0, OffsetOf_BufferData_header_not_0); COMPILE_ASSERT(offsetof(BufferData, target) == 4, OffsetOf_BufferData_target_not_4); -COMPILE_ASSERT(offsetof(BufferData, size) == 8, - OffsetOf_BufferData_size_not_8); +COMPILE_ASSERT(offsetof(BufferData, size) == 8, OffsetOf_BufferData_size_not_8); COMPILE_ASSERT(offsetof(BufferData, data_shm_id) == 12, OffsetOf_BufferData_data_shm_id_not_12); COMPILE_ASSERT(offsetof(BufferData, data_shm_offset) == 16, @@ -618,13 +595,13 @@ struct BufferSubData { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLintptr _offset, GLsizeiptr _size, uint32 _data_shm_id, - uint32 _data_shm_offset) { + void Init(GLenum _target, + GLintptr _offset, + GLsizeiptr _size, + uint32 _data_shm_id, + uint32 _data_shm_offset) { SetHeader(); target = _target; offset = _offset; @@ -633,11 +610,14 @@ struct BufferSubData { data_shm_offset = _data_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLintptr _offset, GLsizeiptr _size, - uint32 _data_shm_id, uint32 _data_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _offset, _size, _data_shm_id, _data_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLintptr _offset, + GLsizeiptr _size, + uint32 _data_shm_id, + uint32 _data_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _offset, _size, _data_shm_id, _data_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -649,8 +629,7 @@ struct BufferSubData { uint32 data_shm_offset; }; -COMPILE_ASSERT(sizeof(BufferSubData) == 24, - Sizeof_BufferSubData_is_not_24); +COMPILE_ASSERT(sizeof(BufferSubData) == 24, Sizeof_BufferSubData_is_not_24); COMPILE_ASSERT(offsetof(BufferSubData, header) == 0, OffsetOf_BufferSubData_header_not_0); COMPILE_ASSERT(offsetof(BufferSubData, target) == 4, @@ -676,9 +655,7 @@ struct CheckFramebufferStatus { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); @@ -687,11 +664,12 @@ struct CheckFramebufferStatus { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLenum _target, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLenum _target, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -722,9 +700,7 @@ struct Clear { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLbitfield _mask) { SetHeader(); @@ -740,12 +716,9 @@ struct Clear { uint32 mask; }; -COMPILE_ASSERT(sizeof(Clear) == 8, - Sizeof_Clear_is_not_8); -COMPILE_ASSERT(offsetof(Clear, header) == 0, - OffsetOf_Clear_header_not_0); -COMPILE_ASSERT(offsetof(Clear, mask) == 4, - OffsetOf_Clear_mask_not_4); +COMPILE_ASSERT(sizeof(Clear) == 8, Sizeof_Clear_is_not_8); +COMPILE_ASSERT(offsetof(Clear, header) == 0, OffsetOf_Clear_header_not_0); +COMPILE_ASSERT(offsetof(Clear, mask) == 4, OffsetOf_Clear_mask_not_4); struct ClearColor { typedef ClearColor ValueType; @@ -757,9 +730,7 @@ struct ClearColor { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLclampf _red, GLclampf _green, GLclampf _blue, GLclampf _alpha) { SetHeader(); @@ -769,9 +740,11 @@ struct ClearColor { alpha = _alpha; } - void* Set( - void* cmd, GLclampf _red, GLclampf _green, GLclampf _blue, - GLclampf _alpha) { + void* Set(void* cmd, + GLclampf _red, + GLclampf _green, + GLclampf _blue, + GLclampf _alpha) { static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha); return NextCmdAddress<ValueType>(cmd); } @@ -783,12 +756,10 @@ struct ClearColor { float alpha; }; -COMPILE_ASSERT(sizeof(ClearColor) == 20, - Sizeof_ClearColor_is_not_20); +COMPILE_ASSERT(sizeof(ClearColor) == 20, Sizeof_ClearColor_is_not_20); COMPILE_ASSERT(offsetof(ClearColor, header) == 0, OffsetOf_ClearColor_header_not_0); -COMPILE_ASSERT(offsetof(ClearColor, red) == 4, - OffsetOf_ClearColor_red_not_4); +COMPILE_ASSERT(offsetof(ClearColor, red) == 4, OffsetOf_ClearColor_red_not_4); COMPILE_ASSERT(offsetof(ClearColor, green) == 8, OffsetOf_ClearColor_green_not_8); COMPILE_ASSERT(offsetof(ClearColor, blue) == 12, @@ -806,9 +777,7 @@ struct ClearDepthf { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLclampf _depth) { SetHeader(); @@ -824,8 +793,7 @@ struct ClearDepthf { float depth; }; -COMPILE_ASSERT(sizeof(ClearDepthf) == 8, - Sizeof_ClearDepthf_is_not_8); +COMPILE_ASSERT(sizeof(ClearDepthf) == 8, Sizeof_ClearDepthf_is_not_8); COMPILE_ASSERT(offsetof(ClearDepthf, header) == 0, OffsetOf_ClearDepthf_header_not_0); COMPILE_ASSERT(offsetof(ClearDepthf, depth) == 4, @@ -841,9 +809,7 @@ struct ClearStencil { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _s) { SetHeader(); @@ -859,12 +825,10 @@ struct ClearStencil { int32 s; }; -COMPILE_ASSERT(sizeof(ClearStencil) == 8, - Sizeof_ClearStencil_is_not_8); +COMPILE_ASSERT(sizeof(ClearStencil) == 8, Sizeof_ClearStencil_is_not_8); COMPILE_ASSERT(offsetof(ClearStencil, header) == 0, OffsetOf_ClearStencil_header_not_0); -COMPILE_ASSERT(offsetof(ClearStencil, s) == 4, - OffsetOf_ClearStencil_s_not_4); +COMPILE_ASSERT(offsetof(ClearStencil, s) == 4, OffsetOf_ClearStencil_s_not_4); struct ColorMask { typedef ColorMask ValueType; @@ -876,12 +840,12 @@ struct ColorMask { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLboolean _red, GLboolean _green, GLboolean _blue, GLboolean _alpha) { + void Init(GLboolean _red, + GLboolean _green, + GLboolean _blue, + GLboolean _alpha) { SetHeader(); red = _red; green = _green; @@ -889,9 +853,11 @@ struct ColorMask { alpha = _alpha; } - void* Set( - void* cmd, GLboolean _red, GLboolean _green, GLboolean _blue, - GLboolean _alpha) { + void* Set(void* cmd, + GLboolean _red, + GLboolean _green, + GLboolean _blue, + GLboolean _alpha) { static_cast<ValueType*>(cmd)->Init(_red, _green, _blue, _alpha); return NextCmdAddress<ValueType>(cmd); } @@ -903,16 +869,12 @@ struct ColorMask { uint32 alpha; }; -COMPILE_ASSERT(sizeof(ColorMask) == 20, - Sizeof_ColorMask_is_not_20); +COMPILE_ASSERT(sizeof(ColorMask) == 20, Sizeof_ColorMask_is_not_20); COMPILE_ASSERT(offsetof(ColorMask, header) == 0, OffsetOf_ColorMask_header_not_0); -COMPILE_ASSERT(offsetof(ColorMask, red) == 4, - OffsetOf_ColorMask_red_not_4); -COMPILE_ASSERT(offsetof(ColorMask, green) == 8, - OffsetOf_ColorMask_green_not_8); -COMPILE_ASSERT(offsetof(ColorMask, blue) == 12, - OffsetOf_ColorMask_blue_not_12); +COMPILE_ASSERT(offsetof(ColorMask, red) == 4, OffsetOf_ColorMask_red_not_4); +COMPILE_ASSERT(offsetof(ColorMask, green) == 8, OffsetOf_ColorMask_green_not_8); +COMPILE_ASSERT(offsetof(ColorMask, blue) == 12, OffsetOf_ColorMask_blue_not_12); COMPILE_ASSERT(offsetof(ColorMask, alpha) == 16, OffsetOf_ColorMask_alpha_not_16); @@ -926,9 +888,7 @@ struct CompileShader { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _shader) { SetHeader(); @@ -944,8 +904,7 @@ struct CompileShader { uint32 shader; }; -COMPILE_ASSERT(sizeof(CompileShader) == 8, - Sizeof_CompileShader_is_not_8); +COMPILE_ASSERT(sizeof(CompileShader) == 8, Sizeof_CompileShader_is_not_8); COMPILE_ASSERT(offsetof(CompileShader, header) == 0, OffsetOf_CompileShader_header_not_0); COMPILE_ASSERT(offsetof(CompileShader, shader) == 4, @@ -961,14 +920,17 @@ struct CompressedTexImage2D { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width, - GLsizei _height, GLint _border, GLsizei _imageSize, uint32 _data_shm_id, - uint32 _data_shm_offset) { + void Init(GLenum _target, + GLint _level, + GLenum _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLsizei _imageSize, + uint32 _data_shm_id, + uint32 _data_shm_offset) { SetHeader(); target = _target; level = _level; @@ -981,14 +943,25 @@ struct CompressedTexImage2D { data_shm_offset = _data_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLenum _internalformat, - GLsizei _width, GLsizei _height, GLint _border, GLsizei _imageSize, - uint32 _data_shm_id, uint32 _data_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _width, _height, _border, - _imageSize, _data_shm_id, _data_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLenum _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLsizei _imageSize, + uint32 _data_shm_id, + uint32 _data_shm_offset) { + static_cast<ValueType*>(cmd)->Init(_target, + _level, + _internalformat, + _width, + _height, + _border, + _imageSize, + _data_shm_id, + _data_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -1037,13 +1010,15 @@ struct CompressedTexImage2DBucket { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width, - GLsizei _height, GLint _border, GLuint _bucket_id) { + void Init(GLenum _target, + GLint _level, + GLenum _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLuint _bucket_id) { SetHeader(); target = _target; level = _level; @@ -1054,13 +1029,16 @@ struct CompressedTexImage2DBucket { bucket_id = _bucket_id; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLenum _internalformat, - GLsizei _width, GLsizei _height, GLint _border, GLuint _bucket_id) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _width, _height, _border, - _bucket_id); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLenum _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLuint _bucket_id) { + static_cast<ValueType*>(cmd)->Init( + _target, _level, _internalformat, _width, _height, _border, _bucket_id); return NextCmdAddress<ValueType>(cmd); } @@ -1103,14 +1081,18 @@ struct CompressedTexSubImage2D { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize, - uint32 _data_shm_id, uint32 _data_shm_offset) { + void Init(GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLsizei _imageSize, + uint32 _data_shm_id, + uint32 _data_shm_offset) { SetHeader(); target = _target; level = _level; @@ -1124,14 +1106,27 @@ struct CompressedTexSubImage2D { data_shm_offset = _data_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLsizei _imageSize, - uint32 _data_shm_id, uint32 _data_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _width, _height, _format, - _imageSize, _data_shm_id, _data_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLsizei _imageSize, + uint32 _data_shm_id, + uint32 _data_shm_offset) { + static_cast<ValueType*>(cmd)->Init(_target, + _level, + _xoffset, + _yoffset, + _width, + _height, + _format, + _imageSize, + _data_shm_id, + _data_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -1183,13 +1178,16 @@ struct CompressedTexSubImage2DBucket { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLuint _bucket_id) { + void Init(GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLuint _bucket_id) { SetHeader(); target = _target; level = _level; @@ -1201,13 +1199,23 @@ struct CompressedTexSubImage2DBucket { bucket_id = _bucket_id; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLuint _bucket_id) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _width, _height, _format, - _bucket_id); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLuint _bucket_id) { + static_cast<ValueType*>(cmd)->Init(_target, + _level, + _xoffset, + _yoffset, + _width, + _height, + _format, + _bucket_id); return NextCmdAddress<ValueType>(cmd); } @@ -1253,13 +1261,16 @@ struct CopyTexImage2D { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLenum _internalformat, GLint _x, GLint _y, - GLsizei _width, GLsizei _height, GLint _border) { + void Init(GLenum _target, + GLint _level, + GLenum _internalformat, + GLint _x, + GLint _y, + GLsizei _width, + GLsizei _height, + GLint _border) { SetHeader(); target = _target; level = _level; @@ -1271,13 +1282,17 @@ struct CopyTexImage2D { border = _border; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLenum _internalformat, GLint _x, - GLint _y, GLsizei _width, GLsizei _height, GLint _border) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _x, _y, _width, _height, - _border); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLenum _internalformat, + GLint _x, + GLint _y, + GLsizei _width, + GLsizei _height, + GLint _border) { + static_cast<ValueType*>(cmd)->Init( + _target, _level, _internalformat, _x, _y, _width, _height, _border); return NextCmdAddress<ValueType>(cmd); } @@ -1292,8 +1307,7 @@ struct CopyTexImage2D { int32 border; }; -COMPILE_ASSERT(sizeof(CopyTexImage2D) == 36, - Sizeof_CopyTexImage2D_is_not_36); +COMPILE_ASSERT(sizeof(CopyTexImage2D) == 36, Sizeof_CopyTexImage2D_is_not_36); COMPILE_ASSERT(offsetof(CopyTexImage2D, header) == 0, OffsetOf_CopyTexImage2D_header_not_0); COMPILE_ASSERT(offsetof(CopyTexImage2D, target) == 4, @@ -1323,13 +1337,16 @@ struct CopyTexSubImage2D { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, GLint _x, - GLint _y, GLsizei _width, GLsizei _height) { + void Init(GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLint _x, + GLint _y, + GLsizei _width, + GLsizei _height) { SetHeader(); target = _target; level = _level; @@ -1341,12 +1358,17 @@ struct CopyTexSubImage2D { height = _height; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLint _x, GLint _y, GLsizei _width, GLsizei _height) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _x, _y, _width, _height); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLint _x, + GLint _y, + GLsizei _width, + GLsizei _height) { + static_cast<ValueType*>(cmd) + ->Init(_target, _level, _xoffset, _yoffset, _x, _y, _width, _height); return NextCmdAddress<ValueType>(cmd); } @@ -1392,9 +1414,7 @@ struct CreateProgram { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(uint32 _client_id) { SetHeader(); @@ -1410,8 +1430,7 @@ struct CreateProgram { uint32 client_id; }; -COMPILE_ASSERT(sizeof(CreateProgram) == 8, - Sizeof_CreateProgram_is_not_8); +COMPILE_ASSERT(sizeof(CreateProgram) == 8, Sizeof_CreateProgram_is_not_8); COMPILE_ASSERT(offsetof(CreateProgram, header) == 0, OffsetOf_CreateProgram_header_not_0); COMPILE_ASSERT(offsetof(CreateProgram, client_id) == 4, @@ -1427,9 +1446,7 @@ struct CreateShader { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _type, uint32 _client_id) { SetHeader(); @@ -1447,8 +1464,7 @@ struct CreateShader { uint32 client_id; }; -COMPILE_ASSERT(sizeof(CreateShader) == 12, - Sizeof_CreateShader_is_not_12); +COMPILE_ASSERT(sizeof(CreateShader) == 12, Sizeof_CreateShader_is_not_12); COMPILE_ASSERT(offsetof(CreateShader, header) == 0, OffsetOf_CreateShader_header_not_0); COMPILE_ASSERT(offsetof(CreateShader, type) == 4, @@ -1466,9 +1482,7 @@ struct CullFace { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _mode) { SetHeader(); @@ -1484,12 +1498,9 @@ struct CullFace { uint32 mode; }; -COMPILE_ASSERT(sizeof(CullFace) == 8, - Sizeof_CullFace_is_not_8); -COMPILE_ASSERT(offsetof(CullFace, header) == 0, - OffsetOf_CullFace_header_not_0); -COMPILE_ASSERT(offsetof(CullFace, mode) == 4, - OffsetOf_CullFace_mode_not_4); +COMPILE_ASSERT(sizeof(CullFace) == 8, Sizeof_CullFace_is_not_8); +COMPILE_ASSERT(offsetof(CullFace, header) == 0, OffsetOf_CullFace_header_not_0); +COMPILE_ASSERT(offsetof(CullFace, mode) == 4, OffsetOf_CullFace_mode_not_4); struct DeleteBuffers { typedef DeleteBuffers ValueType; @@ -1501,9 +1512,7 @@ struct DeleteBuffers { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) { SetHeader(); @@ -1512,11 +1521,12 @@ struct DeleteBuffers { buffers_shm_offset = _buffers_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _buffers_shm_id, - uint32 _buffers_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _buffers_shm_id, _buffers_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _buffers_shm_id, + uint32 _buffers_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _buffers_shm_id, _buffers_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -1526,12 +1536,10 @@ struct DeleteBuffers { uint32 buffers_shm_offset; }; -COMPILE_ASSERT(sizeof(DeleteBuffers) == 16, - Sizeof_DeleteBuffers_is_not_16); +COMPILE_ASSERT(sizeof(DeleteBuffers) == 16, Sizeof_DeleteBuffers_is_not_16); COMPILE_ASSERT(offsetof(DeleteBuffers, header) == 0, OffsetOf_DeleteBuffers_header_not_0); -COMPILE_ASSERT(offsetof(DeleteBuffers, n) == 4, - OffsetOf_DeleteBuffers_n_not_4); +COMPILE_ASSERT(offsetof(DeleteBuffers, n) == 4, OffsetOf_DeleteBuffers_n_not_4); COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_id) == 8, OffsetOf_DeleteBuffers_buffers_shm_id_not_8); COMPILE_ASSERT(offsetof(DeleteBuffers, buffers_shm_offset) == 12, @@ -1548,8 +1556,8 @@ struct DeleteBuffersImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -1559,8 +1567,7 @@ struct DeleteBuffersImmediate { void Init(GLsizei _n, const GLuint* _buffers) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _buffers, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, const GLuint* _buffers) { @@ -1590,24 +1597,23 @@ struct DeleteFramebuffers { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLsizei _n, uint32 _framebuffers_shm_id, - uint32 _framebuffers_shm_offset) { + void Init(GLsizei _n, + uint32 _framebuffers_shm_id, + uint32 _framebuffers_shm_offset) { SetHeader(); n = _n; framebuffers_shm_id = _framebuffers_shm_id; framebuffers_shm_offset = _framebuffers_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _framebuffers_shm_id, - uint32 _framebuffers_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _framebuffers_shm_id, + uint32 _framebuffers_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -1639,8 +1645,8 @@ struct DeleteFramebuffersImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -1650,8 +1656,7 @@ struct DeleteFramebuffersImmediate { void Init(GLsizei _n, const GLuint* _framebuffers) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _framebuffers, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, const GLuint* _framebuffers) { @@ -1681,9 +1686,7 @@ struct DeleteProgram { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program) { SetHeader(); @@ -1699,8 +1702,7 @@ struct DeleteProgram { uint32 program; }; -COMPILE_ASSERT(sizeof(DeleteProgram) == 8, - Sizeof_DeleteProgram_is_not_8); +COMPILE_ASSERT(sizeof(DeleteProgram) == 8, Sizeof_DeleteProgram_is_not_8); COMPILE_ASSERT(offsetof(DeleteProgram, header) == 0, OffsetOf_DeleteProgram_header_not_0); COMPILE_ASSERT(offsetof(DeleteProgram, program) == 4, @@ -1716,24 +1718,23 @@ struct DeleteRenderbuffers { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLsizei _n, uint32 _renderbuffers_shm_id, - uint32 _renderbuffers_shm_offset) { + void Init(GLsizei _n, + uint32 _renderbuffers_shm_id, + uint32 _renderbuffers_shm_offset) { SetHeader(); n = _n; renderbuffers_shm_id = _renderbuffers_shm_id; renderbuffers_shm_offset = _renderbuffers_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _renderbuffers_shm_id, - uint32 _renderbuffers_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _renderbuffers_shm_id, + uint32 _renderbuffers_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -1765,8 +1766,8 @@ struct DeleteRenderbuffersImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -1776,8 +1777,7 @@ struct DeleteRenderbuffersImmediate { void Init(GLsizei _n, const GLuint* _renderbuffers) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _renderbuffers, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, const GLuint* _renderbuffers) { @@ -1807,9 +1807,7 @@ struct DeleteShader { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _shader) { SetHeader(); @@ -1825,8 +1823,7 @@ struct DeleteShader { uint32 shader; }; -COMPILE_ASSERT(sizeof(DeleteShader) == 8, - Sizeof_DeleteShader_is_not_8); +COMPILE_ASSERT(sizeof(DeleteShader) == 8, Sizeof_DeleteShader_is_not_8); COMPILE_ASSERT(offsetof(DeleteShader, header) == 0, OffsetOf_DeleteShader_header_not_0); COMPILE_ASSERT(offsetof(DeleteShader, shader) == 4, @@ -1842,9 +1839,7 @@ struct DeleteTextures { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) { SetHeader(); @@ -1853,11 +1848,12 @@ struct DeleteTextures { textures_shm_offset = _textures_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _textures_shm_id, - uint32 _textures_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _textures_shm_id, _textures_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _textures_shm_id, + uint32 _textures_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _textures_shm_id, _textures_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -1867,8 +1863,7 @@ struct DeleteTextures { uint32 textures_shm_offset; }; -COMPILE_ASSERT(sizeof(DeleteTextures) == 16, - Sizeof_DeleteTextures_is_not_16); +COMPILE_ASSERT(sizeof(DeleteTextures) == 16, Sizeof_DeleteTextures_is_not_16); COMPILE_ASSERT(offsetof(DeleteTextures, header) == 0, OffsetOf_DeleteTextures_header_not_0); COMPILE_ASSERT(offsetof(DeleteTextures, n) == 4, @@ -1889,8 +1884,8 @@ struct DeleteTexturesImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -1900,8 +1895,7 @@ struct DeleteTexturesImmediate { void Init(GLsizei _n, const GLuint* _textures) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _textures, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, const GLuint* _textures) { @@ -1931,9 +1925,7 @@ struct DepthFunc { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _func) { SetHeader(); @@ -1949,12 +1941,10 @@ struct DepthFunc { uint32 func; }; -COMPILE_ASSERT(sizeof(DepthFunc) == 8, - Sizeof_DepthFunc_is_not_8); +COMPILE_ASSERT(sizeof(DepthFunc) == 8, Sizeof_DepthFunc_is_not_8); COMPILE_ASSERT(offsetof(DepthFunc, header) == 0, OffsetOf_DepthFunc_header_not_0); -COMPILE_ASSERT(offsetof(DepthFunc, func) == 4, - OffsetOf_DepthFunc_func_not_4); +COMPILE_ASSERT(offsetof(DepthFunc, func) == 4, OffsetOf_DepthFunc_func_not_4); struct DepthMask { typedef DepthMask ValueType; @@ -1966,9 +1956,7 @@ struct DepthMask { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLboolean _flag) { SetHeader(); @@ -1984,12 +1972,10 @@ struct DepthMask { uint32 flag; }; -COMPILE_ASSERT(sizeof(DepthMask) == 8, - Sizeof_DepthMask_is_not_8); +COMPILE_ASSERT(sizeof(DepthMask) == 8, Sizeof_DepthMask_is_not_8); COMPILE_ASSERT(offsetof(DepthMask, header) == 0, OffsetOf_DepthMask_header_not_0); -COMPILE_ASSERT(offsetof(DepthMask, flag) == 4, - OffsetOf_DepthMask_flag_not_4); +COMPILE_ASSERT(offsetof(DepthMask, flag) == 4, OffsetOf_DepthMask_flag_not_4); struct DepthRangef { typedef DepthRangef ValueType; @@ -2001,9 +1987,7 @@ struct DepthRangef { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLclampf _zNear, GLclampf _zFar) { SetHeader(); @@ -2021,8 +2005,7 @@ struct DepthRangef { float zFar; }; -COMPILE_ASSERT(sizeof(DepthRangef) == 12, - Sizeof_DepthRangef_is_not_12); +COMPILE_ASSERT(sizeof(DepthRangef) == 12, Sizeof_DepthRangef_is_not_12); COMPILE_ASSERT(offsetof(DepthRangef, header) == 0, OffsetOf_DepthRangef_header_not_0); COMPILE_ASSERT(offsetof(DepthRangef, zNear) == 4, @@ -2040,9 +2023,7 @@ struct DetachShader { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program, GLuint _shader) { SetHeader(); @@ -2060,8 +2041,7 @@ struct DetachShader { uint32 shader; }; -COMPILE_ASSERT(sizeof(DetachShader) == 12, - Sizeof_DetachShader_is_not_12); +COMPILE_ASSERT(sizeof(DetachShader) == 12, Sizeof_DetachShader_is_not_12); COMPILE_ASSERT(offsetof(DetachShader, header) == 0, OffsetOf_DetachShader_header_not_0); COMPILE_ASSERT(offsetof(DetachShader, program) == 4, @@ -2079,9 +2059,7 @@ struct Disable { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _cap) { SetHeader(); @@ -2097,12 +2075,9 @@ struct Disable { uint32 cap; }; -COMPILE_ASSERT(sizeof(Disable) == 8, - Sizeof_Disable_is_not_8); -COMPILE_ASSERT(offsetof(Disable, header) == 0, - OffsetOf_Disable_header_not_0); -COMPILE_ASSERT(offsetof(Disable, cap) == 4, - OffsetOf_Disable_cap_not_4); +COMPILE_ASSERT(sizeof(Disable) == 8, Sizeof_Disable_is_not_8); +COMPILE_ASSERT(offsetof(Disable, header) == 0, OffsetOf_Disable_header_not_0); +COMPILE_ASSERT(offsetof(Disable, cap) == 4, OffsetOf_Disable_cap_not_4); struct DisableVertexAttribArray { typedef DisableVertexAttribArray ValueType; @@ -2114,9 +2089,7 @@ struct DisableVertexAttribArray { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _index) { SetHeader(); @@ -2149,9 +2122,7 @@ struct DrawArrays { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _mode, GLint _first, GLsizei _count) { SetHeader(); @@ -2171,12 +2142,10 @@ struct DrawArrays { int32 count; }; -COMPILE_ASSERT(sizeof(DrawArrays) == 16, - Sizeof_DrawArrays_is_not_16); +COMPILE_ASSERT(sizeof(DrawArrays) == 16, Sizeof_DrawArrays_is_not_16); COMPILE_ASSERT(offsetof(DrawArrays, header) == 0, OffsetOf_DrawArrays_header_not_0); -COMPILE_ASSERT(offsetof(DrawArrays, mode) == 4, - OffsetOf_DrawArrays_mode_not_4); +COMPILE_ASSERT(offsetof(DrawArrays, mode) == 4, OffsetOf_DrawArrays_mode_not_4); COMPILE_ASSERT(offsetof(DrawArrays, first) == 8, OffsetOf_DrawArrays_first_not_8); COMPILE_ASSERT(offsetof(DrawArrays, count) == 12, @@ -2192,9 +2161,7 @@ struct DrawElements { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset) { SetHeader(); @@ -2204,9 +2171,11 @@ struct DrawElements { index_offset = _index_offset; } - void* Set( - void* cmd, GLenum _mode, GLsizei _count, GLenum _type, - GLuint _index_offset) { + void* Set(void* cmd, + GLenum _mode, + GLsizei _count, + GLenum _type, + GLuint _index_offset) { static_cast<ValueType*>(cmd)->Init(_mode, _count, _type, _index_offset); return NextCmdAddress<ValueType>(cmd); } @@ -2218,8 +2187,7 @@ struct DrawElements { uint32 index_offset; }; -COMPILE_ASSERT(sizeof(DrawElements) == 20, - Sizeof_DrawElements_is_not_20); +COMPILE_ASSERT(sizeof(DrawElements) == 20, Sizeof_DrawElements_is_not_20); COMPILE_ASSERT(offsetof(DrawElements, header) == 0, OffsetOf_DrawElements_header_not_0); COMPILE_ASSERT(offsetof(DrawElements, mode) == 4, @@ -2241,9 +2209,7 @@ struct Enable { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _cap) { SetHeader(); @@ -2259,12 +2225,9 @@ struct Enable { uint32 cap; }; -COMPILE_ASSERT(sizeof(Enable) == 8, - Sizeof_Enable_is_not_8); -COMPILE_ASSERT(offsetof(Enable, header) == 0, - OffsetOf_Enable_header_not_0); -COMPILE_ASSERT(offsetof(Enable, cap) == 4, - OffsetOf_Enable_cap_not_4); +COMPILE_ASSERT(sizeof(Enable) == 8, Sizeof_Enable_is_not_8); +COMPILE_ASSERT(offsetof(Enable, header) == 0, OffsetOf_Enable_header_not_0); +COMPILE_ASSERT(offsetof(Enable, cap) == 4, OffsetOf_Enable_cap_not_4); struct EnableVertexAttribArray { typedef EnableVertexAttribArray ValueType; @@ -2276,9 +2239,7 @@ struct EnableVertexAttribArray { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _index) { SetHeader(); @@ -2311,13 +2272,9 @@ struct Finish { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init() { - SetHeader(); - } + void Init() { SetHeader(); } void* Set(void* cmd) { static_cast<ValueType*>(cmd)->Init(); @@ -2327,10 +2284,8 @@ struct Finish { gpu::CommandHeader header; }; -COMPILE_ASSERT(sizeof(Finish) == 4, - Sizeof_Finish_is_not_4); -COMPILE_ASSERT(offsetof(Finish, header) == 0, - OffsetOf_Finish_header_not_0); +COMPILE_ASSERT(sizeof(Finish) == 4, Sizeof_Finish_is_not_4); +COMPILE_ASSERT(offsetof(Finish, header) == 0, OffsetOf_Finish_header_not_0); struct Flush { typedef Flush ValueType; @@ -2342,13 +2297,9 @@ struct Flush { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init() { - SetHeader(); - } + void Init() { SetHeader(); } void* Set(void* cmd) { static_cast<ValueType*>(cmd)->Init(); @@ -2358,10 +2309,8 @@ struct Flush { gpu::CommandHeader header; }; -COMPILE_ASSERT(sizeof(Flush) == 4, - Sizeof_Flush_is_not_4); -COMPILE_ASSERT(offsetof(Flush, header) == 0, - OffsetOf_Flush_header_not_0); +COMPILE_ASSERT(sizeof(Flush) == 4, Sizeof_Flush_is_not_4); +COMPILE_ASSERT(offsetof(Flush, header) == 0, OffsetOf_Flush_header_not_0); struct FramebufferRenderbuffer { typedef FramebufferRenderbuffer ValueType; @@ -2373,13 +2322,12 @@ struct FramebufferRenderbuffer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _attachment, GLenum _renderbuffertarget, - GLuint _renderbuffer) { + void Init(GLenum _target, + GLenum _attachment, + GLenum _renderbuffertarget, + GLuint _renderbuffer) { SetHeader(); target = _target; attachment = _attachment; @@ -2387,11 +2335,13 @@ struct FramebufferRenderbuffer { renderbuffer = _renderbuffer; } - void* Set( - void* cmd, GLenum _target, GLenum _attachment, GLenum _renderbuffertarget, - GLuint _renderbuffer) { - static_cast<ValueType*>( - cmd)->Init(_target, _attachment, _renderbuffertarget, _renderbuffer); + void* Set(void* cmd, + GLenum _target, + GLenum _attachment, + GLenum _renderbuffertarget, + GLuint _renderbuffer) { + static_cast<ValueType*>(cmd) + ->Init(_target, _attachment, _renderbuffertarget, _renderbuffer); return NextCmdAddress<ValueType>(cmd); } @@ -2425,13 +2375,13 @@ struct FramebufferTexture2D { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _attachment, GLenum _textarget, GLuint _texture, - GLint _level) { + void Init(GLenum _target, + GLenum _attachment, + GLenum _textarget, + GLuint _texture, + GLint _level) { SetHeader(); target = _target; attachment = _attachment; @@ -2440,11 +2390,14 @@ struct FramebufferTexture2D { level = _level; } - void* Set( - void* cmd, GLenum _target, GLenum _attachment, GLenum _textarget, - GLuint _texture, GLint _level) { - static_cast<ValueType*>( - cmd)->Init(_target, _attachment, _textarget, _texture, _level); + void* Set(void* cmd, + GLenum _target, + GLenum _attachment, + GLenum _textarget, + GLuint _texture, + GLint _level) { + static_cast<ValueType*>(cmd) + ->Init(_target, _attachment, _textarget, _texture, _level); return NextCmdAddress<ValueType>(cmd); } @@ -2481,9 +2434,7 @@ struct FrontFace { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _mode) { SetHeader(); @@ -2499,12 +2450,10 @@ struct FrontFace { uint32 mode; }; -COMPILE_ASSERT(sizeof(FrontFace) == 8, - Sizeof_FrontFace_is_not_8); +COMPILE_ASSERT(sizeof(FrontFace) == 8, Sizeof_FrontFace_is_not_8); COMPILE_ASSERT(offsetof(FrontFace, header) == 0, OffsetOf_FrontFace_header_not_0); -COMPILE_ASSERT(offsetof(FrontFace, mode) == 4, - OffsetOf_FrontFace_mode_not_4); +COMPILE_ASSERT(offsetof(FrontFace, mode) == 4, OffsetOf_FrontFace_mode_not_4); struct GenBuffers { typedef GenBuffers ValueType; @@ -2516,9 +2465,7 @@ struct GenBuffers { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _buffers_shm_id, uint32 _buffers_shm_offset) { SetHeader(); @@ -2527,11 +2474,12 @@ struct GenBuffers { buffers_shm_offset = _buffers_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _buffers_shm_id, - uint32 _buffers_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _buffers_shm_id, _buffers_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _buffers_shm_id, + uint32 _buffers_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _buffers_shm_id, _buffers_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -2541,12 +2489,10 @@ struct GenBuffers { uint32 buffers_shm_offset; }; -COMPILE_ASSERT(sizeof(GenBuffers) == 16, - Sizeof_GenBuffers_is_not_16); +COMPILE_ASSERT(sizeof(GenBuffers) == 16, Sizeof_GenBuffers_is_not_16); COMPILE_ASSERT(offsetof(GenBuffers, header) == 0, OffsetOf_GenBuffers_header_not_0); -COMPILE_ASSERT(offsetof(GenBuffers, n) == 4, - OffsetOf_GenBuffers_n_not_4); +COMPILE_ASSERT(offsetof(GenBuffers, n) == 4, OffsetOf_GenBuffers_n_not_4); COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_id) == 8, OffsetOf_GenBuffers_buffers_shm_id_not_8); COMPILE_ASSERT(offsetof(GenBuffers, buffers_shm_offset) == 12, @@ -2563,8 +2509,8 @@ struct GenBuffersImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -2574,8 +2520,7 @@ struct GenBuffersImmediate { void Init(GLsizei _n, GLuint* _buffers) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _buffers, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, GLuint* _buffers) { @@ -2605,9 +2550,7 @@ struct GenerateMipmap { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target) { SetHeader(); @@ -2623,8 +2566,7 @@ struct GenerateMipmap { uint32 target; }; -COMPILE_ASSERT(sizeof(GenerateMipmap) == 8, - Sizeof_GenerateMipmap_is_not_8); +COMPILE_ASSERT(sizeof(GenerateMipmap) == 8, Sizeof_GenerateMipmap_is_not_8); COMPILE_ASSERT(offsetof(GenerateMipmap, header) == 0, OffsetOf_GenerateMipmap_header_not_0); COMPILE_ASSERT(offsetof(GenerateMipmap, target) == 4, @@ -2640,24 +2582,23 @@ struct GenFramebuffers { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLsizei _n, uint32 _framebuffers_shm_id, - uint32 _framebuffers_shm_offset) { + void Init(GLsizei _n, + uint32 _framebuffers_shm_id, + uint32 _framebuffers_shm_offset) { SetHeader(); n = _n; framebuffers_shm_id = _framebuffers_shm_id; framebuffers_shm_offset = _framebuffers_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _framebuffers_shm_id, - uint32 _framebuffers_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _framebuffers_shm_id, + uint32 _framebuffers_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _framebuffers_shm_id, _framebuffers_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -2667,8 +2608,7 @@ struct GenFramebuffers { uint32 framebuffers_shm_offset; }; -COMPILE_ASSERT(sizeof(GenFramebuffers) == 16, - Sizeof_GenFramebuffers_is_not_16); +COMPILE_ASSERT(sizeof(GenFramebuffers) == 16, Sizeof_GenFramebuffers_is_not_16); COMPILE_ASSERT(offsetof(GenFramebuffers, header) == 0, OffsetOf_GenFramebuffers_header_not_0); COMPILE_ASSERT(offsetof(GenFramebuffers, n) == 4, @@ -2689,8 +2629,8 @@ struct GenFramebuffersImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -2700,8 +2640,7 @@ struct GenFramebuffersImmediate { void Init(GLsizei _n, GLuint* _framebuffers) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _framebuffers, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _framebuffers, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, GLuint* _framebuffers) { @@ -2731,24 +2670,23 @@ struct GenRenderbuffers { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLsizei _n, uint32 _renderbuffers_shm_id, - uint32 _renderbuffers_shm_offset) { + void Init(GLsizei _n, + uint32 _renderbuffers_shm_id, + uint32 _renderbuffers_shm_offset) { SetHeader(); n = _n; renderbuffers_shm_id = _renderbuffers_shm_id; renderbuffers_shm_offset = _renderbuffers_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _renderbuffers_shm_id, - uint32 _renderbuffers_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _renderbuffers_shm_id, + uint32 _renderbuffers_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _renderbuffers_shm_id, _renderbuffers_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -2780,8 +2718,8 @@ struct GenRenderbuffersImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -2791,8 +2729,7 @@ struct GenRenderbuffersImmediate { void Init(GLsizei _n, GLuint* _renderbuffers) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _renderbuffers, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _renderbuffers, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, GLuint* _renderbuffers) { @@ -2822,9 +2759,7 @@ struct GenTextures { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _textures_shm_id, uint32 _textures_shm_offset) { SetHeader(); @@ -2833,11 +2768,12 @@ struct GenTextures { textures_shm_offset = _textures_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _textures_shm_id, - uint32 _textures_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _textures_shm_id, _textures_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _textures_shm_id, + uint32 _textures_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _textures_shm_id, _textures_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -2847,12 +2783,10 @@ struct GenTextures { uint32 textures_shm_offset; }; -COMPILE_ASSERT(sizeof(GenTextures) == 16, - Sizeof_GenTextures_is_not_16); +COMPILE_ASSERT(sizeof(GenTextures) == 16, Sizeof_GenTextures_is_not_16); COMPILE_ASSERT(offsetof(GenTextures, header) == 0, OffsetOf_GenTextures_header_not_0); -COMPILE_ASSERT(offsetof(GenTextures, n) == 4, - OffsetOf_GenTextures_n_not_4); +COMPILE_ASSERT(offsetof(GenTextures, n) == 4, OffsetOf_GenTextures_n_not_4); COMPILE_ASSERT(offsetof(GenTextures, textures_shm_id) == 8, OffsetOf_GenTextures_textures_shm_id_not_8); COMPILE_ASSERT(offsetof(GenTextures, textures_shm_offset) == 12, @@ -2869,8 +2803,8 @@ struct GenTexturesImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -2880,8 +2814,7 @@ struct GenTexturesImmediate { void Init(GLsizei _n, GLuint* _textures) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _textures, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, GLuint* _textures) { @@ -2917,13 +2850,13 @@ struct GetActiveAttrib { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, GLuint _index, uint32 _name_bucket_id, - uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _program, + GLuint _index, + uint32 _name_bucket_id, + uint32 _result_shm_id, + uint32 _result_shm_offset) { SetHeader(); program = _program; index = _index; @@ -2932,13 +2865,14 @@ struct GetActiveAttrib { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id, - uint32 _result_shm_id, uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _program, _index, _name_bucket_id, _result_shm_id, - _result_shm_offset); + void* Set(void* cmd, + GLuint _program, + GLuint _index, + uint32 _name_bucket_id, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd)->Init( + _program, _index, _name_bucket_id, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -2950,8 +2884,7 @@ struct GetActiveAttrib { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(GetActiveAttrib) == 24, - Sizeof_GetActiveAttrib_is_not_24); +COMPILE_ASSERT(sizeof(GetActiveAttrib) == 24, Sizeof_GetActiveAttrib_is_not_24); COMPILE_ASSERT(offsetof(GetActiveAttrib, header) == 0, OffsetOf_GetActiveAttrib_header_not_0); COMPILE_ASSERT(offsetof(GetActiveAttrib, program) == 4, @@ -2987,13 +2920,13 @@ struct GetActiveUniform { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, GLuint _index, uint32 _name_bucket_id, - uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _program, + GLuint _index, + uint32 _name_bucket_id, + uint32 _result_shm_id, + uint32 _result_shm_offset) { SetHeader(); program = _program; index = _index; @@ -3002,13 +2935,14 @@ struct GetActiveUniform { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _program, GLuint _index, uint32 _name_bucket_id, - uint32 _result_shm_id, uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _program, _index, _name_bucket_id, _result_shm_id, - _result_shm_offset); + void* Set(void* cmd, + GLuint _program, + GLuint _index, + uint32 _name_bucket_id, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd)->Init( + _program, _index, _name_bucket_id, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3053,13 +2987,12 @@ struct GetAttachedShaders { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset, - uint32 _result_size) { + void Init(GLuint _program, + uint32 _result_shm_id, + uint32 _result_shm_offset, + uint32 _result_size) { SetHeader(); program = _program; result_shm_id = _result_shm_id; @@ -3067,11 +3000,13 @@ struct GetAttachedShaders { result_size = _result_size; } - void* Set( - void* cmd, GLuint _program, uint32 _result_shm_id, - uint32 _result_shm_offset, uint32 _result_size) { - static_cast<ValueType*>( - cmd)->Init(_program, _result_shm_id, _result_shm_offset, _result_size); + void* Set(void* cmd, + GLuint _program, + uint32 _result_shm_id, + uint32 _result_shm_offset, + uint32 _result_size) { + static_cast<ValueType*>(cmd) + ->Init(_program, _result_shm_id, _result_shm_offset, _result_size); return NextCmdAddress<ValueType>(cmd); } @@ -3107,9 +3042,7 @@ struct GetBooleanv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) { SetHeader(); @@ -3118,11 +3051,12 @@ struct GetBooleanv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3132,8 +3066,7 @@ struct GetBooleanv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(GetBooleanv) == 16, - Sizeof_GetBooleanv_is_not_16); +COMPILE_ASSERT(sizeof(GetBooleanv) == 16, Sizeof_GetBooleanv_is_not_16); COMPILE_ASSERT(offsetof(GetBooleanv, header) == 0, OffsetOf_GetBooleanv_header_not_0); COMPILE_ASSERT(offsetof(GetBooleanv, pname) == 4, @@ -3155,13 +3088,12 @@ struct GetBufferParameteriv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); target = _target; pname = _pname; @@ -3169,11 +3101,13 @@ struct GetBufferParameteriv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3209,9 +3143,7 @@ struct GetError { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); @@ -3229,10 +3161,8 @@ struct GetError { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(GetError) == 12, - Sizeof_GetError_is_not_12); -COMPILE_ASSERT(offsetof(GetError, header) == 0, - OffsetOf_GetError_header_not_0); +COMPILE_ASSERT(sizeof(GetError) == 12, Sizeof_GetError_is_not_12); +COMPILE_ASSERT(offsetof(GetError, header) == 0, OffsetOf_GetError_header_not_0); COMPILE_ASSERT(offsetof(GetError, result_shm_id) == 4, OffsetOf_GetError_result_shm_id_not_4); COMPILE_ASSERT(offsetof(GetError, result_shm_offset) == 8, @@ -3250,9 +3180,7 @@ struct GetFloatv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) { SetHeader(); @@ -3261,11 +3189,12 @@ struct GetFloatv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3275,12 +3204,10 @@ struct GetFloatv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(GetFloatv) == 16, - Sizeof_GetFloatv_is_not_16); +COMPILE_ASSERT(sizeof(GetFloatv) == 16, Sizeof_GetFloatv_is_not_16); COMPILE_ASSERT(offsetof(GetFloatv, header) == 0, OffsetOf_GetFloatv_header_not_0); -COMPILE_ASSERT(offsetof(GetFloatv, pname) == 4, - OffsetOf_GetFloatv_pname_not_4); +COMPILE_ASSERT(offsetof(GetFloatv, pname) == 4, OffsetOf_GetFloatv_pname_not_4); COMPILE_ASSERT(offsetof(GetFloatv, params_shm_id) == 8, OffsetOf_GetFloatv_params_shm_id_not_8); COMPILE_ASSERT(offsetof(GetFloatv, params_shm_offset) == 12, @@ -3298,13 +3225,13 @@ struct GetFramebufferAttachmentParameteriv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _attachment, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLenum _target, + GLenum _attachment, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); target = _target; attachment = _attachment; @@ -3313,12 +3240,14 @@ struct GetFramebufferAttachmentParameteriv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLenum _attachment, GLenum _pname, - uint32 _params_shm_id, uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _target, _attachment, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLenum _attachment, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd)->Init( + _target, _attachment, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3342,10 +3271,10 @@ COMPILE_ASSERT(offsetof(GetFramebufferAttachmentParameteriv, pname) == 12, OffsetOf_GetFramebufferAttachmentParameteriv_pname_not_12); COMPILE_ASSERT( offsetof(GetFramebufferAttachmentParameteriv, params_shm_id) == 16, - OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16); // NOLINT + OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_id_not_16); // NOLINT COMPILE_ASSERT( offsetof(GetFramebufferAttachmentParameteriv, params_shm_offset) == 20, - OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20); // NOLINT + OffsetOf_GetFramebufferAttachmentParameteriv_params_shm_offset_not_20); // NOLINT struct GetIntegerv { typedef GetIntegerv ValueType; @@ -3359,9 +3288,7 @@ struct GetIntegerv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _pname, uint32 _params_shm_id, uint32 _params_shm_offset) { SetHeader(); @@ -3370,11 +3297,12 @@ struct GetIntegerv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3384,8 +3312,7 @@ struct GetIntegerv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(GetIntegerv) == 16, - Sizeof_GetIntegerv_is_not_16); +COMPILE_ASSERT(sizeof(GetIntegerv) == 16, Sizeof_GetIntegerv_is_not_16); COMPILE_ASSERT(offsetof(GetIntegerv, header) == 0, OffsetOf_GetIntegerv_header_not_0); COMPILE_ASSERT(offsetof(GetIntegerv, pname) == 4, @@ -3407,13 +3334,12 @@ struct GetProgramiv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLuint _program, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); program = _program; pname = _pname; @@ -3421,11 +3347,13 @@ struct GetProgramiv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLuint _program, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_program, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLuint _program, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_program, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3436,8 +3364,7 @@ struct GetProgramiv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(GetProgramiv) == 20, - Sizeof_GetProgramiv_is_not_20); +COMPILE_ASSERT(sizeof(GetProgramiv) == 20, Sizeof_GetProgramiv_is_not_20); COMPILE_ASSERT(offsetof(GetProgramiv, header) == 0, OffsetOf_GetProgramiv_header_not_0); COMPILE_ASSERT(offsetof(GetProgramiv, program) == 4, @@ -3459,9 +3386,7 @@ struct GetProgramInfoLog { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program, uint32 _bucket_id) { SetHeader(); @@ -3500,13 +3425,12 @@ struct GetRenderbufferParameteriv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); target = _target; pname = _pname; @@ -3514,11 +3438,13 @@ struct GetRenderbufferParameteriv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3554,13 +3480,12 @@ struct GetShaderiv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _shader, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLuint _shader, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); shader = _shader; pname = _pname; @@ -3568,11 +3493,13 @@ struct GetShaderiv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLuint _shader, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_shader, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLuint _shader, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_shader, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3583,8 +3510,7 @@ struct GetShaderiv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(GetShaderiv) == 20, - Sizeof_GetShaderiv_is_not_20); +COMPILE_ASSERT(sizeof(GetShaderiv) == 20, Sizeof_GetShaderiv_is_not_20); COMPILE_ASSERT(offsetof(GetShaderiv, header) == 0, OffsetOf_GetShaderiv_header_not_0); COMPILE_ASSERT(offsetof(GetShaderiv, shader) == 4, @@ -3606,9 +3532,7 @@ struct GetShaderInfoLog { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _shader, uint32 _bucket_id) { SetHeader(); @@ -3652,13 +3576,12 @@ struct GetShaderPrecisionFormat { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _shadertype, GLenum _precisiontype, uint32 _result_shm_id, - uint32 _result_shm_offset) { + void Init(GLenum _shadertype, + GLenum _precisiontype, + uint32 _result_shm_id, + uint32 _result_shm_offset) { SetHeader(); shadertype = _shadertype; precisiontype = _precisiontype; @@ -3666,12 +3589,13 @@ struct GetShaderPrecisionFormat { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLenum _shadertype, GLenum _precisiontype, - uint32 _result_shm_id, uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _shadertype, _precisiontype, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLenum _shadertype, + GLenum _precisiontype, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_shadertype, _precisiontype, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3713,9 +3637,7 @@ struct GetShaderSource { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _shader, uint32 _bucket_id) { SetHeader(); @@ -3733,8 +3655,7 @@ struct GetShaderSource { uint32 bucket_id; }; -COMPILE_ASSERT(sizeof(GetShaderSource) == 12, - Sizeof_GetShaderSource_is_not_12); +COMPILE_ASSERT(sizeof(GetShaderSource) == 12, Sizeof_GetShaderSource_is_not_12); COMPILE_ASSERT(offsetof(GetShaderSource, header) == 0, OffsetOf_GetShaderSource_header_not_0); COMPILE_ASSERT(offsetof(GetShaderSource, shader) == 4, @@ -3752,9 +3673,7 @@ struct GetString { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _name, uint32 _bucket_id) { SetHeader(); @@ -3772,12 +3691,10 @@ struct GetString { uint32 bucket_id; }; -COMPILE_ASSERT(sizeof(GetString) == 12, - Sizeof_GetString_is_not_12); +COMPILE_ASSERT(sizeof(GetString) == 12, Sizeof_GetString_is_not_12); COMPILE_ASSERT(offsetof(GetString, header) == 0, OffsetOf_GetString_header_not_0); -COMPILE_ASSERT(offsetof(GetString, name) == 4, - OffsetOf_GetString_name_not_4); +COMPILE_ASSERT(offsetof(GetString, name) == 4, OffsetOf_GetString_name_not_4); COMPILE_ASSERT(offsetof(GetString, bucket_id) == 8, OffsetOf_GetString_bucket_id_not_8); @@ -3793,13 +3710,12 @@ struct GetTexParameterfv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); target = _target; pname = _pname; @@ -3807,11 +3723,13 @@ struct GetTexParameterfv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3847,13 +3765,12 @@ struct GetTexParameteriv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); target = _target; pname = _pname; @@ -3861,11 +3778,13 @@ struct GetTexParameteriv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3901,13 +3820,12 @@ struct GetUniformfv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, GLint _location, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLuint _program, + GLint _location, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); program = _program; location = _location; @@ -3915,11 +3833,13 @@ struct GetUniformfv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLuint _program, GLint _location, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_program, _location, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLuint _program, + GLint _location, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_program, _location, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3930,8 +3850,7 @@ struct GetUniformfv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(GetUniformfv) == 20, - Sizeof_GetUniformfv_is_not_20); +COMPILE_ASSERT(sizeof(GetUniformfv) == 20, Sizeof_GetUniformfv_is_not_20); COMPILE_ASSERT(offsetof(GetUniformfv, header) == 0, OffsetOf_GetUniformfv_header_not_0); COMPILE_ASSERT(offsetof(GetUniformfv, program) == 4, @@ -3955,13 +3874,12 @@ struct GetUniformiv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, GLint _location, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLuint _program, + GLint _location, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); program = _program; location = _location; @@ -3969,11 +3887,13 @@ struct GetUniformiv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLuint _program, GLint _location, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_program, _location, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLuint _program, + GLint _location, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_program, _location, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -3984,8 +3904,7 @@ struct GetUniformiv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(GetUniformiv) == 20, - Sizeof_GetUniformiv_is_not_20); +COMPILE_ASSERT(sizeof(GetUniformiv) == 20, Sizeof_GetUniformiv_is_not_20); COMPILE_ASSERT(offsetof(GetUniformiv, header) == 0, OffsetOf_GetUniformiv_header_not_0); COMPILE_ASSERT(offsetof(GetUniformiv, program) == 4, @@ -4009,13 +3928,12 @@ struct GetVertexAttribfv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _index, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLuint _index, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); index = _index; pname = _pname; @@ -4023,11 +3941,13 @@ struct GetVertexAttribfv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLuint _index, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_index, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLuint _index, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_index, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4063,13 +3983,12 @@ struct GetVertexAttribiv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _index, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLuint _index, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); index = _index; pname = _pname; @@ -4077,11 +3996,13 @@ struct GetVertexAttribiv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLuint _index, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_index, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLuint _index, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_index, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4117,13 +4038,12 @@ struct GetVertexAttribPointerv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _index, GLenum _pname, uint32 _pointer_shm_id, - uint32 _pointer_shm_offset) { + void Init(GLuint _index, + GLenum _pname, + uint32 _pointer_shm_id, + uint32 _pointer_shm_offset) { SetHeader(); index = _index; pname = _pname; @@ -4131,11 +4051,13 @@ struct GetVertexAttribPointerv { pointer_shm_offset = _pointer_shm_offset; } - void* Set( - void* cmd, GLuint _index, GLenum _pname, uint32 _pointer_shm_id, - uint32 _pointer_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset); + void* Set(void* cmd, + GLuint _index, + GLenum _pname, + uint32 _pointer_shm_id, + uint32 _pointer_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_index, _pname, _pointer_shm_id, _pointer_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4169,9 +4091,7 @@ struct Hint { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLenum _mode) { SetHeader(); @@ -4189,14 +4109,10 @@ struct Hint { uint32 mode; }; -COMPILE_ASSERT(sizeof(Hint) == 12, - Sizeof_Hint_is_not_12); -COMPILE_ASSERT(offsetof(Hint, header) == 0, - OffsetOf_Hint_header_not_0); -COMPILE_ASSERT(offsetof(Hint, target) == 4, - OffsetOf_Hint_target_not_4); -COMPILE_ASSERT(offsetof(Hint, mode) == 8, - OffsetOf_Hint_mode_not_8); +COMPILE_ASSERT(sizeof(Hint) == 12, Sizeof_Hint_is_not_12); +COMPILE_ASSERT(offsetof(Hint, header) == 0, OffsetOf_Hint_header_not_0); +COMPILE_ASSERT(offsetof(Hint, target) == 4, OffsetOf_Hint_target_not_4); +COMPILE_ASSERT(offsetof(Hint, mode) == 8, OffsetOf_Hint_mode_not_8); struct IsBuffer { typedef IsBuffer ValueType; @@ -4210,9 +4126,7 @@ struct IsBuffer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _buffer, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); @@ -4221,11 +4135,12 @@ struct IsBuffer { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _buffer, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_buffer, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _buffer, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_buffer, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4235,12 +4150,9 @@ struct IsBuffer { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(IsBuffer) == 16, - Sizeof_IsBuffer_is_not_16); -COMPILE_ASSERT(offsetof(IsBuffer, header) == 0, - OffsetOf_IsBuffer_header_not_0); -COMPILE_ASSERT(offsetof(IsBuffer, buffer) == 4, - OffsetOf_IsBuffer_buffer_not_4); +COMPILE_ASSERT(sizeof(IsBuffer) == 16, Sizeof_IsBuffer_is_not_16); +COMPILE_ASSERT(offsetof(IsBuffer, header) == 0, OffsetOf_IsBuffer_header_not_0); +COMPILE_ASSERT(offsetof(IsBuffer, buffer) == 4, OffsetOf_IsBuffer_buffer_not_4); COMPILE_ASSERT(offsetof(IsBuffer, result_shm_id) == 8, OffsetOf_IsBuffer_result_shm_id_not_8); COMPILE_ASSERT(offsetof(IsBuffer, result_shm_offset) == 12, @@ -4258,9 +4170,7 @@ struct IsEnabled { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _cap, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); @@ -4269,11 +4179,12 @@ struct IsEnabled { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLenum _cap, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_cap, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLenum _cap, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_cap, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4283,12 +4194,10 @@ struct IsEnabled { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(IsEnabled) == 16, - Sizeof_IsEnabled_is_not_16); +COMPILE_ASSERT(sizeof(IsEnabled) == 16, Sizeof_IsEnabled_is_not_16); COMPILE_ASSERT(offsetof(IsEnabled, header) == 0, OffsetOf_IsEnabled_header_not_0); -COMPILE_ASSERT(offsetof(IsEnabled, cap) == 4, - OffsetOf_IsEnabled_cap_not_4); +COMPILE_ASSERT(offsetof(IsEnabled, cap) == 4, OffsetOf_IsEnabled_cap_not_4); COMPILE_ASSERT(offsetof(IsEnabled, result_shm_id) == 8, OffsetOf_IsEnabled_result_shm_id_not_8); COMPILE_ASSERT(offsetof(IsEnabled, result_shm_offset) == 12, @@ -4306,23 +4215,23 @@ struct IsFramebuffer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _framebuffer, uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _framebuffer, + uint32 _result_shm_id, + uint32 _result_shm_offset) { SetHeader(); framebuffer = _framebuffer; result_shm_id = _result_shm_id; result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _framebuffer, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_framebuffer, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _framebuffer, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_framebuffer, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4332,8 +4241,7 @@ struct IsFramebuffer { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(IsFramebuffer) == 16, - Sizeof_IsFramebuffer_is_not_16); +COMPILE_ASSERT(sizeof(IsFramebuffer) == 16, Sizeof_IsFramebuffer_is_not_16); COMPILE_ASSERT(offsetof(IsFramebuffer, header) == 0, OffsetOf_IsFramebuffer_header_not_0); COMPILE_ASSERT(offsetof(IsFramebuffer, framebuffer) == 4, @@ -4355,23 +4263,21 @@ struct IsProgram { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _program, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); program = _program; result_shm_id = _result_shm_id; result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _program, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_program, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _program, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_program, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4381,8 +4287,7 @@ struct IsProgram { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(IsProgram) == 16, - Sizeof_IsProgram_is_not_16); +COMPILE_ASSERT(sizeof(IsProgram) == 16, Sizeof_IsProgram_is_not_16); COMPILE_ASSERT(offsetof(IsProgram, header) == 0, OffsetOf_IsProgram_header_not_0); COMPILE_ASSERT(offsetof(IsProgram, program) == 4, @@ -4404,23 +4309,23 @@ struct IsRenderbuffer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _renderbuffer, uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _renderbuffer, + uint32 _result_shm_id, + uint32 _result_shm_offset) { SetHeader(); renderbuffer = _renderbuffer; result_shm_id = _result_shm_id; result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _renderbuffer, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_renderbuffer, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _renderbuffer, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_renderbuffer, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4430,8 +4335,7 @@ struct IsRenderbuffer { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16, - Sizeof_IsRenderbuffer_is_not_16); +COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16, Sizeof_IsRenderbuffer_is_not_16); COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0, OffsetOf_IsRenderbuffer_header_not_0); COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4, @@ -4453,9 +4357,7 @@ struct IsShader { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _shader, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); @@ -4464,11 +4366,12 @@ struct IsShader { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _shader, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_shader, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _shader, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_shader, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4478,12 +4381,9 @@ struct IsShader { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(IsShader) == 16, - Sizeof_IsShader_is_not_16); -COMPILE_ASSERT(offsetof(IsShader, header) == 0, - OffsetOf_IsShader_header_not_0); -COMPILE_ASSERT(offsetof(IsShader, shader) == 4, - OffsetOf_IsShader_shader_not_4); +COMPILE_ASSERT(sizeof(IsShader) == 16, Sizeof_IsShader_is_not_16); +COMPILE_ASSERT(offsetof(IsShader, header) == 0, OffsetOf_IsShader_header_not_0); +COMPILE_ASSERT(offsetof(IsShader, shader) == 4, OffsetOf_IsShader_shader_not_4); COMPILE_ASSERT(offsetof(IsShader, result_shm_id) == 8, OffsetOf_IsShader_result_shm_id_not_8); COMPILE_ASSERT(offsetof(IsShader, result_shm_offset) == 12, @@ -4501,23 +4401,21 @@ struct IsTexture { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _texture, uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _texture, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); texture = _texture; result_shm_id = _result_shm_id; result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _texture, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_texture, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _texture, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_texture, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -4527,8 +4425,7 @@ struct IsTexture { uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(IsTexture) == 16, - Sizeof_IsTexture_is_not_16); +COMPILE_ASSERT(sizeof(IsTexture) == 16, Sizeof_IsTexture_is_not_16); COMPILE_ASSERT(offsetof(IsTexture, header) == 0, OffsetOf_IsTexture_header_not_0); COMPILE_ASSERT(offsetof(IsTexture, texture) == 4, @@ -4548,9 +4445,7 @@ struct LineWidth { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLfloat _width) { SetHeader(); @@ -4566,12 +4461,10 @@ struct LineWidth { float width; }; -COMPILE_ASSERT(sizeof(LineWidth) == 8, - Sizeof_LineWidth_is_not_8); +COMPILE_ASSERT(sizeof(LineWidth) == 8, Sizeof_LineWidth_is_not_8); COMPILE_ASSERT(offsetof(LineWidth, header) == 0, OffsetOf_LineWidth_header_not_0); -COMPILE_ASSERT(offsetof(LineWidth, width) == 4, - OffsetOf_LineWidth_width_not_4); +COMPILE_ASSERT(offsetof(LineWidth, width) == 4, OffsetOf_LineWidth_width_not_4); struct LinkProgram { typedef LinkProgram ValueType; @@ -4583,9 +4476,7 @@ struct LinkProgram { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program) { SetHeader(); @@ -4601,8 +4492,7 @@ struct LinkProgram { uint32 program; }; -COMPILE_ASSERT(sizeof(LinkProgram) == 8, - Sizeof_LinkProgram_is_not_8); +COMPILE_ASSERT(sizeof(LinkProgram) == 8, Sizeof_LinkProgram_is_not_8); COMPILE_ASSERT(offsetof(LinkProgram, header) == 0, OffsetOf_LinkProgram_header_not_0); COMPILE_ASSERT(offsetof(LinkProgram, program) == 4, @@ -4618,9 +4508,7 @@ struct PixelStorei { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _pname, GLint _param) { SetHeader(); @@ -4638,8 +4526,7 @@ struct PixelStorei { int32 param; }; -COMPILE_ASSERT(sizeof(PixelStorei) == 12, - Sizeof_PixelStorei_is_not_12); +COMPILE_ASSERT(sizeof(PixelStorei) == 12, Sizeof_PixelStorei_is_not_12); COMPILE_ASSERT(offsetof(PixelStorei, header) == 0, OffsetOf_PixelStorei_header_not_0); COMPILE_ASSERT(offsetof(PixelStorei, pname) == 4, @@ -4657,9 +4544,7 @@ struct PolygonOffset { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLfloat _factor, GLfloat _units) { SetHeader(); @@ -4677,8 +4562,7 @@ struct PolygonOffset { float units; }; -COMPILE_ASSERT(sizeof(PolygonOffset) == 12, - Sizeof_PolygonOffset_is_not_12); +COMPILE_ASSERT(sizeof(PolygonOffset) == 12, Sizeof_PolygonOffset_is_not_12); COMPILE_ASSERT(offsetof(PolygonOffset, header) == 0, OffsetOf_PolygonOffset_header_not_0); COMPILE_ASSERT(offsetof(PolygonOffset, factor) == 4, @@ -4701,14 +4585,19 @@ struct ReadPixels { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _x, GLint _y, GLsizei _width, GLsizei _height, GLenum _format, - GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset, - uint32 _result_shm_id, uint32 _result_shm_offset, GLboolean _async) { + void Init(GLint _x, + GLint _y, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset, + uint32 _result_shm_id, + uint32 _result_shm_offset, + GLboolean _async) { SetHeader(); x = _x; y = _y; @@ -4723,15 +4612,29 @@ struct ReadPixels { async = _async; } - void* Set( - void* cmd, GLint _x, GLint _y, GLsizei _width, GLsizei _height, - GLenum _format, GLenum _type, uint32 _pixels_shm_id, - uint32 _pixels_shm_offset, uint32 _result_shm_id, - uint32 _result_shm_offset, GLboolean _async) { - static_cast<ValueType*>( - cmd)->Init( - _x, _y, _width, _height, _format, _type, _pixels_shm_id, - _pixels_shm_offset, _result_shm_id, _result_shm_offset, _async); + void* Set(void* cmd, + GLint _x, + GLint _y, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset, + uint32 _result_shm_id, + uint32 _result_shm_offset, + GLboolean _async) { + static_cast<ValueType*>(cmd)->Init(_x, + _y, + _width, + _height, + _format, + _type, + _pixels_shm_id, + _pixels_shm_offset, + _result_shm_id, + _result_shm_offset, + _async); return NextCmdAddress<ValueType>(cmd); } @@ -4749,14 +4652,11 @@ struct ReadPixels { uint32 async; }; -COMPILE_ASSERT(sizeof(ReadPixels) == 48, - Sizeof_ReadPixels_is_not_48); +COMPILE_ASSERT(sizeof(ReadPixels) == 48, Sizeof_ReadPixels_is_not_48); COMPILE_ASSERT(offsetof(ReadPixels, header) == 0, OffsetOf_ReadPixels_header_not_0); -COMPILE_ASSERT(offsetof(ReadPixels, x) == 4, - OffsetOf_ReadPixels_x_not_4); -COMPILE_ASSERT(offsetof(ReadPixels, y) == 8, - OffsetOf_ReadPixels_y_not_8); +COMPILE_ASSERT(offsetof(ReadPixels, x) == 4, OffsetOf_ReadPixels_x_not_4); +COMPILE_ASSERT(offsetof(ReadPixels, y) == 8, OffsetOf_ReadPixels_y_not_8); COMPILE_ASSERT(offsetof(ReadPixels, width) == 12, OffsetOf_ReadPixels_width_not_12); COMPILE_ASSERT(offsetof(ReadPixels, height) == 16, @@ -4786,13 +4686,9 @@ struct ReleaseShaderCompiler { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init() { - SetHeader(); - } + void Init() { SetHeader(); } void* Set(void* cmd) { static_cast<ValueType*>(cmd)->Init(); @@ -4817,13 +4713,12 @@ struct RenderbufferStorage { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _internalformat, GLsizei _width, - GLsizei _height) { + void Init(GLenum _target, + GLenum _internalformat, + GLsizei _width, + GLsizei _height) { SetHeader(); target = _target; internalformat = _internalformat; @@ -4831,11 +4726,13 @@ struct RenderbufferStorage { height = _height; } - void* Set( - void* cmd, GLenum _target, GLenum _internalformat, GLsizei _width, - GLsizei _height) { - static_cast<ValueType*>( - cmd)->Init(_target, _internalformat, _width, _height); + void* Set(void* cmd, + GLenum _target, + GLenum _internalformat, + GLsizei _width, + GLsizei _height) { + static_cast<ValueType*>(cmd) + ->Init(_target, _internalformat, _width, _height); return NextCmdAddress<ValueType>(cmd); } @@ -4869,9 +4766,7 @@ struct SampleCoverage { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLclampf _value, GLboolean _invert) { SetHeader(); @@ -4889,8 +4784,7 @@ struct SampleCoverage { uint32 invert; }; -COMPILE_ASSERT(sizeof(SampleCoverage) == 12, - Sizeof_SampleCoverage_is_not_12); +COMPILE_ASSERT(sizeof(SampleCoverage) == 12, Sizeof_SampleCoverage_is_not_12); COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0, OffsetOf_SampleCoverage_header_not_0); COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4, @@ -4908,9 +4802,7 @@ struct Scissor { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) { SetHeader(); @@ -4932,18 +4824,12 @@ struct Scissor { int32 height; }; -COMPILE_ASSERT(sizeof(Scissor) == 20, - Sizeof_Scissor_is_not_20); -COMPILE_ASSERT(offsetof(Scissor, header) == 0, - OffsetOf_Scissor_header_not_0); -COMPILE_ASSERT(offsetof(Scissor, x) == 4, - OffsetOf_Scissor_x_not_4); -COMPILE_ASSERT(offsetof(Scissor, y) == 8, - OffsetOf_Scissor_y_not_8); -COMPILE_ASSERT(offsetof(Scissor, width) == 12, - OffsetOf_Scissor_width_not_12); -COMPILE_ASSERT(offsetof(Scissor, height) == 16, - OffsetOf_Scissor_height_not_16); +COMPILE_ASSERT(sizeof(Scissor) == 20, Sizeof_Scissor_is_not_20); +COMPILE_ASSERT(offsetof(Scissor, header) == 0, OffsetOf_Scissor_header_not_0); +COMPILE_ASSERT(offsetof(Scissor, x) == 4, OffsetOf_Scissor_x_not_4); +COMPILE_ASSERT(offsetof(Scissor, y) == 8, OffsetOf_Scissor_y_not_8); +COMPILE_ASSERT(offsetof(Scissor, width) == 12, OffsetOf_Scissor_width_not_12); +COMPILE_ASSERT(offsetof(Scissor, height) == 16, OffsetOf_Scissor_height_not_16); struct ShaderBinary { typedef ShaderBinary ValueType; @@ -4955,14 +4841,15 @@ struct ShaderBinary { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLsizei _n, uint32 _shaders_shm_id, uint32 _shaders_shm_offset, - GLenum _binaryformat, uint32 _binary_shm_id, uint32 _binary_shm_offset, - GLsizei _length) { + void Init(GLsizei _n, + uint32 _shaders_shm_id, + uint32 _shaders_shm_offset, + GLenum _binaryformat, + uint32 _binary_shm_id, + uint32 _binary_shm_offset, + GLsizei _length) { SetHeader(); n = _n; shaders_shm_id = _shaders_shm_id; @@ -4973,14 +4860,21 @@ struct ShaderBinary { length = _length; } - void* Set( - void* cmd, GLsizei _n, uint32 _shaders_shm_id, uint32 _shaders_shm_offset, - GLenum _binaryformat, uint32 _binary_shm_id, uint32 _binary_shm_offset, - GLsizei _length) { - static_cast<ValueType*>( - cmd)->Init( - _n, _shaders_shm_id, _shaders_shm_offset, _binaryformat, - _binary_shm_id, _binary_shm_offset, _length); + void* Set(void* cmd, + GLsizei _n, + uint32 _shaders_shm_id, + uint32 _shaders_shm_offset, + GLenum _binaryformat, + uint32 _binary_shm_id, + uint32 _binary_shm_offset, + GLsizei _length) { + static_cast<ValueType*>(cmd)->Init(_n, + _shaders_shm_id, + _shaders_shm_offset, + _binaryformat, + _binary_shm_id, + _binary_shm_offset, + _length); return NextCmdAddress<ValueType>(cmd); } @@ -4994,12 +4888,10 @@ struct ShaderBinary { int32 length; }; -COMPILE_ASSERT(sizeof(ShaderBinary) == 32, - Sizeof_ShaderBinary_is_not_32); +COMPILE_ASSERT(sizeof(ShaderBinary) == 32, Sizeof_ShaderBinary_is_not_32); COMPILE_ASSERT(offsetof(ShaderBinary, header) == 0, OffsetOf_ShaderBinary_header_not_0); -COMPILE_ASSERT(offsetof(ShaderBinary, n) == 4, - OffsetOf_ShaderBinary_n_not_4); +COMPILE_ASSERT(offsetof(ShaderBinary, n) == 4, OffsetOf_ShaderBinary_n_not_4); COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_id) == 8, OffsetOf_ShaderBinary_shaders_shm_id_not_8); COMPILE_ASSERT(offsetof(ShaderBinary, shaders_shm_offset) == 12, @@ -5023,13 +4915,12 @@ struct ShaderSource { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _shader, uint32 _data_shm_id, uint32 _data_shm_offset, - uint32 _data_size) { + void Init(GLuint _shader, + uint32 _data_shm_id, + uint32 _data_shm_offset, + uint32 _data_size) { SetHeader(); shader = _shader; data_shm_id = _data_shm_id; @@ -5037,11 +4928,13 @@ struct ShaderSource { data_size = _data_size; } - void* Set( - void* cmd, GLuint _shader, uint32 _data_shm_id, uint32 _data_shm_offset, - uint32 _data_size) { - static_cast<ValueType*>( - cmd)->Init(_shader, _data_shm_id, _data_shm_offset, _data_size); + void* Set(void* cmd, + GLuint _shader, + uint32 _data_shm_id, + uint32 _data_shm_offset, + uint32 _data_size) { + static_cast<ValueType*>(cmd) + ->Init(_shader, _data_shm_id, _data_shm_offset, _data_size); return NextCmdAddress<ValueType>(cmd); } @@ -5052,8 +4945,7 @@ struct ShaderSource { uint32 data_size; }; -COMPILE_ASSERT(sizeof(ShaderSource) == 20, - Sizeof_ShaderSource_is_not_20); +COMPILE_ASSERT(sizeof(ShaderSource) == 20, Sizeof_ShaderSource_is_not_20); COMPILE_ASSERT(offsetof(ShaderSource, header) == 0, OffsetOf_ShaderSource_header_not_0); COMPILE_ASSERT(offsetof(ShaderSource, shader) == 4, @@ -5075,9 +4967,7 @@ struct ShaderSourceBucket { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _shader, uint32 _data_bucket_id) { SetHeader(); @@ -5114,9 +5004,7 @@ struct StencilFunc { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _func, GLint _ref, GLuint _mask) { SetHeader(); @@ -5136,14 +5024,12 @@ struct StencilFunc { uint32 mask; }; -COMPILE_ASSERT(sizeof(StencilFunc) == 16, - Sizeof_StencilFunc_is_not_16); +COMPILE_ASSERT(sizeof(StencilFunc) == 16, Sizeof_StencilFunc_is_not_16); COMPILE_ASSERT(offsetof(StencilFunc, header) == 0, OffsetOf_StencilFunc_header_not_0); COMPILE_ASSERT(offsetof(StencilFunc, func) == 4, OffsetOf_StencilFunc_func_not_4); -COMPILE_ASSERT(offsetof(StencilFunc, ref) == 8, - OffsetOf_StencilFunc_ref_not_8); +COMPILE_ASSERT(offsetof(StencilFunc, ref) == 8, OffsetOf_StencilFunc_ref_not_8); COMPILE_ASSERT(offsetof(StencilFunc, mask) == 12, OffsetOf_StencilFunc_mask_not_12); @@ -5157,9 +5043,7 @@ struct StencilFuncSeparate { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _face, GLenum _func, GLint _ref, GLuint _mask) { SetHeader(); @@ -5204,9 +5088,7 @@ struct StencilMask { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _mask) { SetHeader(); @@ -5222,8 +5104,7 @@ struct StencilMask { uint32 mask; }; -COMPILE_ASSERT(sizeof(StencilMask) == 8, - Sizeof_StencilMask_is_not_8); +COMPILE_ASSERT(sizeof(StencilMask) == 8, Sizeof_StencilMask_is_not_8); COMPILE_ASSERT(offsetof(StencilMask, header) == 0, OffsetOf_StencilMask_header_not_0); COMPILE_ASSERT(offsetof(StencilMask, mask) == 4, @@ -5239,9 +5120,7 @@ struct StencilMaskSeparate { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _face, GLuint _mask) { SetHeader(); @@ -5278,9 +5157,7 @@ struct StencilOp { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _fail, GLenum _zfail, GLenum _zpass) { SetHeader(); @@ -5300,14 +5177,11 @@ struct StencilOp { uint32 zpass; }; -COMPILE_ASSERT(sizeof(StencilOp) == 16, - Sizeof_StencilOp_is_not_16); +COMPILE_ASSERT(sizeof(StencilOp) == 16, Sizeof_StencilOp_is_not_16); COMPILE_ASSERT(offsetof(StencilOp, header) == 0, OffsetOf_StencilOp_header_not_0); -COMPILE_ASSERT(offsetof(StencilOp, fail) == 4, - OffsetOf_StencilOp_fail_not_4); -COMPILE_ASSERT(offsetof(StencilOp, zfail) == 8, - OffsetOf_StencilOp_zfail_not_8); +COMPILE_ASSERT(offsetof(StencilOp, fail) == 4, OffsetOf_StencilOp_fail_not_4); +COMPILE_ASSERT(offsetof(StencilOp, zfail) == 8, OffsetOf_StencilOp_zfail_not_8); COMPILE_ASSERT(offsetof(StencilOp, zpass) == 12, OffsetOf_StencilOp_zpass_not_12); @@ -5321,9 +5195,7 @@ struct StencilOpSeparate { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) { SetHeader(); @@ -5333,8 +5205,11 @@ struct StencilOpSeparate { zpass = _zpass; } - void* Set( - void* cmd, GLenum _face, GLenum _fail, GLenum _zfail, GLenum _zpass) { + void* Set(void* cmd, + GLenum _face, + GLenum _fail, + GLenum _zfail, + GLenum _zpass) { static_cast<ValueType*>(cmd)->Init(_face, _fail, _zfail, _zpass); return NextCmdAddress<ValueType>(cmd); } @@ -5369,14 +5244,18 @@ struct TexImage2D { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLint _internalformat, GLsizei _width, - GLsizei _height, GLint _border, GLenum _format, GLenum _type, - uint32 _pixels_shm_id, uint32 _pixels_shm_offset) { + void Init(GLenum _target, + GLint _level, + GLint _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset) { SetHeader(); target = _target; level = _level; @@ -5390,14 +5269,27 @@ struct TexImage2D { pixels_shm_offset = _pixels_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _internalformat, - GLsizei _width, GLsizei _height, GLint _border, GLenum _format, - GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _width, _height, _border, _format, - _type, _pixels_shm_id, _pixels_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLint _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset) { + static_cast<ValueType*>(cmd)->Init(_target, + _level, + _internalformat, + _width, + _height, + _border, + _format, + _type, + _pixels_shm_id, + _pixels_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -5414,8 +5306,7 @@ struct TexImage2D { uint32 pixels_shm_offset; }; -COMPILE_ASSERT(sizeof(TexImage2D) == 44, - Sizeof_TexImage2D_is_not_44); +COMPILE_ASSERT(sizeof(TexImage2D) == 44, Sizeof_TexImage2D_is_not_44); COMPILE_ASSERT(offsetof(TexImage2D, header) == 0, OffsetOf_TexImage2D_header_not_0); COMPILE_ASSERT(offsetof(TexImage2D, target) == 4, @@ -5449,9 +5340,7 @@ struct TexParameterf { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLenum _pname, GLfloat _param) { SetHeader(); @@ -5471,8 +5360,7 @@ struct TexParameterf { float param; }; -COMPILE_ASSERT(sizeof(TexParameterf) == 16, - Sizeof_TexParameterf_is_not_16); +COMPILE_ASSERT(sizeof(TexParameterf) == 16, Sizeof_TexParameterf_is_not_16); COMPILE_ASSERT(offsetof(TexParameterf, header) == 0, OffsetOf_TexParameterf_header_not_0); COMPILE_ASSERT(offsetof(TexParameterf, target) == 4, @@ -5492,13 +5380,12 @@ struct TexParameterfv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); target = _target; pname = _pname; @@ -5506,11 +5393,13 @@ struct TexParameterfv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -5521,8 +5410,7 @@ struct TexParameterfv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(TexParameterfv) == 20, - Sizeof_TexParameterfv_is_not_20); +COMPILE_ASSERT(sizeof(TexParameterfv) == 20, Sizeof_TexParameterfv_is_not_20); COMPILE_ASSERT(offsetof(TexParameterfv, header) == 0, OffsetOf_TexParameterfv_header_not_0); COMPILE_ASSERT(offsetof(TexParameterfv, target) == 4, @@ -5541,25 +5429,21 @@ struct TexParameterfvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLfloat) * 1); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 1); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLenum _target, GLenum _pname, const GLfloat* _params) { SetHeader(); target = _target; pname = _pname; - memcpy(ImmediateDataAddress(this), - _params, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _params, ComputeDataSize()); } void* Set(void* cmd, GLenum _target, GLenum _pname, const GLfloat* _params) { @@ -5592,9 +5476,7 @@ struct TexParameteri { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLenum _pname, GLint _param) { SetHeader(); @@ -5614,8 +5496,7 @@ struct TexParameteri { int32 param; }; -COMPILE_ASSERT(sizeof(TexParameteri) == 16, - Sizeof_TexParameteri_is_not_16); +COMPILE_ASSERT(sizeof(TexParameteri) == 16, Sizeof_TexParameteri_is_not_16); COMPILE_ASSERT(offsetof(TexParameteri, header) == 0, OffsetOf_TexParameteri_header_not_0); COMPILE_ASSERT(offsetof(TexParameteri, target) == 4, @@ -5635,13 +5516,12 @@ struct TexParameteriv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { + void Init(GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { SetHeader(); target = _target; pname = _pname; @@ -5649,11 +5529,13 @@ struct TexParameteriv { params_shm_offset = _params_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLenum _pname, uint32 _params_shm_id, - uint32 _params_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _pname, _params_shm_id, _params_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLenum _pname, + uint32 _params_shm_id, + uint32 _params_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _pname, _params_shm_id, _params_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -5664,8 +5546,7 @@ struct TexParameteriv { uint32 params_shm_offset; }; -COMPILE_ASSERT(sizeof(TexParameteriv) == 20, - Sizeof_TexParameteriv_is_not_20); +COMPILE_ASSERT(sizeof(TexParameteriv) == 20, Sizeof_TexParameteriv_is_not_20); COMPILE_ASSERT(offsetof(TexParameteriv, header) == 0, OffsetOf_TexParameteriv_header_not_0); COMPILE_ASSERT(offsetof(TexParameteriv, target) == 4, @@ -5684,25 +5565,21 @@ struct TexParameterivImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLint) * 1); // NOLINT + return static_cast<uint32>(sizeof(GLint) * 1); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLenum _target, GLenum _pname, const GLint* _params) { SetHeader(); target = _target; pname = _pname; - memcpy(ImmediateDataAddress(this), - _params, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _params, ComputeDataSize()); } void* Set(void* cmd, GLenum _target, GLenum _pname, const GLint* _params) { @@ -5735,14 +5612,19 @@ struct TexSubImage2D { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - uint32 _pixels_shm_id, uint32 _pixels_shm_offset, GLboolean _internal) { + void Init(GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset, + GLboolean _internal) { SetHeader(); target = _target; level = _level; @@ -5757,14 +5639,29 @@ struct TexSubImage2D { internal = _internal; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - uint32 _pixels_shm_id, uint32 _pixels_shm_offset, GLboolean _internal) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _width, _height, _format, - _type, _pixels_shm_id, _pixels_shm_offset, _internal); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset, + GLboolean _internal) { + static_cast<ValueType*>(cmd)->Init(_target, + _level, + _xoffset, + _yoffset, + _width, + _height, + _format, + _type, + _pixels_shm_id, + _pixels_shm_offset, + _internal); return NextCmdAddress<ValueType>(cmd); } @@ -5782,8 +5679,7 @@ struct TexSubImage2D { uint32 internal; }; -COMPILE_ASSERT(sizeof(TexSubImage2D) == 48, - Sizeof_TexSubImage2D_is_not_48); +COMPILE_ASSERT(sizeof(TexSubImage2D) == 48, Sizeof_TexSubImage2D_is_not_48); COMPILE_ASSERT(offsetof(TexSubImage2D, header) == 0, OffsetOf_TexSubImage2D_header_not_0); COMPILE_ASSERT(offsetof(TexSubImage2D, target) == 4, @@ -5819,9 +5715,7 @@ struct Uniform1f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLfloat _x) { SetHeader(); @@ -5839,14 +5733,12 @@ struct Uniform1f { float x; }; -COMPILE_ASSERT(sizeof(Uniform1f) == 12, - Sizeof_Uniform1f_is_not_12); +COMPILE_ASSERT(sizeof(Uniform1f) == 12, Sizeof_Uniform1f_is_not_12); COMPILE_ASSERT(offsetof(Uniform1f, header) == 0, OffsetOf_Uniform1f_header_not_0); COMPILE_ASSERT(offsetof(Uniform1f, location) == 4, OffsetOf_Uniform1f_location_not_4); -COMPILE_ASSERT(offsetof(Uniform1f, x) == 8, - OffsetOf_Uniform1f_x_not_8); +COMPILE_ASSERT(offsetof(Uniform1f, x) == 8, OffsetOf_Uniform1f_x_not_8); struct Uniform1fv { typedef Uniform1fv ValueType; @@ -5858,13 +5750,12 @@ struct Uniform1fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -5872,11 +5763,13 @@ struct Uniform1fv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -5887,8 +5780,7 @@ struct Uniform1fv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform1fv) == 20, - Sizeof_Uniform1fv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform1fv) == 20, Sizeof_Uniform1fv_is_not_20); COMPILE_ASSERT(offsetof(Uniform1fv, header) == 0, OffsetOf_Uniform1fv_header_not_0); COMPILE_ASSERT(offsetof(Uniform1fv, location) == 4, @@ -5907,13 +5799,12 @@ struct Uniform1fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLfloat) * 1 * count); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 1 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -5924,8 +5815,7 @@ struct Uniform1fvImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) { @@ -5958,9 +5848,7 @@ struct Uniform1i { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLint _x) { SetHeader(); @@ -5978,14 +5866,12 @@ struct Uniform1i { int32 x; }; -COMPILE_ASSERT(sizeof(Uniform1i) == 12, - Sizeof_Uniform1i_is_not_12); +COMPILE_ASSERT(sizeof(Uniform1i) == 12, Sizeof_Uniform1i_is_not_12); COMPILE_ASSERT(offsetof(Uniform1i, header) == 0, OffsetOf_Uniform1i_header_not_0); COMPILE_ASSERT(offsetof(Uniform1i, location) == 4, OffsetOf_Uniform1i_location_not_4); -COMPILE_ASSERT(offsetof(Uniform1i, x) == 8, - OffsetOf_Uniform1i_x_not_8); +COMPILE_ASSERT(offsetof(Uniform1i, x) == 8, OffsetOf_Uniform1i_x_not_8); struct Uniform1iv { typedef Uniform1iv ValueType; @@ -5997,13 +5883,12 @@ struct Uniform1iv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6011,11 +5896,13 @@ struct Uniform1iv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -6026,8 +5913,7 @@ struct Uniform1iv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform1iv) == 20, - Sizeof_Uniform1iv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform1iv) == 20, Sizeof_Uniform1iv_is_not_20); COMPILE_ASSERT(offsetof(Uniform1iv, header) == 0, OffsetOf_Uniform1iv_header_not_0); COMPILE_ASSERT(offsetof(Uniform1iv, location) == 4, @@ -6046,13 +5932,12 @@ struct Uniform1ivImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLint) * 1 * count); // NOLINT + return static_cast<uint32>(sizeof(GLint) * 1 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -6063,8 +5948,7 @@ struct Uniform1ivImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) { @@ -6097,9 +5981,7 @@ struct Uniform2f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLfloat _x, GLfloat _y) { SetHeader(); @@ -6119,16 +6001,13 @@ struct Uniform2f { float y; }; -COMPILE_ASSERT(sizeof(Uniform2f) == 16, - Sizeof_Uniform2f_is_not_16); +COMPILE_ASSERT(sizeof(Uniform2f) == 16, Sizeof_Uniform2f_is_not_16); COMPILE_ASSERT(offsetof(Uniform2f, header) == 0, OffsetOf_Uniform2f_header_not_0); COMPILE_ASSERT(offsetof(Uniform2f, location) == 4, OffsetOf_Uniform2f_location_not_4); -COMPILE_ASSERT(offsetof(Uniform2f, x) == 8, - OffsetOf_Uniform2f_x_not_8); -COMPILE_ASSERT(offsetof(Uniform2f, y) == 12, - OffsetOf_Uniform2f_y_not_12); +COMPILE_ASSERT(offsetof(Uniform2f, x) == 8, OffsetOf_Uniform2f_x_not_8); +COMPILE_ASSERT(offsetof(Uniform2f, y) == 12, OffsetOf_Uniform2f_y_not_12); struct Uniform2fv { typedef Uniform2fv ValueType; @@ -6140,13 +6019,12 @@ struct Uniform2fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6154,11 +6032,13 @@ struct Uniform2fv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -6169,8 +6049,7 @@ struct Uniform2fv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform2fv) == 20, - Sizeof_Uniform2fv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform2fv) == 20, Sizeof_Uniform2fv_is_not_20); COMPILE_ASSERT(offsetof(Uniform2fv, header) == 0, OffsetOf_Uniform2fv_header_not_0); COMPILE_ASSERT(offsetof(Uniform2fv, location) == 4, @@ -6189,13 +6068,12 @@ struct Uniform2fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLfloat) * 2 * count); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 2 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -6206,8 +6084,7 @@ struct Uniform2fvImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) { @@ -6240,9 +6117,7 @@ struct Uniform2i { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLint _x, GLint _y) { SetHeader(); @@ -6262,16 +6137,13 @@ struct Uniform2i { int32 y; }; -COMPILE_ASSERT(sizeof(Uniform2i) == 16, - Sizeof_Uniform2i_is_not_16); +COMPILE_ASSERT(sizeof(Uniform2i) == 16, Sizeof_Uniform2i_is_not_16); COMPILE_ASSERT(offsetof(Uniform2i, header) == 0, OffsetOf_Uniform2i_header_not_0); COMPILE_ASSERT(offsetof(Uniform2i, location) == 4, OffsetOf_Uniform2i_location_not_4); -COMPILE_ASSERT(offsetof(Uniform2i, x) == 8, - OffsetOf_Uniform2i_x_not_8); -COMPILE_ASSERT(offsetof(Uniform2i, y) == 12, - OffsetOf_Uniform2i_y_not_12); +COMPILE_ASSERT(offsetof(Uniform2i, x) == 8, OffsetOf_Uniform2i_x_not_8); +COMPILE_ASSERT(offsetof(Uniform2i, y) == 12, OffsetOf_Uniform2i_y_not_12); struct Uniform2iv { typedef Uniform2iv ValueType; @@ -6283,13 +6155,12 @@ struct Uniform2iv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6297,11 +6168,13 @@ struct Uniform2iv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -6312,8 +6185,7 @@ struct Uniform2iv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform2iv) == 20, - Sizeof_Uniform2iv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform2iv) == 20, Sizeof_Uniform2iv_is_not_20); COMPILE_ASSERT(offsetof(Uniform2iv, header) == 0, OffsetOf_Uniform2iv_header_not_0); COMPILE_ASSERT(offsetof(Uniform2iv, location) == 4, @@ -6332,13 +6204,12 @@ struct Uniform2ivImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLint) * 2 * count); // NOLINT + return static_cast<uint32>(sizeof(GLint) * 2 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -6349,8 +6220,7 @@ struct Uniform2ivImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) { @@ -6383,9 +6253,7 @@ struct Uniform3f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z) { SetHeader(); @@ -6407,18 +6275,14 @@ struct Uniform3f { float z; }; -COMPILE_ASSERT(sizeof(Uniform3f) == 20, - Sizeof_Uniform3f_is_not_20); +COMPILE_ASSERT(sizeof(Uniform3f) == 20, Sizeof_Uniform3f_is_not_20); COMPILE_ASSERT(offsetof(Uniform3f, header) == 0, OffsetOf_Uniform3f_header_not_0); COMPILE_ASSERT(offsetof(Uniform3f, location) == 4, OffsetOf_Uniform3f_location_not_4); -COMPILE_ASSERT(offsetof(Uniform3f, x) == 8, - OffsetOf_Uniform3f_x_not_8); -COMPILE_ASSERT(offsetof(Uniform3f, y) == 12, - OffsetOf_Uniform3f_y_not_12); -COMPILE_ASSERT(offsetof(Uniform3f, z) == 16, - OffsetOf_Uniform3f_z_not_16); +COMPILE_ASSERT(offsetof(Uniform3f, x) == 8, OffsetOf_Uniform3f_x_not_8); +COMPILE_ASSERT(offsetof(Uniform3f, y) == 12, OffsetOf_Uniform3f_y_not_12); +COMPILE_ASSERT(offsetof(Uniform3f, z) == 16, OffsetOf_Uniform3f_z_not_16); struct Uniform3fv { typedef Uniform3fv ValueType; @@ -6430,13 +6294,12 @@ struct Uniform3fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6444,11 +6307,13 @@ struct Uniform3fv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -6459,8 +6324,7 @@ struct Uniform3fv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform3fv) == 20, - Sizeof_Uniform3fv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform3fv) == 20, Sizeof_Uniform3fv_is_not_20); COMPILE_ASSERT(offsetof(Uniform3fv, header) == 0, OffsetOf_Uniform3fv_header_not_0); COMPILE_ASSERT(offsetof(Uniform3fv, location) == 4, @@ -6479,13 +6343,12 @@ struct Uniform3fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLfloat) * 3 * count); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 3 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -6496,8 +6359,7 @@ struct Uniform3fvImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) { @@ -6530,9 +6392,7 @@ struct Uniform3i { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLint _x, GLint _y, GLint _z) { SetHeader(); @@ -6554,18 +6414,14 @@ struct Uniform3i { int32 z; }; -COMPILE_ASSERT(sizeof(Uniform3i) == 20, - Sizeof_Uniform3i_is_not_20); +COMPILE_ASSERT(sizeof(Uniform3i) == 20, Sizeof_Uniform3i_is_not_20); COMPILE_ASSERT(offsetof(Uniform3i, header) == 0, OffsetOf_Uniform3i_header_not_0); COMPILE_ASSERT(offsetof(Uniform3i, location) == 4, OffsetOf_Uniform3i_location_not_4); -COMPILE_ASSERT(offsetof(Uniform3i, x) == 8, - OffsetOf_Uniform3i_x_not_8); -COMPILE_ASSERT(offsetof(Uniform3i, y) == 12, - OffsetOf_Uniform3i_y_not_12); -COMPILE_ASSERT(offsetof(Uniform3i, z) == 16, - OffsetOf_Uniform3i_z_not_16); +COMPILE_ASSERT(offsetof(Uniform3i, x) == 8, OffsetOf_Uniform3i_x_not_8); +COMPILE_ASSERT(offsetof(Uniform3i, y) == 12, OffsetOf_Uniform3i_y_not_12); +COMPILE_ASSERT(offsetof(Uniform3i, z) == 16, OffsetOf_Uniform3i_z_not_16); struct Uniform3iv { typedef Uniform3iv ValueType; @@ -6577,13 +6433,12 @@ struct Uniform3iv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6591,11 +6446,13 @@ struct Uniform3iv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -6606,8 +6463,7 @@ struct Uniform3iv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform3iv) == 20, - Sizeof_Uniform3iv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform3iv) == 20, Sizeof_Uniform3iv_is_not_20); COMPILE_ASSERT(offsetof(Uniform3iv, header) == 0, OffsetOf_Uniform3iv_header_not_0); COMPILE_ASSERT(offsetof(Uniform3iv, location) == 4, @@ -6626,13 +6482,12 @@ struct Uniform3ivImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLint) * 3 * count); // NOLINT + return static_cast<uint32>(sizeof(GLint) * 3 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -6643,8 +6498,7 @@ struct Uniform3ivImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) { @@ -6677,9 +6531,7 @@ struct Uniform4f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) { SetHeader(); @@ -6690,9 +6542,12 @@ struct Uniform4f { w = _w; } - void* Set( - void* cmd, GLint _location, GLfloat _x, GLfloat _y, GLfloat _z, - GLfloat _w) { + void* Set(void* cmd, + GLint _location, + GLfloat _x, + GLfloat _y, + GLfloat _z, + GLfloat _w) { static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w); return NextCmdAddress<ValueType>(cmd); } @@ -6705,20 +6560,15 @@ struct Uniform4f { float w; }; -COMPILE_ASSERT(sizeof(Uniform4f) == 24, - Sizeof_Uniform4f_is_not_24); +COMPILE_ASSERT(sizeof(Uniform4f) == 24, Sizeof_Uniform4f_is_not_24); COMPILE_ASSERT(offsetof(Uniform4f, header) == 0, OffsetOf_Uniform4f_header_not_0); COMPILE_ASSERT(offsetof(Uniform4f, location) == 4, OffsetOf_Uniform4f_location_not_4); -COMPILE_ASSERT(offsetof(Uniform4f, x) == 8, - OffsetOf_Uniform4f_x_not_8); -COMPILE_ASSERT(offsetof(Uniform4f, y) == 12, - OffsetOf_Uniform4f_y_not_12); -COMPILE_ASSERT(offsetof(Uniform4f, z) == 16, - OffsetOf_Uniform4f_z_not_16); -COMPILE_ASSERT(offsetof(Uniform4f, w) == 20, - OffsetOf_Uniform4f_w_not_20); +COMPILE_ASSERT(offsetof(Uniform4f, x) == 8, OffsetOf_Uniform4f_x_not_8); +COMPILE_ASSERT(offsetof(Uniform4f, y) == 12, OffsetOf_Uniform4f_y_not_12); +COMPILE_ASSERT(offsetof(Uniform4f, z) == 16, OffsetOf_Uniform4f_z_not_16); +COMPILE_ASSERT(offsetof(Uniform4f, w) == 20, OffsetOf_Uniform4f_w_not_20); struct Uniform4fv { typedef Uniform4fv ValueType; @@ -6730,13 +6580,12 @@ struct Uniform4fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6744,11 +6593,13 @@ struct Uniform4fv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -6759,8 +6610,7 @@ struct Uniform4fv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform4fv) == 20, - Sizeof_Uniform4fv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform4fv) == 20, Sizeof_Uniform4fv_is_not_20); COMPILE_ASSERT(offsetof(Uniform4fv, header) == 0, OffsetOf_Uniform4fv_header_not_0); COMPILE_ASSERT(offsetof(Uniform4fv, location) == 4, @@ -6779,13 +6629,12 @@ struct Uniform4fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLfloat) * 4 * count); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 4 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -6796,8 +6645,7 @@ struct Uniform4fvImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLfloat* _v) { @@ -6830,9 +6678,7 @@ struct Uniform4i { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) { SetHeader(); @@ -6843,8 +6689,12 @@ struct Uniform4i { w = _w; } - void* Set( - void* cmd, GLint _location, GLint _x, GLint _y, GLint _z, GLint _w) { + void* Set(void* cmd, + GLint _location, + GLint _x, + GLint _y, + GLint _z, + GLint _w) { static_cast<ValueType*>(cmd)->Init(_location, _x, _y, _z, _w); return NextCmdAddress<ValueType>(cmd); } @@ -6857,20 +6707,15 @@ struct Uniform4i { int32 w; }; -COMPILE_ASSERT(sizeof(Uniform4i) == 24, - Sizeof_Uniform4i_is_not_24); +COMPILE_ASSERT(sizeof(Uniform4i) == 24, Sizeof_Uniform4i_is_not_24); COMPILE_ASSERT(offsetof(Uniform4i, header) == 0, OffsetOf_Uniform4i_header_not_0); COMPILE_ASSERT(offsetof(Uniform4i, location) == 4, OffsetOf_Uniform4i_location_not_4); -COMPILE_ASSERT(offsetof(Uniform4i, x) == 8, - OffsetOf_Uniform4i_x_not_8); -COMPILE_ASSERT(offsetof(Uniform4i, y) == 12, - OffsetOf_Uniform4i_y_not_12); -COMPILE_ASSERT(offsetof(Uniform4i, z) == 16, - OffsetOf_Uniform4i_z_not_16); -COMPILE_ASSERT(offsetof(Uniform4i, w) == 20, - OffsetOf_Uniform4i_w_not_20); +COMPILE_ASSERT(offsetof(Uniform4i, x) == 8, OffsetOf_Uniform4i_x_not_8); +COMPILE_ASSERT(offsetof(Uniform4i, y) == 12, OffsetOf_Uniform4i_y_not_12); +COMPILE_ASSERT(offsetof(Uniform4i, z) == 16, OffsetOf_Uniform4i_z_not_16); +COMPILE_ASSERT(offsetof(Uniform4i, w) == 20, OffsetOf_Uniform4i_w_not_20); struct Uniform4iv { typedef Uniform4iv ValueType; @@ -6882,13 +6727,12 @@ struct Uniform4iv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { + void Init(GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6896,11 +6740,13 @@ struct Uniform4iv { v_shm_offset = _v_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, uint32 _v_shm_id, - uint32 _v_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_location, _count, _v_shm_id, _v_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + uint32 _v_shm_id, + uint32 _v_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _v_shm_id, _v_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -6911,8 +6757,7 @@ struct Uniform4iv { uint32 v_shm_offset; }; -COMPILE_ASSERT(sizeof(Uniform4iv) == 20, - Sizeof_Uniform4iv_is_not_20); +COMPILE_ASSERT(sizeof(Uniform4iv) == 20, Sizeof_Uniform4iv_is_not_20); COMPILE_ASSERT(offsetof(Uniform4iv, header) == 0, OffsetOf_Uniform4iv_header_not_0); COMPILE_ASSERT(offsetof(Uniform4iv, location) == 4, @@ -6931,13 +6776,12 @@ struct Uniform4ivImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLint) * 4 * count); // NOLINT + return static_cast<uint32>(sizeof(GLint) * 4 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -6948,8 +6792,7 @@ struct Uniform4ivImmediate { SetHeader(_count); location = _location; count = _count; - memcpy(ImmediateDataAddress(this), - _v, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _v, ComputeDataSize(_count)); } void* Set(void* cmd, GLint _location, GLsizei _count, const GLint* _v) { @@ -6982,13 +6825,13 @@ struct UniformMatrix2fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, GLboolean _transpose, - uint32 _value_shm_id, uint32 _value_shm_offset) { + void Init(GLint _location, + GLsizei _count, + GLboolean _transpose, + uint32 _value_shm_id, + uint32 _value_shm_offset) { SetHeader(); location = _location; count = _count; @@ -6997,12 +6840,14 @@ struct UniformMatrix2fv { value_shm_offset = _value_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, GLboolean _transpose, - uint32 _value_shm_id, uint32 _value_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _location, _count, _transpose, _value_shm_id, _value_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + GLboolean _transpose, + uint32 _value_shm_id, + uint32 _value_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _transpose, _value_shm_id, _value_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -7036,33 +6881,34 @@ struct UniformMatrix2fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLfloat) * 4 * count); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 4 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); } - void Init( - GLint _location, GLsizei _count, GLboolean _transpose, - const GLfloat* _value) { + void Init(GLint _location, + GLsizei _count, + GLboolean _transpose, + const GLfloat* _value) { SetHeader(_count); location = _location; count = _count; transpose = _transpose; - memcpy(ImmediateDataAddress(this), - _value, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); } - void* Set( - void* cmd, GLint _location, GLsizei _count, GLboolean _transpose, - const GLfloat* _value) { + void* Set(void* cmd, + GLint _location, + GLsizei _count, + GLboolean _transpose, + const GLfloat* _value) { static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value); const uint32 size = ComputeSize(_count); return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); @@ -7095,13 +6941,13 @@ struct UniformMatrix3fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, GLboolean _transpose, - uint32 _value_shm_id, uint32 _value_shm_offset) { + void Init(GLint _location, + GLsizei _count, + GLboolean _transpose, + uint32 _value_shm_id, + uint32 _value_shm_offset) { SetHeader(); location = _location; count = _count; @@ -7110,12 +6956,14 @@ struct UniformMatrix3fv { value_shm_offset = _value_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, GLboolean _transpose, - uint32 _value_shm_id, uint32 _value_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _location, _count, _transpose, _value_shm_id, _value_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + GLboolean _transpose, + uint32 _value_shm_id, + uint32 _value_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _transpose, _value_shm_id, _value_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -7149,33 +6997,34 @@ struct UniformMatrix3fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLfloat) * 9 * count); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 9 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); } - void Init( - GLint _location, GLsizei _count, GLboolean _transpose, - const GLfloat* _value) { + void Init(GLint _location, + GLsizei _count, + GLboolean _transpose, + const GLfloat* _value) { SetHeader(_count); location = _location; count = _count; transpose = _transpose; - memcpy(ImmediateDataAddress(this), - _value, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); } - void* Set( - void* cmd, GLint _location, GLsizei _count, GLboolean _transpose, - const GLfloat* _value) { + void* Set(void* cmd, + GLint _location, + GLsizei _count, + GLboolean _transpose, + const GLfloat* _value) { static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value); const uint32 size = ComputeSize(_count); return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); @@ -7208,13 +7057,13 @@ struct UniformMatrix4fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _location, GLsizei _count, GLboolean _transpose, - uint32 _value_shm_id, uint32 _value_shm_offset) { + void Init(GLint _location, + GLsizei _count, + GLboolean _transpose, + uint32 _value_shm_id, + uint32 _value_shm_offset) { SetHeader(); location = _location; count = _count; @@ -7223,12 +7072,14 @@ struct UniformMatrix4fv { value_shm_offset = _value_shm_offset; } - void* Set( - void* cmd, GLint _location, GLsizei _count, GLboolean _transpose, - uint32 _value_shm_id, uint32 _value_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _location, _count, _transpose, _value_shm_id, _value_shm_offset); + void* Set(void* cmd, + GLint _location, + GLsizei _count, + GLboolean _transpose, + uint32 _value_shm_id, + uint32 _value_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_location, _count, _transpose, _value_shm_id, _value_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -7262,33 +7113,34 @@ struct UniformMatrix4fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLfloat) * 16 * count); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 16 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); } - void Init( - GLint _location, GLsizei _count, GLboolean _transpose, - const GLfloat* _value) { + void Init(GLint _location, + GLsizei _count, + GLboolean _transpose, + const GLfloat* _value) { SetHeader(_count); location = _location; count = _count; transpose = _transpose; - memcpy(ImmediateDataAddress(this), - _value, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _value, ComputeDataSize(_count)); } - void* Set( - void* cmd, GLint _location, GLsizei _count, GLboolean _transpose, - const GLfloat* _value) { + void* Set(void* cmd, + GLint _location, + GLsizei _count, + GLboolean _transpose, + const GLfloat* _value) { static_cast<ValueType*>(cmd)->Init(_location, _count, _transpose, _value); const uint32 size = ComputeSize(_count); return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); @@ -7321,9 +7173,7 @@ struct UseProgram { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program) { SetHeader(); @@ -7339,8 +7189,7 @@ struct UseProgram { uint32 program; }; -COMPILE_ASSERT(sizeof(UseProgram) == 8, - Sizeof_UseProgram_is_not_8); +COMPILE_ASSERT(sizeof(UseProgram) == 8, Sizeof_UseProgram_is_not_8); COMPILE_ASSERT(offsetof(UseProgram, header) == 0, OffsetOf_UseProgram_header_not_0); COMPILE_ASSERT(offsetof(UseProgram, program) == 4, @@ -7356,9 +7205,7 @@ struct ValidateProgram { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program) { SetHeader(); @@ -7374,8 +7221,7 @@ struct ValidateProgram { uint32 program; }; -COMPILE_ASSERT(sizeof(ValidateProgram) == 8, - Sizeof_ValidateProgram_is_not_8); +COMPILE_ASSERT(sizeof(ValidateProgram) == 8, Sizeof_ValidateProgram_is_not_8); COMPILE_ASSERT(offsetof(ValidateProgram, header) == 0, OffsetOf_ValidateProgram_header_not_0); COMPILE_ASSERT(offsetof(ValidateProgram, program) == 4, @@ -7391,9 +7237,7 @@ struct VertexAttrib1f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, GLfloat _x) { SetHeader(); @@ -7411,8 +7255,7 @@ struct VertexAttrib1f { float x; }; -COMPILE_ASSERT(sizeof(VertexAttrib1f) == 12, - Sizeof_VertexAttrib1f_is_not_12); +COMPILE_ASSERT(sizeof(VertexAttrib1f) == 12, Sizeof_VertexAttrib1f_is_not_12); COMPILE_ASSERT(offsetof(VertexAttrib1f, header) == 0, OffsetOf_VertexAttrib1f_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib1f, indx) == 4, @@ -7430,9 +7273,7 @@ struct VertexAttrib1fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) { SetHeader(); @@ -7441,11 +7282,12 @@ struct VertexAttrib1fv { values_shm_offset = _values_shm_offset; } - void* Set( - void* cmd, GLuint _indx, uint32 _values_shm_id, - uint32 _values_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_indx, _values_shm_id, _values_shm_offset); + void* Set(void* cmd, + GLuint _indx, + uint32 _values_shm_id, + uint32 _values_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_indx, _values_shm_id, _values_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -7455,8 +7297,7 @@ struct VertexAttrib1fv { uint32 values_shm_offset; }; -COMPILE_ASSERT(sizeof(VertexAttrib1fv) == 16, - Sizeof_VertexAttrib1fv_is_not_16); +COMPILE_ASSERT(sizeof(VertexAttrib1fv) == 16, Sizeof_VertexAttrib1fv_is_not_16); COMPILE_ASSERT(offsetof(VertexAttrib1fv, header) == 0, OffsetOf_VertexAttrib1fv_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib1fv, indx) == 4, @@ -7473,24 +7314,20 @@ struct VertexAttrib1fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLfloat) * 1); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 1); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLuint _indx, const GLfloat* _values) { SetHeader(); indx = _indx; - memcpy(ImmediateDataAddress(this), - _values, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _values, ComputeDataSize()); } void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { @@ -7520,9 +7357,7 @@ struct VertexAttrib2f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, GLfloat _x, GLfloat _y) { SetHeader(); @@ -7542,8 +7377,7 @@ struct VertexAttrib2f { float y; }; -COMPILE_ASSERT(sizeof(VertexAttrib2f) == 16, - Sizeof_VertexAttrib2f_is_not_16); +COMPILE_ASSERT(sizeof(VertexAttrib2f) == 16, Sizeof_VertexAttrib2f_is_not_16); COMPILE_ASSERT(offsetof(VertexAttrib2f, header) == 0, OffsetOf_VertexAttrib2f_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib2f, indx) == 4, @@ -7563,9 +7397,7 @@ struct VertexAttrib2fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) { SetHeader(); @@ -7574,11 +7406,12 @@ struct VertexAttrib2fv { values_shm_offset = _values_shm_offset; } - void* Set( - void* cmd, GLuint _indx, uint32 _values_shm_id, - uint32 _values_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_indx, _values_shm_id, _values_shm_offset); + void* Set(void* cmd, + GLuint _indx, + uint32 _values_shm_id, + uint32 _values_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_indx, _values_shm_id, _values_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -7588,8 +7421,7 @@ struct VertexAttrib2fv { uint32 values_shm_offset; }; -COMPILE_ASSERT(sizeof(VertexAttrib2fv) == 16, - Sizeof_VertexAttrib2fv_is_not_16); +COMPILE_ASSERT(sizeof(VertexAttrib2fv) == 16, Sizeof_VertexAttrib2fv_is_not_16); COMPILE_ASSERT(offsetof(VertexAttrib2fv, header) == 0, OffsetOf_VertexAttrib2fv_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib2fv, indx) == 4, @@ -7606,24 +7438,20 @@ struct VertexAttrib2fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLfloat) * 2); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 2); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLuint _indx, const GLfloat* _values) { SetHeader(); indx = _indx; - memcpy(ImmediateDataAddress(this), - _values, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _values, ComputeDataSize()); } void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { @@ -7653,9 +7481,7 @@ struct VertexAttrib3f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z) { SetHeader(); @@ -7677,8 +7503,7 @@ struct VertexAttrib3f { float z; }; -COMPILE_ASSERT(sizeof(VertexAttrib3f) == 20, - Sizeof_VertexAttrib3f_is_not_20); +COMPILE_ASSERT(sizeof(VertexAttrib3f) == 20, Sizeof_VertexAttrib3f_is_not_20); COMPILE_ASSERT(offsetof(VertexAttrib3f, header) == 0, OffsetOf_VertexAttrib3f_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib3f, indx) == 4, @@ -7700,9 +7525,7 @@ struct VertexAttrib3fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) { SetHeader(); @@ -7711,11 +7534,12 @@ struct VertexAttrib3fv { values_shm_offset = _values_shm_offset; } - void* Set( - void* cmd, GLuint _indx, uint32 _values_shm_id, - uint32 _values_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_indx, _values_shm_id, _values_shm_offset); + void* Set(void* cmd, + GLuint _indx, + uint32 _values_shm_id, + uint32 _values_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_indx, _values_shm_id, _values_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -7725,8 +7549,7 @@ struct VertexAttrib3fv { uint32 values_shm_offset; }; -COMPILE_ASSERT(sizeof(VertexAttrib3fv) == 16, - Sizeof_VertexAttrib3fv_is_not_16); +COMPILE_ASSERT(sizeof(VertexAttrib3fv) == 16, Sizeof_VertexAttrib3fv_is_not_16); COMPILE_ASSERT(offsetof(VertexAttrib3fv, header) == 0, OffsetOf_VertexAttrib3fv_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib3fv, indx) == 4, @@ -7743,24 +7566,20 @@ struct VertexAttrib3fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLfloat) * 3); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 3); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLuint _indx, const GLfloat* _values) { SetHeader(); indx = _indx; - memcpy(ImmediateDataAddress(this), - _values, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _values, ComputeDataSize()); } void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { @@ -7790,9 +7609,7 @@ struct VertexAttrib4f { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, GLfloat _w) { SetHeader(); @@ -7803,9 +7620,12 @@ struct VertexAttrib4f { w = _w; } - void* Set( - void* cmd, GLuint _indx, GLfloat _x, GLfloat _y, GLfloat _z, - GLfloat _w) { + void* Set(void* cmd, + GLuint _indx, + GLfloat _x, + GLfloat _y, + GLfloat _z, + GLfloat _w) { static_cast<ValueType*>(cmd)->Init(_indx, _x, _y, _z, _w); return NextCmdAddress<ValueType>(cmd); } @@ -7818,8 +7638,7 @@ struct VertexAttrib4f { float w; }; -COMPILE_ASSERT(sizeof(VertexAttrib4f) == 24, - Sizeof_VertexAttrib4f_is_not_24); +COMPILE_ASSERT(sizeof(VertexAttrib4f) == 24, Sizeof_VertexAttrib4f_is_not_24); COMPILE_ASSERT(offsetof(VertexAttrib4f, header) == 0, OffsetOf_VertexAttrib4f_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib4f, indx) == 4, @@ -7843,9 +7662,7 @@ struct VertexAttrib4fv { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _indx, uint32 _values_shm_id, uint32 _values_shm_offset) { SetHeader(); @@ -7854,11 +7671,12 @@ struct VertexAttrib4fv { values_shm_offset = _values_shm_offset; } - void* Set( - void* cmd, GLuint _indx, uint32 _values_shm_id, - uint32 _values_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_indx, _values_shm_id, _values_shm_offset); + void* Set(void* cmd, + GLuint _indx, + uint32 _values_shm_id, + uint32 _values_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_indx, _values_shm_id, _values_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -7868,8 +7686,7 @@ struct VertexAttrib4fv { uint32 values_shm_offset; }; -COMPILE_ASSERT(sizeof(VertexAttrib4fv) == 16, - Sizeof_VertexAttrib4fv_is_not_16); +COMPILE_ASSERT(sizeof(VertexAttrib4fv) == 16, Sizeof_VertexAttrib4fv_is_not_16); COMPILE_ASSERT(offsetof(VertexAttrib4fv, header) == 0, OffsetOf_VertexAttrib4fv_header_not_0); COMPILE_ASSERT(offsetof(VertexAttrib4fv, indx) == 4, @@ -7886,24 +7703,20 @@ struct VertexAttrib4fvImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLfloat) * 4); // NOLINT + return static_cast<uint32>(sizeof(GLfloat) * 4); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLuint _indx, const GLfloat* _values) { SetHeader(); indx = _indx; - memcpy(ImmediateDataAddress(this), - _values, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _values, ComputeDataSize()); } void* Set(void* cmd, GLuint _indx, const GLfloat* _values) { @@ -7933,13 +7746,14 @@ struct VertexAttribPointer { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _indx, GLint _size, GLenum _type, GLboolean _normalized, - GLsizei _stride, GLuint _offset) { + void Init(GLuint _indx, + GLint _size, + GLenum _type, + GLboolean _normalized, + GLsizei _stride, + GLuint _offset) { SetHeader(); indx = _indx; size = _size; @@ -7949,11 +7763,15 @@ struct VertexAttribPointer { offset = _offset; } - void* Set( - void* cmd, GLuint _indx, GLint _size, GLenum _type, GLboolean _normalized, - GLsizei _stride, GLuint _offset) { - static_cast<ValueType*>( - cmd)->Init(_indx, _size, _type, _normalized, _stride, _offset); + void* Set(void* cmd, + GLuint _indx, + GLint _size, + GLenum _type, + GLboolean _normalized, + GLsizei _stride, + GLuint _offset) { + static_cast<ValueType*>(cmd) + ->Init(_indx, _size, _type, _normalized, _stride, _offset); return NextCmdAddress<ValueType>(cmd); } @@ -7993,9 +7811,7 @@ struct Viewport { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _x, GLint _y, GLsizei _width, GLsizei _height) { SetHeader(); @@ -8017,16 +7833,11 @@ struct Viewport { int32 height; }; -COMPILE_ASSERT(sizeof(Viewport) == 20, - Sizeof_Viewport_is_not_20); -COMPILE_ASSERT(offsetof(Viewport, header) == 0, - OffsetOf_Viewport_header_not_0); -COMPILE_ASSERT(offsetof(Viewport, x) == 4, - OffsetOf_Viewport_x_not_4); -COMPILE_ASSERT(offsetof(Viewport, y) == 8, - OffsetOf_Viewport_y_not_8); -COMPILE_ASSERT(offsetof(Viewport, width) == 12, - OffsetOf_Viewport_width_not_12); +COMPILE_ASSERT(sizeof(Viewport) == 20, Sizeof_Viewport_is_not_20); +COMPILE_ASSERT(offsetof(Viewport, header) == 0, OffsetOf_Viewport_header_not_0); +COMPILE_ASSERT(offsetof(Viewport, x) == 4, OffsetOf_Viewport_x_not_4); +COMPILE_ASSERT(offsetof(Viewport, y) == 8, OffsetOf_Viewport_y_not_8); +COMPILE_ASSERT(offsetof(Viewport, width) == 12, OffsetOf_Viewport_width_not_12); COMPILE_ASSERT(offsetof(Viewport, height) == 16, OffsetOf_Viewport_height_not_16); @@ -8040,14 +7851,18 @@ struct BlitFramebufferCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLint _srcX0, GLint _srcY0, GLint _srcX1, GLint _srcY1, GLint _dstX0, - GLint _dstY0, GLint _dstX1, GLint _dstY1, GLbitfield _mask, - GLenum _filter) { + void Init(GLint _srcX0, + GLint _srcY0, + GLint _srcX1, + GLint _srcY1, + GLint _dstX0, + GLint _dstY0, + GLint _dstX1, + GLint _dstY1, + GLbitfield _mask, + GLenum _filter) { SetHeader(); srcX0 = _srcX0; srcY0 = _srcY0; @@ -8061,14 +7876,27 @@ struct BlitFramebufferCHROMIUM { filter = _filter; } - void* Set( - void* cmd, GLint _srcX0, GLint _srcY0, GLint _srcX1, GLint _srcY1, - GLint _dstX0, GLint _dstY0, GLint _dstX1, GLint _dstY1, GLbitfield _mask, - GLenum _filter) { - static_cast<ValueType*>( - cmd)->Init( - _srcX0, _srcY0, _srcX1, _srcY1, _dstX0, _dstY0, _dstX1, _dstY1, - _mask, _filter); + void* Set(void* cmd, + GLint _srcX0, + GLint _srcY0, + GLint _srcX1, + GLint _srcY1, + GLint _dstX0, + GLint _dstY0, + GLint _dstX1, + GLint _dstY1, + GLbitfield _mask, + GLenum _filter) { + static_cast<ValueType*>(cmd)->Init(_srcX0, + _srcY0, + _srcX1, + _srcY1, + _dstX0, + _dstY0, + _dstX1, + _dstY1, + _mask, + _filter); return NextCmdAddress<ValueType>(cmd); } @@ -8121,13 +7949,13 @@ struct RenderbufferStorageMultisampleCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLsizei _samples, GLenum _internalformat, GLsizei _width, - GLsizei _height) { + void Init(GLenum _target, + GLsizei _samples, + GLenum _internalformat, + GLsizei _width, + GLsizei _height) { SetHeader(); target = _target; samples = _samples; @@ -8136,11 +7964,14 @@ struct RenderbufferStorageMultisampleCHROMIUM { height = _height; } - void* Set( - void* cmd, GLenum _target, GLsizei _samples, GLenum _internalformat, - GLsizei _width, GLsizei _height) { - static_cast<ValueType*>( - cmd)->Init(_target, _samples, _internalformat, _width, _height); + void* Set(void* cmd, + GLenum _target, + GLsizei _samples, + GLenum _internalformat, + GLsizei _width, + GLsizei _height) { + static_cast<ValueType*>(cmd) + ->Init(_target, _samples, _internalformat, _width, _height); return NextCmdAddress<ValueType>(cmd); } @@ -8162,7 +7993,7 @@ COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, samples) == 8, OffsetOf_RenderbufferStorageMultisampleCHROMIUM_samples_not_8); COMPILE_ASSERT( offsetof(RenderbufferStorageMultisampleCHROMIUM, internalformat) == 12, - OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12); // NOLINT + OffsetOf_RenderbufferStorageMultisampleCHROMIUM_internalformat_not_12); // NOLINT COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, width) == 16, OffsetOf_RenderbufferStorageMultisampleCHROMIUM_width_not_16); COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleCHROMIUM, height) == 20, @@ -8179,13 +8010,13 @@ struct RenderbufferStorageMultisampleEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLsizei _samples, GLenum _internalformat, GLsizei _width, - GLsizei _height) { + void Init(GLenum _target, + GLsizei _samples, + GLenum _internalformat, + GLsizei _width, + GLsizei _height) { SetHeader(); target = _target; samples = _samples; @@ -8194,11 +8025,14 @@ struct RenderbufferStorageMultisampleEXT { height = _height; } - void* Set( - void* cmd, GLenum _target, GLsizei _samples, GLenum _internalformat, - GLsizei _width, GLsizei _height) { - static_cast<ValueType*>( - cmd)->Init(_target, _samples, _internalformat, _width, _height); + void* Set(void* cmd, + GLenum _target, + GLsizei _samples, + GLenum _internalformat, + GLsizei _width, + GLsizei _height) { + static_cast<ValueType*>(cmd) + ->Init(_target, _samples, _internalformat, _width, _height); return NextCmdAddress<ValueType>(cmd); } @@ -8220,7 +8054,7 @@ COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, samples) == 8, OffsetOf_RenderbufferStorageMultisampleEXT_samples_not_8); COMPILE_ASSERT( offsetof(RenderbufferStorageMultisampleEXT, internalformat) == 12, - OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12); // NOLINT + OffsetOf_RenderbufferStorageMultisampleEXT_internalformat_not_12); // NOLINT COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, width) == 16, OffsetOf_RenderbufferStorageMultisampleEXT_width_not_16); COMPILE_ASSERT(offsetof(RenderbufferStorageMultisampleEXT, height) == 20, @@ -8236,13 +8070,14 @@ struct FramebufferTexture2DMultisampleEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _attachment, GLenum _textarget, GLuint _texture, - GLint _level, GLsizei _samples) { + void Init(GLenum _target, + GLenum _attachment, + GLenum _textarget, + GLuint _texture, + GLint _level, + GLsizei _samples) { SetHeader(); target = _target; attachment = _attachment; @@ -8252,12 +8087,15 @@ struct FramebufferTexture2DMultisampleEXT { samples = _samples; } - void* Set( - void* cmd, GLenum _target, GLenum _attachment, GLenum _textarget, - GLuint _texture, GLint _level, GLsizei _samples) { - static_cast<ValueType*>( - cmd)->Init( - _target, _attachment, _textarget, _texture, _level, _samples); + void* Set(void* cmd, + GLenum _target, + GLenum _attachment, + GLenum _textarget, + GLuint _texture, + GLint _level, + GLsizei _samples) { + static_cast<ValueType*>(cmd) + ->Init(_target, _attachment, _textarget, _texture, _level, _samples); return NextCmdAddress<ValueType>(cmd); } @@ -8297,13 +8135,13 @@ struct TexStorage2DEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLsizei _levels, GLenum _internalFormat, GLsizei _width, - GLsizei _height) { + void Init(GLenum _target, + GLsizei _levels, + GLenum _internalFormat, + GLsizei _width, + GLsizei _height) { SetHeader(); target = _target; levels = _levels; @@ -8312,11 +8150,14 @@ struct TexStorage2DEXT { height = _height; } - void* Set( - void* cmd, GLenum _target, GLsizei _levels, GLenum _internalFormat, - GLsizei _width, GLsizei _height) { - static_cast<ValueType*>( - cmd)->Init(_target, _levels, _internalFormat, _width, _height); + void* Set(void* cmd, + GLenum _target, + GLsizei _levels, + GLenum _internalFormat, + GLsizei _width, + GLsizei _height) { + static_cast<ValueType*>(cmd) + ->Init(_target, _levels, _internalFormat, _width, _height); return NextCmdAddress<ValueType>(cmd); } @@ -8328,8 +8169,7 @@ struct TexStorage2DEXT { int32 height; }; -COMPILE_ASSERT(sizeof(TexStorage2DEXT) == 24, - Sizeof_TexStorage2DEXT_is_not_24); +COMPILE_ASSERT(sizeof(TexStorage2DEXT) == 24, Sizeof_TexStorage2DEXT_is_not_24); COMPILE_ASSERT(offsetof(TexStorage2DEXT, header) == 0, OffsetOf_TexStorage2DEXT_header_not_0); COMPILE_ASSERT(offsetof(TexStorage2DEXT, target) == 4, @@ -8353,9 +8193,7 @@ struct GenQueriesEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) { SetHeader(); @@ -8364,11 +8202,12 @@ struct GenQueriesEXT { queries_shm_offset = _queries_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _queries_shm_id, - uint32 _queries_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _queries_shm_id, _queries_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _queries_shm_id, + uint32 _queries_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _queries_shm_id, _queries_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -8378,12 +8217,10 @@ struct GenQueriesEXT { uint32 queries_shm_offset; }; -COMPILE_ASSERT(sizeof(GenQueriesEXT) == 16, - Sizeof_GenQueriesEXT_is_not_16); +COMPILE_ASSERT(sizeof(GenQueriesEXT) == 16, Sizeof_GenQueriesEXT_is_not_16); COMPILE_ASSERT(offsetof(GenQueriesEXT, header) == 0, OffsetOf_GenQueriesEXT_header_not_0); -COMPILE_ASSERT(offsetof(GenQueriesEXT, n) == 4, - OffsetOf_GenQueriesEXT_n_not_4); +COMPILE_ASSERT(offsetof(GenQueriesEXT, n) == 4, OffsetOf_GenQueriesEXT_n_not_4); COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_id) == 8, OffsetOf_GenQueriesEXT_queries_shm_id_not_8); COMPILE_ASSERT(offsetof(GenQueriesEXT, queries_shm_offset) == 12, @@ -8400,8 +8237,8 @@ struct GenQueriesEXTImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -8411,8 +8248,7 @@ struct GenQueriesEXTImmediate { void Init(GLsizei _n, GLuint* _queries) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _queries, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, GLuint* _queries) { @@ -8442,9 +8278,7 @@ struct DeleteQueriesEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _queries_shm_id, uint32 _queries_shm_offset) { SetHeader(); @@ -8453,11 +8287,12 @@ struct DeleteQueriesEXT { queries_shm_offset = _queries_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _queries_shm_id, - uint32 _queries_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_n, _queries_shm_id, _queries_shm_offset); + void* Set(void* cmd, + GLsizei _n, + uint32 _queries_shm_id, + uint32 _queries_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_n, _queries_shm_id, _queries_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -8489,8 +8324,8 @@ struct DeleteQueriesEXTImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -8500,8 +8335,7 @@ struct DeleteQueriesEXTImmediate { void Init(GLsizei _n, const GLuint* _queries) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _queries, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _queries, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, const GLuint* _queries) { @@ -8531,13 +8365,12 @@ struct BeginQueryEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLuint _id, uint32 _sync_data_shm_id, - uint32 _sync_data_shm_offset) { + void Init(GLenum _target, + GLuint _id, + uint32 _sync_data_shm_id, + uint32 _sync_data_shm_offset) { SetHeader(); target = _target; id = _id; @@ -8545,11 +8378,13 @@ struct BeginQueryEXT { sync_data_shm_offset = _sync_data_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLuint _id, uint32 _sync_data_shm_id, - uint32 _sync_data_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLuint _id, + uint32 _sync_data_shm_id, + uint32 _sync_data_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _id, _sync_data_shm_id, _sync_data_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -8560,8 +8395,7 @@ struct BeginQueryEXT { uint32 sync_data_shm_offset; }; -COMPILE_ASSERT(sizeof(BeginQueryEXT) == 20, - Sizeof_BeginQueryEXT_is_not_20); +COMPILE_ASSERT(sizeof(BeginQueryEXT) == 20, Sizeof_BeginQueryEXT_is_not_20); COMPILE_ASSERT(offsetof(BeginQueryEXT, header) == 0, OffsetOf_BeginQueryEXT_header_not_0); COMPILE_ASSERT(offsetof(BeginQueryEXT, target) == 4, @@ -8583,9 +8417,7 @@ struct EndQueryEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLuint _submit_count) { SetHeader(); @@ -8603,8 +8435,7 @@ struct EndQueryEXT { uint32 submit_count; }; -COMPILE_ASSERT(sizeof(EndQueryEXT) == 12, - Sizeof_EndQueryEXT_is_not_12); +COMPILE_ASSERT(sizeof(EndQueryEXT) == 12, Sizeof_EndQueryEXT_is_not_12); COMPILE_ASSERT(offsetof(EndQueryEXT, header) == 0, OffsetOf_EndQueryEXT_header_not_0); COMPILE_ASSERT(offsetof(EndQueryEXT, target) == 4, @@ -8622,9 +8453,7 @@ struct InsertEventMarkerEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _bucket_id) { SetHeader(); @@ -8657,9 +8486,7 @@ struct PushGroupMarkerEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _bucket_id) { SetHeader(); @@ -8692,13 +8519,9 @@ struct PopGroupMarkerEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init() { - SetHeader(); - } + void Init() { SetHeader(); } void* Set(void* cmd) { static_cast<ValueType*>(cmd)->Init(); @@ -8723,9 +8546,7 @@ struct GenVertexArraysOES { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) { SetHeader(); @@ -8734,9 +8555,10 @@ struct GenVertexArraysOES { arrays_shm_offset = _arrays_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _arrays_shm_id, - uint32 _arrays_shm_offset) { + void* Set(void* cmd, + GLsizei _n, + uint32 _arrays_shm_id, + uint32 _arrays_shm_offset) { static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -8769,8 +8591,8 @@ struct GenVertexArraysOESImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -8780,8 +8602,7 @@ struct GenVertexArraysOESImmediate { void Init(GLsizei _n, GLuint* _arrays) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _arrays, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, GLuint* _arrays) { @@ -8811,9 +8632,7 @@ struct DeleteVertexArraysOES { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _n, uint32 _arrays_shm_id, uint32 _arrays_shm_offset) { SetHeader(); @@ -8822,9 +8641,10 @@ struct DeleteVertexArraysOES { arrays_shm_offset = _arrays_shm_offset; } - void* Set( - void* cmd, GLsizei _n, uint32 _arrays_shm_id, - uint32 _arrays_shm_offset) { + void* Set(void* cmd, + GLsizei _n, + uint32 _arrays_shm_id, + uint32 _arrays_shm_offset) { static_cast<ValueType*>(cmd)->Init(_n, _arrays_shm_id, _arrays_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -8857,8 +8677,8 @@ struct DeleteVertexArraysOESImmediate { } static uint32 ComputeSize(GLsizei n) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(n)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(n)); // NOLINT } void SetHeader(GLsizei n) { @@ -8868,8 +8688,7 @@ struct DeleteVertexArraysOESImmediate { void Init(GLsizei _n, const GLuint* _arrays) { SetHeader(_n); n = _n; - memcpy(ImmediateDataAddress(this), - _arrays, ComputeDataSize(_n)); + memcpy(ImmediateDataAddress(this), _arrays, ComputeDataSize(_n)); } void* Set(void* cmd, GLsizei _n, const GLuint* _arrays) { @@ -8901,9 +8720,7 @@ struct IsVertexArrayOES { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _array, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); @@ -8912,11 +8729,12 @@ struct IsVertexArrayOES { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _array, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_array, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _array, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_array, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -8947,9 +8765,7 @@ struct BindVertexArrayOES { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _array) { SetHeader(); @@ -8982,13 +8798,9 @@ struct SwapBuffers { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init() { - SetHeader(); - } + void Init() { SetHeader(); } void* Set(void* cmd) { static_cast<ValueType*>(cmd)->Init(); @@ -8998,8 +8810,7 @@ struct SwapBuffers { gpu::CommandHeader header; }; -COMPILE_ASSERT(sizeof(SwapBuffers) == 4, - Sizeof_SwapBuffers_is_not_4); +COMPILE_ASSERT(sizeof(SwapBuffers) == 4, Sizeof_SwapBuffers_is_not_4); COMPILE_ASSERT(offsetof(SwapBuffers, header) == 0, OffsetOf_SwapBuffers_header_not_0); @@ -9015,13 +8826,14 @@ struct GetMaxValueInBufferCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _buffer_id, GLsizei _count, GLenum _type, GLuint _offset, - uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _buffer_id, + GLsizei _count, + GLenum _type, + GLuint _offset, + uint32 _result_shm_id, + uint32 _result_shm_offset) { SetHeader(); buffer_id = _buffer_id; count = _count; @@ -9031,13 +8843,15 @@ struct GetMaxValueInBufferCHROMIUM { result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _buffer_id, GLsizei _count, GLenum _type, - GLuint _offset, uint32 _result_shm_id, uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _buffer_id, _count, _type, _offset, _result_shm_id, - _result_shm_offset); + void* Set(void* cmd, + GLuint _buffer_id, + GLsizei _count, + GLenum _type, + GLuint _offset, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd)->Init( + _buffer_id, _count, _type, _offset, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -9077,13 +8891,13 @@ struct GenSharedIdsCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _namespace_id, GLuint _id_offset, GLsizei _n, uint32 _ids_shm_id, - uint32 _ids_shm_offset) { + void Init(GLuint _namespace_id, + GLuint _id_offset, + GLsizei _n, + uint32 _ids_shm_id, + uint32 _ids_shm_offset) { SetHeader(); namespace_id = _namespace_id; id_offset = _id_offset; @@ -9092,12 +8906,14 @@ struct GenSharedIdsCHROMIUM { ids_shm_offset = _ids_shm_offset; } - void* Set( - void* cmd, GLuint _namespace_id, GLuint _id_offset, GLsizei _n, - uint32 _ids_shm_id, uint32 _ids_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _namespace_id, _id_offset, _n, _ids_shm_id, _ids_shm_offset); + void* Set(void* cmd, + GLuint _namespace_id, + GLuint _id_offset, + GLsizei _n, + uint32 _ids_shm_id, + uint32 _ids_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_namespace_id, _id_offset, _n, _ids_shm_id, _ids_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -9134,13 +8950,12 @@ struct DeleteSharedIdsCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id, - uint32 _ids_shm_offset) { + void Init(GLuint _namespace_id, + GLsizei _n, + uint32 _ids_shm_id, + uint32 _ids_shm_offset) { SetHeader(); namespace_id = _namespace_id; n = _n; @@ -9148,11 +8963,13 @@ struct DeleteSharedIdsCHROMIUM { ids_shm_offset = _ids_shm_offset; } - void* Set( - void* cmd, GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id, - uint32 _ids_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset); + void* Set(void* cmd, + GLuint _namespace_id, + GLsizei _n, + uint32 _ids_shm_id, + uint32 _ids_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -9186,13 +9003,12 @@ struct RegisterSharedIdsCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id, - uint32 _ids_shm_offset) { + void Init(GLuint _namespace_id, + GLsizei _n, + uint32 _ids_shm_id, + uint32 _ids_shm_offset) { SetHeader(); namespace_id = _namespace_id; n = _n; @@ -9200,11 +9016,13 @@ struct RegisterSharedIdsCHROMIUM { ids_shm_offset = _ids_shm_offset; } - void* Set( - void* cmd, GLuint _namespace_id, GLsizei _n, uint32 _ids_shm_id, - uint32 _ids_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset); + void* Set(void* cmd, + GLuint _namespace_id, + GLsizei _n, + uint32 _ids_shm_id, + uint32 _ids_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -9240,23 +9058,23 @@ struct EnableFeatureCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _bucket_id, uint32 _result_shm_id, uint32 _result_shm_offset) { + void Init(GLuint _bucket_id, + uint32 _result_shm_id, + uint32 _result_shm_offset) { SetHeader(); bucket_id = _bucket_id; result_shm_id = _result_shm_id; result_shm_offset = _result_shm_offset; } - void* Set( - void* cmd, GLuint _bucket_id, uint32 _result_shm_id, - uint32 _result_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_bucket_id, _result_shm_id, _result_shm_offset); + void* Set(void* cmd, + GLuint _bucket_id, + uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_bucket_id, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -9287,9 +9105,7 @@ struct ResizeCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _width, GLuint _height, GLfloat _scale_factor) { SetHeader(); @@ -9309,8 +9125,7 @@ struct ResizeCHROMIUM { float scale_factor; }; -COMPILE_ASSERT(sizeof(ResizeCHROMIUM) == 16, - Sizeof_ResizeCHROMIUM_is_not_16); +COMPILE_ASSERT(sizeof(ResizeCHROMIUM) == 16, Sizeof_ResizeCHROMIUM_is_not_16); COMPILE_ASSERT(offsetof(ResizeCHROMIUM, header) == 0, OffsetOf_ResizeCHROMIUM_header_not_0); COMPILE_ASSERT(offsetof(ResizeCHROMIUM, width) == 4, @@ -9330,9 +9145,7 @@ struct GetRequestableExtensionsCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(uint32 _bucket_id) { SetHeader(); @@ -9365,9 +9178,7 @@ struct RequestExtensionCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(uint32 _bucket_id) { SetHeader(); @@ -9400,13 +9211,14 @@ struct GetMultipleIntegervCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - uint32 _pnames_shm_id, uint32 _pnames_shm_offset, GLuint _count, - uint32 _results_shm_id, uint32 _results_shm_offset, GLsizeiptr _size) { + void Init(uint32 _pnames_shm_id, + uint32 _pnames_shm_offset, + GLuint _count, + uint32 _results_shm_id, + uint32 _results_shm_offset, + GLsizeiptr _size) { SetHeader(); pnames_shm_id = _pnames_shm_id; pnames_shm_offset = _pnames_shm_offset; @@ -9416,14 +9228,19 @@ struct GetMultipleIntegervCHROMIUM { size = _size; } - void* Set( - void* cmd, uint32 _pnames_shm_id, uint32 _pnames_shm_offset, - GLuint _count, uint32 _results_shm_id, uint32 _results_shm_offset, - GLsizeiptr _size) { - static_cast<ValueType*>( - cmd)->Init( - _pnames_shm_id, _pnames_shm_offset, _count, _results_shm_id, - _results_shm_offset, _size); + void* Set(void* cmd, + uint32 _pnames_shm_id, + uint32 _pnames_shm_offset, + GLuint _count, + uint32 _results_shm_id, + uint32 _results_shm_offset, + GLsizeiptr _size) { + static_cast<ValueType*>(cmd)->Init(_pnames_shm_id, + _pnames_shm_offset, + _count, + _results_shm_id, + _results_shm_offset, + _size); return NextCmdAddress<ValueType>(cmd); } @@ -9469,9 +9286,7 @@ struct GetProgramInfoCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program, uint32 _bucket_id) { SetHeader(); @@ -9514,9 +9329,7 @@ struct GetTranslatedShaderSourceANGLE { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _shader, uint32 _bucket_id) { SetHeader(); @@ -9553,9 +9366,7 @@ struct PostSubBufferCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLint _x, GLint _y, GLint _width, GLint _height) { SetHeader(); @@ -9600,13 +9411,13 @@ struct TexImageIOSurface2DCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLsizei _width, GLsizei _height, GLuint _ioSurfaceId, - GLuint _plane) { + void Init(GLenum _target, + GLsizei _width, + GLsizei _height, + GLuint _ioSurfaceId, + GLuint _plane) { SetHeader(); target = _target; width = _width; @@ -9615,11 +9426,14 @@ struct TexImageIOSurface2DCHROMIUM { plane = _plane; } - void* Set( - void* cmd, GLenum _target, GLsizei _width, GLsizei _height, - GLuint _ioSurfaceId, GLuint _plane) { - static_cast<ValueType*>( - cmd)->Init(_target, _width, _height, _ioSurfaceId, _plane); + void* Set(void* cmd, + GLenum _target, + GLsizei _width, + GLsizei _height, + GLuint _ioSurfaceId, + GLuint _plane) { + static_cast<ValueType*>(cmd) + ->Init(_target, _width, _height, _ioSurfaceId, _plane); return NextCmdAddress<ValueType>(cmd); } @@ -9656,13 +9470,14 @@ struct CopyTextureCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLenum _source_id, GLenum _dest_id, GLint _level, - GLint _internalformat, GLenum _dest_type) { + void Init(GLenum _target, + GLenum _source_id, + GLenum _dest_id, + GLint _level, + GLint _internalformat, + GLenum _dest_type) { SetHeader(); target = _target; source_id = _source_id; @@ -9672,13 +9487,15 @@ struct CopyTextureCHROMIUM { dest_type = _dest_type; } - void* Set( - void* cmd, GLenum _target, GLenum _source_id, GLenum _dest_id, - GLint _level, GLint _internalformat, GLenum _dest_type) { - static_cast<ValueType*>( - cmd)->Init( - _target, _source_id, _dest_id, _level, _internalformat, - _dest_type); + void* Set(void* cmd, + GLenum _target, + GLenum _source_id, + GLenum _dest_id, + GLint _level, + GLint _internalformat, + GLenum _dest_type) { + static_cast<ValueType*>(cmd)->Init( + _target, _source_id, _dest_id, _level, _internalformat, _dest_type); return NextCmdAddress<ValueType>(cmd); } @@ -9718,9 +9535,7 @@ struct DrawArraysInstancedANGLE { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) { SetHeader(); @@ -9730,9 +9545,11 @@ struct DrawArraysInstancedANGLE { primcount = _primcount; } - void* Set( - void* cmd, GLenum _mode, GLint _first, GLsizei _count, - GLsizei _primcount) { + void* Set(void* cmd, + GLenum _mode, + GLint _first, + GLsizei _count, + GLsizei _primcount) { static_cast<ValueType*>(cmd)->Init(_mode, _first, _count, _primcount); return NextCmdAddress<ValueType>(cmd); } @@ -9767,13 +9584,13 @@ struct DrawElementsInstancedANGLE { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _mode, GLsizei _count, GLenum _type, GLuint _index_offset, - GLsizei _primcount) { + void Init(GLenum _mode, + GLsizei _count, + GLenum _type, + GLuint _index_offset, + GLsizei _primcount) { SetHeader(); mode = _mode; count = _count; @@ -9782,11 +9599,14 @@ struct DrawElementsInstancedANGLE { primcount = _primcount; } - void* Set( - void* cmd, GLenum _mode, GLsizei _count, GLenum _type, - GLuint _index_offset, GLsizei _primcount) { - static_cast<ValueType*>( - cmd)->Init(_mode, _count, _type, _index_offset, _primcount); + void* Set(void* cmd, + GLenum _mode, + GLsizei _count, + GLenum _type, + GLuint _index_offset, + GLsizei _primcount) { + static_cast<ValueType*>(cmd) + ->Init(_mode, _count, _type, _index_offset, _primcount); return NextCmdAddress<ValueType>(cmd); } @@ -9823,9 +9643,7 @@ struct VertexAttribDivisorANGLE { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _index, GLuint _divisor) { SetHeader(); @@ -9862,23 +9680,23 @@ struct ProduceTextureCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) { + void Init(GLenum _target, + uint32 _mailbox_shm_id, + uint32 _mailbox_shm_offset) { SetHeader(); target = _target; mailbox_shm_id = _mailbox_shm_id; mailbox_shm_offset = _mailbox_shm_offset; } - void* Set( - void* cmd, GLenum _target, uint32 _mailbox_shm_id, - uint32 _mailbox_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset); + void* Set(void* cmd, + GLenum _target, + uint32 _mailbox_shm_id, + uint32 _mailbox_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _mailbox_shm_id, _mailbox_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -9906,24 +9724,20 @@ struct ProduceTextureCHROMIUMImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLbyte) * 64); // NOLINT + return static_cast<uint32>(sizeof(GLbyte) * 64); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLenum _target, const GLbyte* _mailbox) { SetHeader(); target = _target; - memcpy(ImmediateDataAddress(this), - _mailbox, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize()); } void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { @@ -9953,23 +9767,23 @@ struct ConsumeTextureCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, uint32 _mailbox_shm_id, uint32 _mailbox_shm_offset) { + void Init(GLenum _target, + uint32 _mailbox_shm_id, + uint32 _mailbox_shm_offset) { SetHeader(); target = _target; mailbox_shm_id = _mailbox_shm_id; mailbox_shm_offset = _mailbox_shm_offset; } - void* Set( - void* cmd, GLenum _target, uint32 _mailbox_shm_id, - uint32 _mailbox_shm_offset) { - static_cast<ValueType*>( - cmd)->Init(_target, _mailbox_shm_id, _mailbox_shm_offset); + void* Set(void* cmd, + GLenum _target, + uint32 _mailbox_shm_id, + uint32 _mailbox_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _mailbox_shm_id, _mailbox_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -9997,24 +9811,20 @@ struct ConsumeTextureCHROMIUMImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); static uint32 ComputeDataSize() { - return static_cast<uint32>( - sizeof(GLbyte) * 64); // NOLINT + return static_cast<uint32>(sizeof(GLbyte) * 64); // NOLINT } static uint32 ComputeSize() { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize()); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize()); // NOLINT } - void SetHeader() { - header.SetCmdByTotalSize<ValueType>(ComputeSize()); - } + void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } void Init(GLenum _target, const GLbyte* _mailbox) { SetHeader(); target = _target; - memcpy(ImmediateDataAddress(this), - _mailbox, ComputeDataSize()); + memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize()); } void* Set(void* cmd, GLenum _target, const GLbyte* _mailbox) { @@ -10044,13 +9854,13 @@ struct BindUniformLocationCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLuint _program, GLint _location, uint32 _name_shm_id, - uint32 _name_shm_offset, uint32 _data_size) { + void Init(GLuint _program, + GLint _location, + uint32 _name_shm_id, + uint32 _name_shm_offset, + uint32 _data_size) { SetHeader(); program = _program; location = _location; @@ -10059,12 +9869,14 @@ struct BindUniformLocationCHROMIUM { data_size = _data_size; } - void* Set( - void* cmd, GLuint _program, GLint _location, uint32 _name_shm_id, - uint32 _name_shm_offset, uint32 _data_size) { - static_cast<ValueType*>( - cmd)->Init( - _program, _location, _name_shm_id, _name_shm_offset, _data_size); + void* Set(void* cmd, + GLuint _program, + GLint _location, + uint32 _name_shm_id, + uint32 _name_shm_offset, + uint32 _data_size) { + static_cast<ValueType*>(cmd) + ->Init(_program, _location, _name_shm_id, _name_shm_offset, _data_size); return NextCmdAddress<ValueType>(cmd); } @@ -10101,9 +9913,7 @@ struct BindUniformLocationCHROMIUMBucket { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _program, GLint _location, uint32 _name_bucket_id) { SetHeader(); @@ -10112,8 +9922,10 @@ struct BindUniformLocationCHROMIUMBucket { name_bucket_id = _name_bucket_id; } - void* Set( - void* cmd, GLuint _program, GLint _location, uint32 _name_bucket_id) { + void* Set(void* cmd, + GLuint _program, + GLint _location, + uint32 _name_bucket_id) { static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id); return NextCmdAddress<ValueType>(cmd); } @@ -10134,7 +9946,7 @@ COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8); COMPILE_ASSERT( offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, - OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12); // NOLINT + OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12); // NOLINT struct BindTexImage2DCHROMIUM { typedef BindTexImage2DCHROMIUM ValueType; @@ -10146,9 +9958,7 @@ struct BindTexImage2DCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLint _imageId) { SetHeader(); @@ -10185,9 +9995,7 @@ struct ReleaseTexImage2DCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target, GLint _imageId) { SetHeader(); @@ -10224,9 +10032,7 @@ struct TraceBeginCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _bucket_id) { SetHeader(); @@ -10259,13 +10065,9 @@ struct TraceEndCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init() { - SetHeader(); - } + void Init() { SetHeader(); } void* Set(void* cmd) { static_cast<ValueType*>(cmd)->Init(); @@ -10275,8 +10077,7 @@ struct TraceEndCHROMIUM { gpu::CommandHeader header; }; -COMPILE_ASSERT(sizeof(TraceEndCHROMIUM) == 4, - Sizeof_TraceEndCHROMIUM_is_not_4); +COMPILE_ASSERT(sizeof(TraceEndCHROMIUM) == 4, Sizeof_TraceEndCHROMIUM_is_not_4); COMPILE_ASSERT(offsetof(TraceEndCHROMIUM, header) == 0, OffsetOf_TraceEndCHROMIUM_header_not_0); @@ -10290,14 +10091,18 @@ struct AsyncTexSubImage2DCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - uint32 _data_shm_id, uint32 _data_shm_offset) { + void Init(GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLenum _type, + uint32 _data_shm_id, + uint32 _data_shm_offset) { SetHeader(); target = _target; level = _level; @@ -10311,14 +10116,27 @@ struct AsyncTexSubImage2DCHROMIUM { data_shm_offset = _data_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - uint32 _data_shm_id, uint32 _data_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _width, _height, _format, - _type, _data_shm_id, _data_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLint _xoffset, + GLint _yoffset, + GLsizei _width, + GLsizei _height, + GLenum _format, + GLenum _type, + uint32 _data_shm_id, + uint32 _data_shm_offset) { + static_cast<ValueType*>(cmd)->Init(_target, + _level, + _xoffset, + _yoffset, + _width, + _height, + _format, + _type, + _data_shm_id, + _data_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -10370,14 +10188,18 @@ struct AsyncTexImage2DCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLint _level, GLint _internalformat, GLsizei _width, - GLsizei _height, GLint _border, GLenum _format, GLenum _type, - uint32 _pixels_shm_id, uint32 _pixels_shm_offset) { + void Init(GLenum _target, + GLint _level, + GLint _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset) { SetHeader(); target = _target; level = _level; @@ -10391,14 +10213,27 @@ struct AsyncTexImage2DCHROMIUM { pixels_shm_offset = _pixels_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _internalformat, - GLsizei _width, GLsizei _height, GLint _border, GLenum _format, - GLenum _type, uint32 _pixels_shm_id, uint32 _pixels_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _width, _height, _border, _format, - _type, _pixels_shm_id, _pixels_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLint _level, + GLint _internalformat, + GLsizei _width, + GLsizei _height, + GLint _border, + GLenum _format, + GLenum _type, + uint32 _pixels_shm_id, + uint32 _pixels_shm_offset) { + static_cast<ValueType*>(cmd)->Init(_target, + _level, + _internalformat, + _width, + _height, + _border, + _format, + _type, + _pixels_shm_id, + _pixels_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -10450,9 +10285,7 @@ struct WaitAsyncTexImage2DCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _target) { SetHeader(); @@ -10485,13 +10318,12 @@ struct DiscardFramebufferEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init( - GLenum _target, GLsizei _count, uint32 _attachments_shm_id, - uint32 _attachments_shm_offset) { + void Init(GLenum _target, + GLsizei _count, + uint32 _attachments_shm_id, + uint32 _attachments_shm_offset) { SetHeader(); target = _target; count = _count; @@ -10499,12 +10331,13 @@ struct DiscardFramebufferEXT { attachments_shm_offset = _attachments_shm_offset; } - void* Set( - void* cmd, GLenum _target, GLsizei _count, uint32 _attachments_shm_id, - uint32 _attachments_shm_offset) { - static_cast<ValueType*>( - cmd)->Init( - _target, _count, _attachments_shm_id, _attachments_shm_offset); + void* Set(void* cmd, + GLenum _target, + GLsizei _count, + uint32 _attachments_shm_id, + uint32 _attachments_shm_offset) { + static_cast<ValueType*>(cmd) + ->Init(_target, _count, _attachments_shm_id, _attachments_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -10535,13 +10368,12 @@ struct DiscardFramebufferEXTImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLenum) * 1 * count); // NOLINT + return static_cast<uint32>(sizeof(GLenum) * 1 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -10552,12 +10384,13 @@ struct DiscardFramebufferEXTImmediate { SetHeader(_count); target = _target; count = _count; - memcpy(ImmediateDataAddress(this), - _attachments, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _attachments, ComputeDataSize(_count)); } - void* Set( - void* cmd, GLenum _target, GLsizei _count, const GLenum* _attachments) { + void* Set(void* cmd, + GLenum _target, + GLsizei _count, + const GLenum* _attachments) { static_cast<ValueType*>(cmd)->Init(_target, _count, _attachments); const uint32 size = ComputeSize(_count); return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); @@ -10587,9 +10420,7 @@ struct LoseContextCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLenum _current, GLenum _other) { SetHeader(); @@ -10626,9 +10457,7 @@ struct WaitSyncPointCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLuint _sync_point) { SetHeader(); @@ -10661,9 +10490,7 @@ struct DrawBuffersEXT { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } void Init(GLsizei _count, uint32 _bufs_shm_id, uint32 _bufs_shm_offset) { SetHeader(); @@ -10672,9 +10499,10 @@ struct DrawBuffersEXT { bufs_shm_offset = _bufs_shm_offset; } - void* Set( - void* cmd, GLsizei _count, uint32 _bufs_shm_id, - uint32 _bufs_shm_offset) { + void* Set(void* cmd, + GLsizei _count, + uint32 _bufs_shm_id, + uint32 _bufs_shm_offset) { static_cast<ValueType*>(cmd)->Init(_count, _bufs_shm_id, _bufs_shm_offset); return NextCmdAddress<ValueType>(cmd); } @@ -10685,8 +10513,7 @@ struct DrawBuffersEXT { uint32 bufs_shm_offset; }; -COMPILE_ASSERT(sizeof(DrawBuffersEXT) == 16, - Sizeof_DrawBuffersEXT_is_not_16); +COMPILE_ASSERT(sizeof(DrawBuffersEXT) == 16, Sizeof_DrawBuffersEXT_is_not_16); COMPILE_ASSERT(offsetof(DrawBuffersEXT, header) == 0, OffsetOf_DrawBuffersEXT_header_not_0); COMPILE_ASSERT(offsetof(DrawBuffersEXT, count) == 4, @@ -10703,13 +10530,12 @@ struct DrawBuffersEXTImmediate { static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); static uint32 ComputeDataSize(GLsizei count) { - return static_cast<uint32>( - sizeof(GLenum) * 1 * count); // NOLINT + return static_cast<uint32>(sizeof(GLenum) * 1 * count); // NOLINT } static uint32 ComputeSize(GLsizei count) { - return static_cast<uint32>( - sizeof(ValueType) + ComputeDataSize(count)); // NOLINT + return static_cast<uint32>(sizeof(ValueType) + + ComputeDataSize(count)); // NOLINT } void SetHeader(GLsizei count) { @@ -10719,8 +10545,7 @@ struct DrawBuffersEXTImmediate { void Init(GLsizei _count, const GLenum* _bufs) { SetHeader(_count); count = _count; - memcpy(ImmediateDataAddress(this), - _bufs, ComputeDataSize(_count)); + memcpy(ImmediateDataAddress(this), _bufs, ComputeDataSize(_count)); } void* Set(void* cmd, GLsizei _count, const GLenum* _bufs) { @@ -10750,13 +10575,9 @@ struct DiscardBackbufferCHROMIUM { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } - void SetHeader() { - header.SetCmd<ValueType>(); - } + void SetHeader() { header.SetCmd<ValueType>(); } - void Init() { - SetHeader(); - } + void Init() { SetHeader(); } void* Set(void* cmd) { static_cast<ValueType*>(cmd)->Init(); @@ -10771,6 +10592,4 @@ COMPILE_ASSERT(sizeof(DiscardBackbufferCHROMIUM) == 4, COMPILE_ASSERT(offsetof(DiscardBackbufferCHROMIUM, header) == 0, OffsetOf_DiscardBackbufferCHROMIUM_header_not_0); - #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ - diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h index efb6daf..ff172a1 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // This file contains unit tests for gles2 commmands @@ -14,41 +16,34 @@ TEST_F(GLES2FormatTest, ActiveTexture) { cmds::ActiveTexture& cmd = *GetBufferAs<cmds::ActiveTexture>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); EXPECT_EQ(static_cast<uint32>(cmds::ActiveTexture::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.texture); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, AttachShader) { cmds::AttachShader& cmd = *GetBufferAs<cmds::AttachShader>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::AttachShader::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); EXPECT_EQ(static_cast<GLuint>(12), cmd.shader); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindAttribLocation) { cmds::BindAttribLocation& cmd = *GetBufferAs<cmds::BindAttribLocation>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12), - static_cast<uint32>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLuint>(12), + static_cast<uint32>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::BindAttribLocation::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -57,159 +52,128 @@ TEST_F(GLES2FormatTest, BindAttribLocation) { EXPECT_EQ(static_cast<uint32>(13), cmd.name_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.name_shm_offset); EXPECT_EQ(static_cast<uint32>(15), cmd.data_size); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindAttribLocationBucket) { cmds::BindAttribLocationBucket& cmd = *GetBufferAs<cmds::BindAttribLocationBucket>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLuint>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::BindAttribLocationBucket::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); EXPECT_EQ(static_cast<GLuint>(12), cmd.index); EXPECT_EQ(static_cast<uint32>(13), cmd.name_bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindBuffer) { cmds::BindBuffer& cmd = *GetBufferAs<cmds::BindBuffer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLuint>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::BindBuffer::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::BindBuffer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLuint>(12), cmd.buffer); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindFramebuffer) { cmds::BindFramebuffer& cmd = *GetBufferAs<cmds::BindFramebuffer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLuint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::BindFramebuffer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLuint>(12), cmd.framebuffer); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindRenderbuffer) { cmds::BindRenderbuffer& cmd = *GetBufferAs<cmds::BindRenderbuffer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLuint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::BindRenderbuffer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLuint>(12), cmd.renderbuffer); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindTexture) { cmds::BindTexture& cmd = *GetBufferAs<cmds::BindTexture>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLuint>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::BindTexture::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::BindTexture::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLuint>(12), cmd.texture); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BlendColor) { cmds::BlendColor& cmd = *GetBufferAs<cmds::BlendColor>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLclampf>(11), - static_cast<GLclampf>(12), - static_cast<GLclampf>(13), - static_cast<GLclampf>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::BlendColor::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLclampf>(11), + static_cast<GLclampf>(12), + static_cast<GLclampf>(13), + static_cast<GLclampf>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::BlendColor::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLclampf>(11), cmd.red); EXPECT_EQ(static_cast<GLclampf>(12), cmd.green); EXPECT_EQ(static_cast<GLclampf>(13), cmd.blue); EXPECT_EQ(static_cast<GLclampf>(14), cmd.alpha); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BlendEquation) { cmds::BlendEquation& cmd = *GetBufferAs<cmds::BlendEquation>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); EXPECT_EQ(static_cast<uint32>(cmds::BlendEquation::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.mode); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BlendEquationSeparate) { cmds::BlendEquationSeparate& cmd = *GetBufferAs<cmds::BlendEquationSeparate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12)); EXPECT_EQ(static_cast<uint32>(cmds::BlendEquationSeparate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.modeRGB); EXPECT_EQ(static_cast<GLenum>(12), cmd.modeAlpha); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BlendFunc) { cmds::BlendFunc& cmd = *GetBufferAs<cmds::BlendFunc>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::BlendFunc::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::BlendFunc::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.sfactor); EXPECT_EQ(static_cast<GLenum>(12), cmd.dfactor); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BlendFuncSeparate) { cmds::BlendFuncSeparate& cmd = *GetBufferAs<cmds::BlendFuncSeparate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13), - static_cast<GLenum>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13), + static_cast<GLenum>(14)); EXPECT_EQ(static_cast<uint32>(cmds::BlendFuncSeparate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -217,40 +181,35 @@ TEST_F(GLES2FormatTest, BlendFuncSeparate) { EXPECT_EQ(static_cast<GLenum>(12), cmd.dstRGB); EXPECT_EQ(static_cast<GLenum>(13), cmd.srcAlpha); EXPECT_EQ(static_cast<GLenum>(14), cmd.dstAlpha); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BufferData) { cmds::BufferData& cmd = *GetBufferAs<cmds::BufferData>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizeiptr>(12), - static_cast<uint32>(13), - static_cast<uint32>(14), - static_cast<GLenum>(15)); - EXPECT_EQ(static_cast<uint32>(cmds::BufferData::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizeiptr>(12), + static_cast<uint32>(13), + static_cast<uint32>(14), + static_cast<GLenum>(15)); + EXPECT_EQ(static_cast<uint32>(cmds::BufferData::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLsizeiptr>(12), cmd.size); EXPECT_EQ(static_cast<uint32>(13), cmd.data_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.data_shm_offset); EXPECT_EQ(static_cast<GLenum>(15), cmd.usage); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BufferSubData) { cmds::BufferSubData& cmd = *GetBufferAs<cmds::BufferSubData>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLintptr>(12), - static_cast<GLsizeiptr>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLintptr>(12), + static_cast<GLsizeiptr>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::BufferSubData::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -259,131 +218,107 @@ TEST_F(GLES2FormatTest, BufferSubData) { EXPECT_EQ(static_cast<GLsizeiptr>(13), cmd.size); EXPECT_EQ(static_cast<uint32>(14), cmd.data_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.data_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CheckFramebufferStatus) { cmds::CheckFramebufferStatus& cmd = *GetBufferAs<cmds::CheckFramebufferStatus>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::CheckFramebufferStatus::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Clear) { cmds::Clear& cmd = *GetBufferAs<cmds::Clear>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLbitfield>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::Clear::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLbitfield>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::Clear::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLbitfield>(11), cmd.mask); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ClearColor) { cmds::ClearColor& cmd = *GetBufferAs<cmds::ClearColor>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLclampf>(11), - static_cast<GLclampf>(12), - static_cast<GLclampf>(13), - static_cast<GLclampf>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::ClearColor::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLclampf>(11), + static_cast<GLclampf>(12), + static_cast<GLclampf>(13), + static_cast<GLclampf>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::ClearColor::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLclampf>(11), cmd.red); EXPECT_EQ(static_cast<GLclampf>(12), cmd.green); EXPECT_EQ(static_cast<GLclampf>(13), cmd.blue); EXPECT_EQ(static_cast<GLclampf>(14), cmd.alpha); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ClearDepthf) { cmds::ClearDepthf& cmd = *GetBufferAs<cmds::ClearDepthf>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLclampf>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::ClearDepthf::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLclampf>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::ClearDepthf::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLclampf>(11), cmd.depth); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ClearStencil) { cmds::ClearStencil& cmd = *GetBufferAs<cmds::ClearStencil>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::ClearStencil::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.s); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ColorMask) { cmds::ColorMask& cmd = *GetBufferAs<cmds::ColorMask>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLboolean>(11), - static_cast<GLboolean>(12), - static_cast<GLboolean>(13), - static_cast<GLboolean>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::ColorMask::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLboolean>(11), + static_cast<GLboolean>(12), + static_cast<GLboolean>(13), + static_cast<GLboolean>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::ColorMask::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLboolean>(11), cmd.red); EXPECT_EQ(static_cast<GLboolean>(12), cmd.green); EXPECT_EQ(static_cast<GLboolean>(13), cmd.blue); EXPECT_EQ(static_cast<GLboolean>(14), cmd.alpha); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CompileShader) { cmds::CompileShader& cmd = *GetBufferAs<cmds::CompileShader>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::CompileShader::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CompressedTexImage2D) { cmds::CompressedTexImage2D& cmd = *GetBufferAs<cmds::CompressedTexImage2D>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLenum>(13), - static_cast<GLsizei>(14), - static_cast<GLsizei>(15), - static_cast<GLint>(16), - static_cast<GLsizei>(17), - static_cast<uint32>(18), - static_cast<uint32>(19)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLenum>(13), + static_cast<GLsizei>(14), + static_cast<GLsizei>(15), + static_cast<GLint>(16), + static_cast<GLsizei>(17), + static_cast<uint32>(18), + static_cast<uint32>(19)); EXPECT_EQ(static_cast<uint32>(cmds::CompressedTexImage2D::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -396,22 +331,20 @@ TEST_F(GLES2FormatTest, CompressedTexImage2D) { EXPECT_EQ(static_cast<GLsizei>(17), cmd.imageSize); EXPECT_EQ(static_cast<uint32>(18), cmd.data_shm_id); EXPECT_EQ(static_cast<uint32>(19), cmd.data_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CompressedTexImage2DBucket) { cmds::CompressedTexImage2DBucket& cmd = *GetBufferAs<cmds::CompressedTexImage2DBucket>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLenum>(13), - static_cast<GLsizei>(14), - static_cast<GLsizei>(15), - static_cast<GLint>(16), - static_cast<GLuint>(17)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLenum>(13), + static_cast<GLsizei>(14), + static_cast<GLsizei>(15), + static_cast<GLint>(16), + static_cast<GLuint>(17)); EXPECT_EQ(static_cast<uint32>(cmds::CompressedTexImage2DBucket::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -422,25 +355,23 @@ TEST_F(GLES2FormatTest, CompressedTexImage2DBucket) { EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); EXPECT_EQ(static_cast<GLint>(16), cmd.border); EXPECT_EQ(static_cast<GLuint>(17), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CompressedTexSubImage2D) { cmds::CompressedTexSubImage2D& cmd = *GetBufferAs<cmds::CompressedTexSubImage2D>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14), - static_cast<GLsizei>(15), - static_cast<GLsizei>(16), - static_cast<GLenum>(17), - static_cast<GLsizei>(18), - static_cast<uint32>(19), - static_cast<uint32>(20)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14), + static_cast<GLsizei>(15), + static_cast<GLsizei>(16), + static_cast<GLenum>(17), + static_cast<GLsizei>(18), + static_cast<uint32>(19), + static_cast<uint32>(20)); EXPECT_EQ(static_cast<uint32>(cmds::CompressedTexSubImage2D::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -454,23 +385,21 @@ TEST_F(GLES2FormatTest, CompressedTexSubImage2D) { EXPECT_EQ(static_cast<GLsizei>(18), cmd.imageSize); EXPECT_EQ(static_cast<uint32>(19), cmd.data_shm_id); EXPECT_EQ(static_cast<uint32>(20), cmd.data_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CompressedTexSubImage2DBucket) { cmds::CompressedTexSubImage2DBucket& cmd = *GetBufferAs<cmds::CompressedTexSubImage2DBucket>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14), - static_cast<GLsizei>(15), - static_cast<GLsizei>(16), - static_cast<GLenum>(17), - static_cast<GLuint>(18)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14), + static_cast<GLsizei>(15), + static_cast<GLsizei>(16), + static_cast<GLenum>(17), + static_cast<GLuint>(18)); EXPECT_EQ(static_cast<uint32>(cmds::CompressedTexSubImage2DBucket::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -482,22 +411,20 @@ TEST_F(GLES2FormatTest, CompressedTexSubImage2DBucket) { EXPECT_EQ(static_cast<GLsizei>(16), cmd.height); EXPECT_EQ(static_cast<GLenum>(17), cmd.format); EXPECT_EQ(static_cast<GLuint>(18), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CopyTexImage2D) { cmds::CopyTexImage2D& cmd = *GetBufferAs<cmds::CopyTexImage2D>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLenum>(13), - static_cast<GLint>(14), - static_cast<GLint>(15), - static_cast<GLsizei>(16), - static_cast<GLsizei>(17), - static_cast<GLint>(18)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLenum>(13), + static_cast<GLint>(14), + static_cast<GLint>(15), + static_cast<GLsizei>(16), + static_cast<GLsizei>(17), + static_cast<GLint>(18)); EXPECT_EQ(static_cast<uint32>(cmds::CopyTexImage2D::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -509,22 +436,20 @@ TEST_F(GLES2FormatTest, CopyTexImage2D) { EXPECT_EQ(static_cast<GLsizei>(16), cmd.width); EXPECT_EQ(static_cast<GLsizei>(17), cmd.height); EXPECT_EQ(static_cast<GLint>(18), cmd.border); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CopyTexSubImage2D) { cmds::CopyTexSubImage2D& cmd = *GetBufferAs<cmds::CopyTexSubImage2D>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14), - static_cast<GLint>(15), - static_cast<GLint>(16), - static_cast<GLsizei>(17), - static_cast<GLsizei>(18)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14), + static_cast<GLint>(15), + static_cast<GLint>(16), + static_cast<GLsizei>(17), + static_cast<GLsizei>(18)); EXPECT_EQ(static_cast<uint32>(cmds::CopyTexSubImage2D::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -536,325 +461,266 @@ TEST_F(GLES2FormatTest, CopyTexSubImage2D) { EXPECT_EQ(static_cast<GLint>(16), cmd.y); EXPECT_EQ(static_cast<GLsizei>(17), cmd.width); EXPECT_EQ(static_cast<GLsizei>(18), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CreateProgram) { cmds::CreateProgram& cmd = *GetBufferAs<cmds::CreateProgram>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<uint32>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<uint32>(11)); EXPECT_EQ(static_cast<uint32>(cmds::CreateProgram::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<uint32>(11), cmd.client_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CreateShader) { cmds::CreateShader& cmd = *GetBufferAs<cmds::CreateShader>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<uint32>(12)); EXPECT_EQ(static_cast<uint32>(cmds::CreateShader::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.type); EXPECT_EQ(static_cast<uint32>(12), cmd.client_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CullFace) { cmds::CullFace& cmd = *GetBufferAs<cmds::CullFace>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::CullFace::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::CullFace::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.mode); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteBuffers) { cmds::DeleteBuffers& cmd = *GetBufferAs<cmds::DeleteBuffers>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteBuffers::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.buffers_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.buffers_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteBuffersImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::DeleteBuffersImmediate& cmd = *GetBufferAs<cmds::DeleteBuffersImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::DeleteBuffersImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, DeleteFramebuffers) { cmds::DeleteFramebuffers& cmd = *GetBufferAs<cmds::DeleteFramebuffers>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteFramebuffers::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.framebuffers_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.framebuffers_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteFramebuffersImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::DeleteFramebuffersImmediate& cmd = *GetBufferAs<cmds::DeleteFramebuffersImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::DeleteFramebuffersImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, DeleteProgram) { cmds::DeleteProgram& cmd = *GetBufferAs<cmds::DeleteProgram>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteProgram::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteRenderbuffers) { cmds::DeleteRenderbuffers& cmd = *GetBufferAs<cmds::DeleteRenderbuffers>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteRenderbuffers::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.renderbuffers_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.renderbuffers_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteRenderbuffersImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::DeleteRenderbuffersImmediate& cmd = *GetBufferAs<cmds::DeleteRenderbuffersImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::DeleteRenderbuffersImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, DeleteShader) { cmds::DeleteShader& cmd = *GetBufferAs<cmds::DeleteShader>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteShader::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteTextures) { cmds::DeleteTextures& cmd = *GetBufferAs<cmds::DeleteTextures>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteTextures::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.textures_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.textures_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteTexturesImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::DeleteTexturesImmediate& cmd = *GetBufferAs<cmds::DeleteTexturesImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::DeleteTexturesImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, DepthFunc) { cmds::DepthFunc& cmd = *GetBufferAs<cmds::DepthFunc>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::DepthFunc::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::DepthFunc::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.func); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DepthMask) { cmds::DepthMask& cmd = *GetBufferAs<cmds::DepthMask>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLboolean>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::DepthMask::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLboolean>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::DepthMask::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLboolean>(11), cmd.flag); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DepthRangef) { cmds::DepthRangef& cmd = *GetBufferAs<cmds::DepthRangef>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLclampf>(11), - static_cast<GLclampf>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::DepthRangef::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLclampf>(11), static_cast<GLclampf>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::DepthRangef::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLclampf>(11), cmd.zNear); EXPECT_EQ(static_cast<GLclampf>(12), cmd.zFar); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DetachShader) { cmds::DetachShader& cmd = *GetBufferAs<cmds::DetachShader>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::DetachShader::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); EXPECT_EQ(static_cast<GLuint>(12), cmd.shader); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Disable) { cmds::Disable& cmd = *GetBufferAs<cmds::Disable>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::Disable::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::Disable::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.cap); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DisableVertexAttribArray) { cmds::DisableVertexAttribArray& cmd = *GetBufferAs<cmds::DisableVertexAttribArray>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::DisableVertexAttribArray::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.index); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DrawArrays) { cmds::DrawArrays& cmd = *GetBufferAs<cmds::DrawArrays>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLsizei>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::DrawArrays::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLsizei>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::DrawArrays::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.mode); EXPECT_EQ(static_cast<GLint>(12), cmd.first); EXPECT_EQ(static_cast<GLsizei>(13), cmd.count); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DrawElements) { cmds::DrawElements& cmd = *GetBufferAs<cmds::DrawElements>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizei>(12), - static_cast<GLenum>(13), - static_cast<GLuint>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizei>(12), + static_cast<GLenum>(13), + static_cast<GLuint>(14)); EXPECT_EQ(static_cast<uint32>(cmds::DrawElements::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -862,68 +728,53 @@ TEST_F(GLES2FormatTest, DrawElements) { EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<GLenum>(13), cmd.type); EXPECT_EQ(static_cast<GLuint>(14), cmd.index_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Enable) { cmds::Enable& cmd = *GetBufferAs<cmds::Enable>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::Enable::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::Enable::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.cap); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, EnableVertexAttribArray) { cmds::EnableVertexAttribArray& cmd = *GetBufferAs<cmds::EnableVertexAttribArray>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::EnableVertexAttribArray::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.index); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Finish) { cmds::Finish& cmd = *GetBufferAs<cmds::Finish>(); - void* next_cmd = cmd.Set( - &cmd); - EXPECT_EQ(static_cast<uint32>(cmds::Finish::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd); + EXPECT_EQ(static_cast<uint32>(cmds::Finish::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Flush) { cmds::Flush& cmd = *GetBufferAs<cmds::Flush>(); - void* next_cmd = cmd.Set( - &cmd); - EXPECT_EQ(static_cast<uint32>(cmds::Flush::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd); + EXPECT_EQ(static_cast<uint32>(cmds::Flush::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, FramebufferRenderbuffer) { cmds::FramebufferRenderbuffer& cmd = *GetBufferAs<cmds::FramebufferRenderbuffer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13), - static_cast<GLuint>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13), + static_cast<GLuint>(14)); EXPECT_EQ(static_cast<uint32>(cmds::FramebufferRenderbuffer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -931,19 +782,17 @@ TEST_F(GLES2FormatTest, FramebufferRenderbuffer) { EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment); EXPECT_EQ(static_cast<GLenum>(13), cmd.renderbuffertarget); EXPECT_EQ(static_cast<GLuint>(14), cmd.renderbuffer); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, FramebufferTexture2D) { cmds::FramebufferTexture2D& cmd = *GetBufferAs<cmds::FramebufferTexture2D>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13), - static_cast<GLuint>(14), - static_cast<GLint>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13), + static_cast<GLuint>(14), + static_cast<GLint>(15)); EXPECT_EQ(static_cast<uint32>(cmds::FramebufferTexture2D::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -952,183 +801,156 @@ TEST_F(GLES2FormatTest, FramebufferTexture2D) { EXPECT_EQ(static_cast<GLenum>(13), cmd.textarget); EXPECT_EQ(static_cast<GLuint>(14), cmd.texture); EXPECT_EQ(static_cast<GLint>(15), cmd.level); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, FrontFace) { cmds::FrontFace& cmd = *GetBufferAs<cmds::FrontFace>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::FrontFace::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::FrontFace::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.mode); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenBuffers) { cmds::GenBuffers& cmd = *GetBufferAs<cmds::GenBuffers>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::GenBuffers::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::GenBuffers::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.buffers_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.buffers_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenBuffersImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::GenBuffersImmediate& cmd = *GetBufferAs<cmds::GenBuffersImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::GenBuffersImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, GenerateMipmap) { cmds::GenerateMipmap& cmd = *GetBufferAs<cmds::GenerateMipmap>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); EXPECT_EQ(static_cast<uint32>(cmds::GenerateMipmap::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenFramebuffers) { cmds::GenFramebuffers& cmd = *GetBufferAs<cmds::GenFramebuffers>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::GenFramebuffers::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.framebuffers_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.framebuffers_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenFramebuffersImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::GenFramebuffersImmediate& cmd = *GetBufferAs<cmds::GenFramebuffersImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::GenFramebuffersImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, GenRenderbuffers) { cmds::GenRenderbuffers& cmd = *GetBufferAs<cmds::GenRenderbuffers>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::GenRenderbuffers::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.renderbuffers_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.renderbuffers_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenRenderbuffersImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::GenRenderbuffersImmediate& cmd = *GetBufferAs<cmds::GenRenderbuffersImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::GenRenderbuffersImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, GenTextures) { cmds::GenTextures& cmd = *GetBufferAs<cmds::GenTextures>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::GenTextures::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::GenTextures::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.textures_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.textures_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenTexturesImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::GenTexturesImmediate& cmd = *GetBufferAs<cmds::GenTexturesImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::GenTexturesImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, GetActiveAttrib) { cmds::GetActiveAttrib& cmd = *GetBufferAs<cmds::GetActiveAttrib>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12), - static_cast<uint32>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLuint>(12), + static_cast<uint32>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::GetActiveAttrib::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1137,19 +959,17 @@ TEST_F(GLES2FormatTest, GetActiveAttrib) { EXPECT_EQ(static_cast<uint32>(13), cmd.name_bucket_id); EXPECT_EQ(static_cast<uint32>(14), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetActiveUniform) { cmds::GetActiveUniform& cmd = *GetBufferAs<cmds::GetActiveUniform>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12), - static_cast<uint32>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLuint>(12), + static_cast<uint32>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::GetActiveUniform::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1158,18 +978,16 @@ TEST_F(GLES2FormatTest, GetActiveUniform) { EXPECT_EQ(static_cast<uint32>(13), cmd.name_bucket_id); EXPECT_EQ(static_cast<uint32>(14), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetAttachedShaders) { cmds::GetAttachedShaders& cmd = *GetBufferAs<cmds::GetAttachedShaders>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetAttachedShaders::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1177,37 +995,32 @@ TEST_F(GLES2FormatTest, GetAttachedShaders) { EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); EXPECT_EQ(static_cast<uint32>(14), cmd.result_size); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } // TODO(gman): Write test for GetAttribLocation // TODO(gman): Write test for GetAttribLocationBucket TEST_F(GLES2FormatTest, GetBooleanv) { cmds::GetBooleanv& cmd = *GetBufferAs<cmds::GetBooleanv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::GetBooleanv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::GetBooleanv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.pname); EXPECT_EQ(static_cast<uint32>(12), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetBufferParameteriv) { cmds::GetBufferParameteriv& cmd = *GetBufferAs<cmds::GetBufferParameteriv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetBufferParameteriv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1215,90 +1028,76 @@ TEST_F(GLES2FormatTest, GetBufferParameteriv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetError) { cmds::GetError& cmd = *GetBufferAs<cmds::GetError>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<uint32>(11), - static_cast<uint32>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::GetError::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<uint32>(11), static_cast<uint32>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::GetError::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<uint32>(11), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetFloatv) { cmds::GetFloatv& cmd = *GetBufferAs<cmds::GetFloatv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::GetFloatv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::GetFloatv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.pname); EXPECT_EQ(static_cast<uint32>(12), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetFramebufferAttachmentParameteriv) { cmds::GetFramebufferAttachmentParameteriv& cmd = *GetBufferAs<cmds::GetFramebufferAttachmentParameteriv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ( static_cast<uint32>(cmds::GetFramebufferAttachmentParameteriv::kCmdId), - cmd.header.command); + cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment); EXPECT_EQ(static_cast<GLenum>(13), cmd.pname); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetIntegerv) { cmds::GetIntegerv& cmd = *GetBufferAs<cmds::GetIntegerv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::GetIntegerv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::GetIntegerv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.pname); EXPECT_EQ(static_cast<uint32>(12), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetProgramiv) { cmds::GetProgramiv& cmd = *GetBufferAs<cmds::GetProgramiv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetProgramiv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1306,34 +1105,29 @@ TEST_F(GLES2FormatTest, GetProgramiv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetProgramInfoLog) { cmds::GetProgramInfoLog& cmd = *GetBufferAs<cmds::GetProgramInfoLog>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32>(12)); EXPECT_EQ(static_cast<uint32>(cmds::GetProgramInfoLog::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetRenderbufferParameteriv) { cmds::GetRenderbufferParameteriv& cmd = *GetBufferAs<cmds::GetRenderbufferParameteriv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetRenderbufferParameteriv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1341,53 +1135,45 @@ TEST_F(GLES2FormatTest, GetRenderbufferParameteriv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetShaderiv) { cmds::GetShaderiv& cmd = *GetBufferAs<cmds::GetShaderiv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::GetShaderiv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::GetShaderiv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetShaderInfoLog) { cmds::GetShaderInfoLog& cmd = *GetBufferAs<cmds::GetShaderInfoLog>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32>(12)); EXPECT_EQ(static_cast<uint32>(cmds::GetShaderInfoLog::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetShaderPrecisionFormat) { cmds::GetShaderPrecisionFormat& cmd = *GetBufferAs<cmds::GetShaderPrecisionFormat>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetShaderPrecisionFormat::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1395,48 +1181,39 @@ TEST_F(GLES2FormatTest, GetShaderPrecisionFormat) { EXPECT_EQ(static_cast<GLenum>(12), cmd.precisiontype); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetShaderSource) { cmds::GetShaderSource& cmd = *GetBufferAs<cmds::GetShaderSource>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32>(12)); EXPECT_EQ(static_cast<uint32>(cmds::GetShaderSource::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetString) { cmds::GetString& cmd = *GetBufferAs<cmds::GetString>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::GetString::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<uint32>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::GetString::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.name); EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetTexParameterfv) { cmds::GetTexParameterfv& cmd = *GetBufferAs<cmds::GetTexParameterfv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetTexParameterfv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1444,18 +1221,16 @@ TEST_F(GLES2FormatTest, GetTexParameterfv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetTexParameteriv) { cmds::GetTexParameteriv& cmd = *GetBufferAs<cmds::GetTexParameteriv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetTexParameteriv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1463,18 +1238,16 @@ TEST_F(GLES2FormatTest, GetTexParameteriv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetUniformfv) { cmds::GetUniformfv& cmd = *GetBufferAs<cmds::GetUniformfv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLint>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLint>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetUniformfv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1482,18 +1255,16 @@ TEST_F(GLES2FormatTest, GetUniformfv) { EXPECT_EQ(static_cast<GLint>(12), cmd.location); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetUniformiv) { cmds::GetUniformiv& cmd = *GetBufferAs<cmds::GetUniformiv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLint>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLint>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetUniformiv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1501,20 +1272,18 @@ TEST_F(GLES2FormatTest, GetUniformiv) { EXPECT_EQ(static_cast<GLint>(12), cmd.location); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } // TODO(gman): Write test for GetUniformLocation // TODO(gman): Write test for GetUniformLocationBucket TEST_F(GLES2FormatTest, GetVertexAttribfv) { cmds::GetVertexAttribfv& cmd = *GetBufferAs<cmds::GetVertexAttribfv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetVertexAttribfv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1522,18 +1291,16 @@ TEST_F(GLES2FormatTest, GetVertexAttribfv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetVertexAttribiv) { cmds::GetVertexAttribiv& cmd = *GetBufferAs<cmds::GetVertexAttribiv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetVertexAttribiv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1541,19 +1308,17 @@ TEST_F(GLES2FormatTest, GetVertexAttribiv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetVertexAttribPointerv) { cmds::GetVertexAttribPointerv& cmd = *GetBufferAs<cmds::GetVertexAttribPointerv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::GetVertexAttribPointerv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1561,217 +1326,176 @@ TEST_F(GLES2FormatTest, GetVertexAttribPointerv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.pointer_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.pointer_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Hint) { cmds::Hint& cmd = *GetBufferAs<cmds::Hint>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::Hint::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::Hint::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLenum>(12), cmd.mode); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, IsBuffer) { cmds::IsBuffer& cmd = *GetBufferAs<cmds::IsBuffer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::IsBuffer::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::IsBuffer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.buffer); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, IsEnabled) { cmds::IsEnabled& cmd = *GetBufferAs<cmds::IsEnabled>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::IsEnabled::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::IsEnabled::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.cap); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, IsFramebuffer) { cmds::IsFramebuffer& cmd = *GetBufferAs<cmds::IsFramebuffer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::IsFramebuffer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.framebuffer); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, IsProgram) { cmds::IsProgram& cmd = *GetBufferAs<cmds::IsProgram>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::IsProgram::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::IsProgram::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, IsRenderbuffer) { cmds::IsRenderbuffer& cmd = *GetBufferAs<cmds::IsRenderbuffer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::IsRenderbuffer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.renderbuffer); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, IsShader) { cmds::IsShader& cmd = *GetBufferAs<cmds::IsShader>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::IsShader::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::IsShader::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, IsTexture) { cmds::IsTexture& cmd = *GetBufferAs<cmds::IsTexture>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::IsTexture::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::IsTexture::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.texture); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, LineWidth) { cmds::LineWidth& cmd = *GetBufferAs<cmds::LineWidth>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLfloat>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::LineWidth::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLfloat>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::LineWidth::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLfloat>(11), cmd.width); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, LinkProgram) { cmds::LinkProgram& cmd = *GetBufferAs<cmds::LinkProgram>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::LinkProgram::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::LinkProgram::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, PixelStorei) { cmds::PixelStorei& cmd = *GetBufferAs<cmds::PixelStorei>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::PixelStorei::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::PixelStorei::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.pname); EXPECT_EQ(static_cast<GLint>(12), cmd.param); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, PolygonOffset) { cmds::PolygonOffset& cmd = *GetBufferAs<cmds::PolygonOffset>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLfloat>(11), - static_cast<GLfloat>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLfloat>(11), static_cast<GLfloat>(12)); EXPECT_EQ(static_cast<uint32>(cmds::PolygonOffset::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLfloat>(11), cmd.factor); EXPECT_EQ(static_cast<GLfloat>(12), cmd.units); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ReadPixels) { cmds::ReadPixels& cmd = *GetBufferAs<cmds::ReadPixels>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLsizei>(13), - static_cast<GLsizei>(14), - static_cast<GLenum>(15), - static_cast<GLenum>(16), - static_cast<uint32>(17), - static_cast<uint32>(18), - static_cast<uint32>(19), - static_cast<uint32>(20), - static_cast<GLboolean>(21)); - EXPECT_EQ(static_cast<uint32>(cmds::ReadPixels::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLsizei>(13), + static_cast<GLsizei>(14), + static_cast<GLenum>(15), + static_cast<GLenum>(16), + static_cast<uint32>(17), + static_cast<uint32>(18), + static_cast<uint32>(19), + static_cast<uint32>(20), + static_cast<GLboolean>(21)); + EXPECT_EQ(static_cast<uint32>(cmds::ReadPixels::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.x); EXPECT_EQ(static_cast<GLint>(12), cmd.y); @@ -1784,30 +1508,26 @@ TEST_F(GLES2FormatTest, ReadPixels) { EXPECT_EQ(static_cast<uint32>(19), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(20), cmd.result_shm_offset); EXPECT_EQ(static_cast<GLboolean>(21), cmd.async); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ReleaseShaderCompiler) { cmds::ReleaseShaderCompiler& cmd = *GetBufferAs<cmds::ReleaseShaderCompiler>(); - void* next_cmd = cmd.Set( - &cmd); + void* next_cmd = cmd.Set(&cmd); EXPECT_EQ(static_cast<uint32>(cmds::ReleaseShaderCompiler::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, RenderbufferStorage) { cmds::RenderbufferStorage& cmd = *GetBufferAs<cmds::RenderbufferStorage>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLsizei>(13), - static_cast<GLsizei>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLsizei>(13), + static_cast<GLsizei>(14)); EXPECT_EQ(static_cast<uint32>(cmds::RenderbufferStorage::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1815,55 +1535,47 @@ TEST_F(GLES2FormatTest, RenderbufferStorage) { EXPECT_EQ(static_cast<GLenum>(12), cmd.internalformat); EXPECT_EQ(static_cast<GLsizei>(13), cmd.width); EXPECT_EQ(static_cast<GLsizei>(14), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, SampleCoverage) { cmds::SampleCoverage& cmd = *GetBufferAs<cmds::SampleCoverage>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLclampf>(11), - static_cast<GLboolean>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLclampf>(11), static_cast<GLboolean>(12)); EXPECT_EQ(static_cast<uint32>(cmds::SampleCoverage::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLclampf>(11), cmd.value); EXPECT_EQ(static_cast<GLboolean>(12), cmd.invert); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Scissor) { cmds::Scissor& cmd = *GetBufferAs<cmds::Scissor>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLsizei>(13), - static_cast<GLsizei>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Scissor::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLsizei>(13), + static_cast<GLsizei>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Scissor::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.x); EXPECT_EQ(static_cast<GLint>(12), cmd.y); EXPECT_EQ(static_cast<GLsizei>(13), cmd.width); EXPECT_EQ(static_cast<GLsizei>(14), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ShaderBinary) { cmds::ShaderBinary& cmd = *GetBufferAs<cmds::ShaderBinary>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13), - static_cast<GLenum>(14), - static_cast<uint32>(15), - static_cast<uint32>(16), - static_cast<GLsizei>(17)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13), + static_cast<GLenum>(14), + static_cast<uint32>(15), + static_cast<uint32>(16), + static_cast<GLsizei>(17)); EXPECT_EQ(static_cast<uint32>(cmds::ShaderBinary::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1874,18 +1586,16 @@ TEST_F(GLES2FormatTest, ShaderBinary) { EXPECT_EQ(static_cast<uint32>(15), cmd.binary_shm_id); EXPECT_EQ(static_cast<uint32>(16), cmd.binary_shm_offset); EXPECT_EQ(static_cast<GLsizei>(17), cmd.length); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ShaderSource) { cmds::ShaderSource& cmd = *GetBufferAs<cmds::ShaderSource>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::ShaderSource::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1893,50 +1603,42 @@ TEST_F(GLES2FormatTest, ShaderSource) { EXPECT_EQ(static_cast<uint32>(12), cmd.data_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.data_shm_offset); EXPECT_EQ(static_cast<uint32>(14), cmd.data_size); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ShaderSourceBucket) { cmds::ShaderSourceBucket& cmd = *GetBufferAs<cmds::ShaderSourceBucket>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32>(12)); EXPECT_EQ(static_cast<uint32>(cmds::ShaderSourceBucket::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); EXPECT_EQ(static_cast<uint32>(12), cmd.data_bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, StencilFunc) { cmds::StencilFunc& cmd = *GetBufferAs<cmds::StencilFunc>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLuint>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::StencilFunc::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLuint>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::StencilFunc::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.func); EXPECT_EQ(static_cast<GLint>(12), cmd.ref); EXPECT_EQ(static_cast<GLuint>(13), cmd.mask); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, StencilFuncSeparate) { cmds::StencilFuncSeparate& cmd = *GetBufferAs<cmds::StencilFuncSeparate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLint>(13), - static_cast<GLuint>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLint>(13), + static_cast<GLuint>(14)); EXPECT_EQ(static_cast<uint32>(cmds::StencilFuncSeparate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -1944,63 +1646,51 @@ TEST_F(GLES2FormatTest, StencilFuncSeparate) { EXPECT_EQ(static_cast<GLenum>(12), cmd.func); EXPECT_EQ(static_cast<GLint>(13), cmd.ref); EXPECT_EQ(static_cast<GLuint>(14), cmd.mask); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, StencilMask) { cmds::StencilMask& cmd = *GetBufferAs<cmds::StencilMask>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::StencilMask::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::StencilMask::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.mask); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, StencilMaskSeparate) { cmds::StencilMaskSeparate& cmd = *GetBufferAs<cmds::StencilMaskSeparate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLuint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::StencilMaskSeparate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.face); EXPECT_EQ(static_cast<GLuint>(12), cmd.mask); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, StencilOp) { cmds::StencilOp& cmd = *GetBufferAs<cmds::StencilOp>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::StencilOp::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::StencilOp::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.fail); EXPECT_EQ(static_cast<GLenum>(12), cmd.zfail); EXPECT_EQ(static_cast<GLenum>(13), cmd.zpass); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, StencilOpSeparate) { cmds::StencilOpSeparate& cmd = *GetBufferAs<cmds::StencilOpSeparate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13), - static_cast<GLenum>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13), + static_cast<GLenum>(14)); EXPECT_EQ(static_cast<uint32>(cmds::StencilOpSeparate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -2008,26 +1698,23 @@ TEST_F(GLES2FormatTest, StencilOpSeparate) { EXPECT_EQ(static_cast<GLenum>(12), cmd.fail); EXPECT_EQ(static_cast<GLenum>(13), cmd.zfail); EXPECT_EQ(static_cast<GLenum>(14), cmd.zpass); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexImage2D) { cmds::TexImage2D& cmd = *GetBufferAs<cmds::TexImage2D>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLsizei>(14), - static_cast<GLsizei>(15), - static_cast<GLint>(16), - static_cast<GLenum>(17), - static_cast<GLenum>(18), - static_cast<uint32>(19), - static_cast<uint32>(20)); - EXPECT_EQ(static_cast<uint32>(cmds::TexImage2D::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLsizei>(14), + static_cast<GLsizei>(15), + static_cast<GLint>(16), + static_cast<GLenum>(17), + static_cast<GLenum>(18), + static_cast<uint32>(19), + static_cast<uint32>(20)); + EXPECT_EQ(static_cast<uint32>(cmds::TexImage2D::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLint>(12), cmd.level); @@ -2039,35 +1726,31 @@ TEST_F(GLES2FormatTest, TexImage2D) { EXPECT_EQ(static_cast<GLenum>(18), cmd.type); EXPECT_EQ(static_cast<uint32>(19), cmd.pixels_shm_id); EXPECT_EQ(static_cast<uint32>(20), cmd.pixels_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexParameterf) { cmds::TexParameterf& cmd = *GetBufferAs<cmds::TexParameterf>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLfloat>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLfloat>(13)); EXPECT_EQ(static_cast<uint32>(cmds::TexParameterf::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<GLfloat>(13), cmd.param); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexParameterfv) { cmds::TexParameterfv& cmd = *GetBufferAs<cmds::TexParameterfv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::TexParameterfv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -2075,60 +1758,50 @@ TEST_F(GLES2FormatTest, TexParameterfv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexParameterfvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), }; cmds::TexParameterfvImmediate& cmd = *GetBufferAs<cmds::TexParameterfvImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12), data); EXPECT_EQ(static_cast<uint32>(cmds::TexParameterfvImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, TexParameteri) { cmds::TexParameteri& cmd = *GetBufferAs<cmds::TexParameteri>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLint>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLint>(13)); EXPECT_EQ(static_cast<uint32>(cmds::TexParameteri::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<GLint>(13), cmd.param); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexParameteriv) { cmds::TexParameteriv& cmd = *GetBufferAs<cmds::TexParameteriv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::TexParameteriv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -2136,50 +1809,41 @@ TEST_F(GLES2FormatTest, TexParameteriv) { EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); EXPECT_EQ(static_cast<uint32>(13), cmd.params_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.params_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexParameterivImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLint data[] = { - static_cast<GLint>(kSomeBaseValueToTestWith + 0), - }; + static GLint data[] = {static_cast<GLint>(kSomeBaseValueToTestWith + 0), }; cmds::TexParameterivImmediate& cmd = *GetBufferAs<cmds::TexParameterivImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12), data); EXPECT_EQ(static_cast<uint32>(cmds::TexParameterivImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLenum>(12), cmd.pname); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, TexSubImage2D) { cmds::TexSubImage2D& cmd = *GetBufferAs<cmds::TexSubImage2D>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14), - static_cast<GLsizei>(15), - static_cast<GLsizei>(16), - static_cast<GLenum>(17), - static_cast<GLenum>(18), - static_cast<uint32>(19), - static_cast<uint32>(20), - static_cast<GLboolean>(21)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14), + static_cast<GLsizei>(15), + static_cast<GLsizei>(16), + static_cast<GLenum>(17), + static_cast<GLenum>(18), + static_cast<uint32>(19), + static_cast<uint32>(20), + static_cast<GLboolean>(21)); EXPECT_EQ(static_cast<uint32>(cmds::TexSubImage2D::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -2194,547 +1858,451 @@ TEST_F(GLES2FormatTest, TexSubImage2D) { EXPECT_EQ(static_cast<uint32>(19), cmd.pixels_shm_id); EXPECT_EQ(static_cast<uint32>(20), cmd.pixels_shm_offset); EXPECT_EQ(static_cast<GLboolean>(21), cmd.internal); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform1f) { cmds::Uniform1f& cmd = *GetBufferAs<cmds::Uniform1f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLfloat>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform1f::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(11), static_cast<GLfloat>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform1f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLfloat>(12), cmd.x); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform1fv) { cmds::Uniform1fv& cmd = *GetBufferAs<cmds::Uniform1fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform1fv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform1fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform1fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), }; cmds::Uniform1fvImmediate& cmd = *GetBufferAs<cmds::Uniform1fvImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLfloat) * 1; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform1fvImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, Uniform1i) { cmds::Uniform1i& cmd = *GetBufferAs<cmds::Uniform1i>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform1i::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(11), static_cast<GLint>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform1i::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLint>(12), cmd.x); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform1iv) { cmds::Uniform1iv& cmd = *GetBufferAs<cmds::Uniform1iv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform1iv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform1iv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform1ivImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLint data[] = { - static_cast<GLint>(kSomeBaseValueToTestWith + 0), - static_cast<GLint>(kSomeBaseValueToTestWith + 1), - }; + static GLint data[] = {static_cast<GLint>(kSomeBaseValueToTestWith + 0), + static_cast<GLint>(kSomeBaseValueToTestWith + 1), }; cmds::Uniform1ivImmediate& cmd = *GetBufferAs<cmds::Uniform1ivImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLint) * 1; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform1ivImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, Uniform2f) { cmds::Uniform2f& cmd = *GetBufferAs<cmds::Uniform2f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLfloat>(12), - static_cast<GLfloat>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform2f::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLfloat>(12), + static_cast<GLfloat>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform2f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLfloat>(12), cmd.x); EXPECT_EQ(static_cast<GLfloat>(13), cmd.y); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform2fv) { cmds::Uniform2fv& cmd = *GetBufferAs<cmds::Uniform2fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform2fv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform2fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform2fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), }; cmds::Uniform2fvImmediate& cmd = *GetBufferAs<cmds::Uniform2fvImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLfloat) * 2; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform2fvImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, Uniform2i) { cmds::Uniform2i& cmd = *GetBufferAs<cmds::Uniform2i>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLint>(13)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform2i::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLint>(13)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform2i::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLint>(12), cmd.x); EXPECT_EQ(static_cast<GLint>(13), cmd.y); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform2iv) { cmds::Uniform2iv& cmd = *GetBufferAs<cmds::Uniform2iv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform2iv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform2iv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform2ivImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLint data[] = { - static_cast<GLint>(kSomeBaseValueToTestWith + 0), - static_cast<GLint>(kSomeBaseValueToTestWith + 1), - static_cast<GLint>(kSomeBaseValueToTestWith + 2), - static_cast<GLint>(kSomeBaseValueToTestWith + 3), - }; + static GLint data[] = {static_cast<GLint>(kSomeBaseValueToTestWith + 0), + static_cast<GLint>(kSomeBaseValueToTestWith + 1), + static_cast<GLint>(kSomeBaseValueToTestWith + 2), + static_cast<GLint>(kSomeBaseValueToTestWith + 3), }; cmds::Uniform2ivImmediate& cmd = *GetBufferAs<cmds::Uniform2ivImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLint) * 2; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform2ivImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, Uniform3f) { cmds::Uniform3f& cmd = *GetBufferAs<cmds::Uniform3f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLfloat>(12), - static_cast<GLfloat>(13), - static_cast<GLfloat>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform3f::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLfloat>(12), + static_cast<GLfloat>(13), + static_cast<GLfloat>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform3f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLfloat>(12), cmd.x); EXPECT_EQ(static_cast<GLfloat>(13), cmd.y); EXPECT_EQ(static_cast<GLfloat>(14), cmd.z); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform3fv) { cmds::Uniform3fv& cmd = *GetBufferAs<cmds::Uniform3fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform3fv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform3fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform3fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), }; cmds::Uniform3fvImmediate& cmd = *GetBufferAs<cmds::Uniform3fvImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLfloat) * 3; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform3fvImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, Uniform3i) { cmds::Uniform3i& cmd = *GetBufferAs<cmds::Uniform3i>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform3i::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform3i::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLint>(12), cmd.x); EXPECT_EQ(static_cast<GLint>(13), cmd.y); EXPECT_EQ(static_cast<GLint>(14), cmd.z); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform3iv) { cmds::Uniform3iv& cmd = *GetBufferAs<cmds::Uniform3iv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform3iv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform3iv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform3ivImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLint data[] = { - static_cast<GLint>(kSomeBaseValueToTestWith + 0), - static_cast<GLint>(kSomeBaseValueToTestWith + 1), - static_cast<GLint>(kSomeBaseValueToTestWith + 2), - static_cast<GLint>(kSomeBaseValueToTestWith + 3), - static_cast<GLint>(kSomeBaseValueToTestWith + 4), - static_cast<GLint>(kSomeBaseValueToTestWith + 5), - }; + static GLint data[] = {static_cast<GLint>(kSomeBaseValueToTestWith + 0), + static_cast<GLint>(kSomeBaseValueToTestWith + 1), + static_cast<GLint>(kSomeBaseValueToTestWith + 2), + static_cast<GLint>(kSomeBaseValueToTestWith + 3), + static_cast<GLint>(kSomeBaseValueToTestWith + 4), + static_cast<GLint>(kSomeBaseValueToTestWith + 5), }; cmds::Uniform3ivImmediate& cmd = *GetBufferAs<cmds::Uniform3ivImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLint) * 3; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform3ivImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, Uniform4f) { cmds::Uniform4f& cmd = *GetBufferAs<cmds::Uniform4f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLfloat>(12), - static_cast<GLfloat>(13), - static_cast<GLfloat>(14), - static_cast<GLfloat>(15)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform4f::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLfloat>(12), + static_cast<GLfloat>(13), + static_cast<GLfloat>(14), + static_cast<GLfloat>(15)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform4f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLfloat>(12), cmd.x); EXPECT_EQ(static_cast<GLfloat>(13), cmd.y); EXPECT_EQ(static_cast<GLfloat>(14), cmd.z); EXPECT_EQ(static_cast<GLfloat>(15), cmd.w); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform4fv) { cmds::Uniform4fv& cmd = *GetBufferAs<cmds::Uniform4fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform4fv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform4fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform4fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), }; cmds::Uniform4fvImmediate& cmd = *GetBufferAs<cmds::Uniform4fvImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLfloat) * 4; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform4fvImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, Uniform4i) { cmds::Uniform4i& cmd = *GetBufferAs<cmds::Uniform4i>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14), - static_cast<GLint>(15)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform4i::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14), + static_cast<GLint>(15)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform4i::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLint>(12), cmd.x); EXPECT_EQ(static_cast<GLint>(13), cmd.y); EXPECT_EQ(static_cast<GLint>(14), cmd.z); EXPECT_EQ(static_cast<GLint>(15), cmd.w); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform4iv) { cmds::Uniform4iv& cmd = *GetBufferAs<cmds::Uniform4iv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Uniform4iv::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Uniform4iv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.location); EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.v_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.v_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Uniform4ivImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLint data[] = { - static_cast<GLint>(kSomeBaseValueToTestWith + 0), - static_cast<GLint>(kSomeBaseValueToTestWith + 1), - static_cast<GLint>(kSomeBaseValueToTestWith + 2), - static_cast<GLint>(kSomeBaseValueToTestWith + 3), - static_cast<GLint>(kSomeBaseValueToTestWith + 4), - static_cast<GLint>(kSomeBaseValueToTestWith + 5), - static_cast<GLint>(kSomeBaseValueToTestWith + 6), - static_cast<GLint>(kSomeBaseValueToTestWith + 7), - }; + static GLint data[] = {static_cast<GLint>(kSomeBaseValueToTestWith + 0), + static_cast<GLint>(kSomeBaseValueToTestWith + 1), + static_cast<GLint>(kSomeBaseValueToTestWith + 2), + static_cast<GLint>(kSomeBaseValueToTestWith + 3), + static_cast<GLint>(kSomeBaseValueToTestWith + 4), + static_cast<GLint>(kSomeBaseValueToTestWith + 5), + static_cast<GLint>(kSomeBaseValueToTestWith + 6), + static_cast<GLint>(kSomeBaseValueToTestWith + 7), }; cmds::Uniform4ivImmediate& cmd = *GetBufferAs<cmds::Uniform4ivImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLint) * 4; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLint>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::Uniform4ivImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(1), cmd.location); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, UniformMatrix2fv) { cmds::UniformMatrix2fv& cmd = *GetBufferAs<cmds::UniformMatrix2fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<GLboolean>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<GLboolean>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::UniformMatrix2fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -2743,33 +2311,30 @@ TEST_F(GLES2FormatTest, UniformMatrix2fv) { EXPECT_EQ(static_cast<GLboolean>(13), cmd.transpose); EXPECT_EQ(static_cast<uint32>(14), cmd.value_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.value_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, UniformMatrix2fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), }; cmds::UniformMatrix2fvImmediate& cmd = *GetBufferAs<cmds::UniformMatrix2fvImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLfloat) * 4; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - static_cast<GLboolean>(3), - data); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(1), + static_cast<GLsizei>(2), + static_cast<GLboolean>(3), + data); EXPECT_EQ(static_cast<uint32>(cmds::UniformMatrix2fvImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); @@ -2777,20 +2342,18 @@ TEST_F(GLES2FormatTest, UniformMatrix2fvImmediate) { EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); EXPECT_EQ(static_cast<GLboolean>(3), cmd.transpose); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, UniformMatrix3fv) { cmds::UniformMatrix3fv& cmd = *GetBufferAs<cmds::UniformMatrix3fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<GLboolean>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<GLboolean>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::UniformMatrix3fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -2799,43 +2362,40 @@ TEST_F(GLES2FormatTest, UniformMatrix3fv) { EXPECT_EQ(static_cast<GLboolean>(13), cmd.transpose); EXPECT_EQ(static_cast<uint32>(14), cmd.value_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.value_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, UniformMatrix3fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 8), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 9), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 10), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 11), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 12), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 13), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 14), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 15), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 16), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 17), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 8), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 9), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 10), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 11), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 12), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 13), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 14), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 15), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 16), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 17), }; cmds::UniformMatrix3fvImmediate& cmd = *GetBufferAs<cmds::UniformMatrix3fvImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLfloat) * 9; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - static_cast<GLboolean>(3), - data); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(1), + static_cast<GLsizei>(2), + static_cast<GLboolean>(3), + data); EXPECT_EQ(static_cast<uint32>(cmds::UniformMatrix3fvImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); @@ -2843,20 +2403,18 @@ TEST_F(GLES2FormatTest, UniformMatrix3fvImmediate) { EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); EXPECT_EQ(static_cast<GLboolean>(3), cmd.transpose); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, UniformMatrix4fv) { cmds::UniformMatrix4fv& cmd = *GetBufferAs<cmds::UniformMatrix4fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLsizei>(12), - static_cast<GLboolean>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLsizei>(12), + static_cast<GLboolean>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::UniformMatrix4fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -2865,57 +2423,54 @@ TEST_F(GLES2FormatTest, UniformMatrix4fv) { EXPECT_EQ(static_cast<GLboolean>(13), cmd.transpose); EXPECT_EQ(static_cast<uint32>(14), cmd.value_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.value_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, UniformMatrix4fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 8), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 9), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 10), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 11), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 12), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 13), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 14), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 15), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 16), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 17), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 18), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 19), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 20), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 21), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 22), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 23), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 24), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 25), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 26), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 27), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 28), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 29), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 30), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 31), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 4), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 5), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 6), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 7), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 8), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 9), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 10), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 11), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 12), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 13), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 14), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 15), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 16), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 17), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 18), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 19), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 20), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 21), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 22), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 23), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 24), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 25), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 26), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 27), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 28), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 29), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 30), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 31), }; cmds::UniformMatrix4fvImmediate& cmd = *GetBufferAs<cmds::UniformMatrix4fvImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLfloat) * 16; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(1), - static_cast<GLsizei>(2), - static_cast<GLboolean>(3), - data); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(1), + static_cast<GLsizei>(2), + static_cast<GLboolean>(3), + data); EXPECT_EQ(static_cast<uint32>(cmds::UniformMatrix4fvImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); @@ -2923,158 +2478,128 @@ TEST_F(GLES2FormatTest, UniformMatrix4fvImmediate) { EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); EXPECT_EQ(static_cast<GLboolean>(3), cmd.transpose); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, UseProgram) { cmds::UseProgram& cmd = *GetBufferAs<cmds::UseProgram>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); - EXPECT_EQ(static_cast<uint32>(cmds::UseProgram::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::UseProgram::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ValidateProgram) { cmds::ValidateProgram& cmd = *GetBufferAs<cmds::ValidateProgram>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::ValidateProgram::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib1f) { cmds::VertexAttrib1f& cmd = *GetBufferAs<cmds::VertexAttrib1f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLfloat>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLfloat>(12)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib1f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); EXPECT_EQ(static_cast<GLfloat>(12), cmd.x); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib1fv) { cmds::VertexAttrib1fv& cmd = *GetBufferAs<cmds::VertexAttrib1fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib1fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); EXPECT_EQ(static_cast<uint32>(12), cmd.values_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.values_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib1fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), }; cmds::VertexAttrib1fvImmediate& cmd = *GetBufferAs<cmds::VertexAttrib1fvImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - data); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11), data); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib1fvImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, VertexAttrib2f) { cmds::VertexAttrib2f& cmd = *GetBufferAs<cmds::VertexAttrib2f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLfloat>(12), - static_cast<GLfloat>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLfloat>(12), + static_cast<GLfloat>(13)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib2f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); EXPECT_EQ(static_cast<GLfloat>(12), cmd.x); EXPECT_EQ(static_cast<GLfloat>(13), cmd.y); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib2fv) { cmds::VertexAttrib2fv& cmd = *GetBufferAs<cmds::VertexAttrib2fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib2fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); EXPECT_EQ(static_cast<uint32>(12), cmd.values_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.values_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib2fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), }; cmds::VertexAttrib2fvImmediate& cmd = *GetBufferAs<cmds::VertexAttrib2fvImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - data); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11), data); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib2fvImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, VertexAttrib3f) { cmds::VertexAttrib3f& cmd = *GetBufferAs<cmds::VertexAttrib3f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLfloat>(12), - static_cast<GLfloat>(13), - static_cast<GLfloat>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLfloat>(12), + static_cast<GLfloat>(13), + static_cast<GLfloat>(14)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib3f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3082,61 +2607,51 @@ TEST_F(GLES2FormatTest, VertexAttrib3f) { EXPECT_EQ(static_cast<GLfloat>(12), cmd.x); EXPECT_EQ(static_cast<GLfloat>(13), cmd.y); EXPECT_EQ(static_cast<GLfloat>(14), cmd.z); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib3fv) { cmds::VertexAttrib3fv& cmd = *GetBufferAs<cmds::VertexAttrib3fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib3fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); EXPECT_EQ(static_cast<uint32>(12), cmd.values_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.values_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib3fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), }; cmds::VertexAttrib3fvImmediate& cmd = *GetBufferAs<cmds::VertexAttrib3fvImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - data); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11), data); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib3fvImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, VertexAttrib4f) { cmds::VertexAttrib4f& cmd = *GetBufferAs<cmds::VertexAttrib4f>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLfloat>(12), - static_cast<GLfloat>(13), - static_cast<GLfloat>(14), - static_cast<GLfloat>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLfloat>(12), + static_cast<GLfloat>(13), + static_cast<GLfloat>(14), + static_cast<GLfloat>(15)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib4f::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3145,63 +2660,53 @@ TEST_F(GLES2FormatTest, VertexAttrib4f) { EXPECT_EQ(static_cast<GLfloat>(13), cmd.y); EXPECT_EQ(static_cast<GLfloat>(14), cmd.z); EXPECT_EQ(static_cast<GLfloat>(15), cmd.w); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib4fv) { cmds::VertexAttrib4fv& cmd = *GetBufferAs<cmds::VertexAttrib4fv>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib4fv::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); EXPECT_EQ(static_cast<uint32>(12), cmd.values_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.values_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttrib4fvImmediate) { const int kSomeBaseValueToTestWith = 51; static GLfloat data[] = { - static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), - static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), - }; + static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), + static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), }; cmds::VertexAttrib4fvImmediate& cmd = *GetBufferAs<cmds::VertexAttrib4fvImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - data); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11), data); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttrib4fvImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.indx); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, VertexAttribPointer) { cmds::VertexAttribPointer& cmd = *GetBufferAs<cmds::VertexAttribPointer>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLint>(12), - static_cast<GLenum>(13), - static_cast<GLboolean>(14), - static_cast<GLsizei>(15), - static_cast<GLuint>(16)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLint>(12), + static_cast<GLenum>(13), + static_cast<GLboolean>(14), + static_cast<GLsizei>(15), + static_cast<GLuint>(16)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttribPointer::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3211,44 +2716,39 @@ TEST_F(GLES2FormatTest, VertexAttribPointer) { EXPECT_EQ(static_cast<GLboolean>(14), cmd.normalized); EXPECT_EQ(static_cast<GLsizei>(15), cmd.stride); EXPECT_EQ(static_cast<GLuint>(16), cmd.offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, Viewport) { cmds::Viewport& cmd = *GetBufferAs<cmds::Viewport>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLsizei>(13), - static_cast<GLsizei>(14)); - EXPECT_EQ(static_cast<uint32>(cmds::Viewport::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLsizei>(13), + static_cast<GLsizei>(14)); + EXPECT_EQ(static_cast<uint32>(cmds::Viewport::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLint>(11), cmd.x); EXPECT_EQ(static_cast<GLint>(12), cmd.y); EXPECT_EQ(static_cast<GLsizei>(13), cmd.width); EXPECT_EQ(static_cast<GLsizei>(14), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BlitFramebufferCHROMIUM) { cmds::BlitFramebufferCHROMIUM& cmd = *GetBufferAs<cmds::BlitFramebufferCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14), - static_cast<GLint>(15), - static_cast<GLint>(16), - static_cast<GLint>(17), - static_cast<GLint>(18), - static_cast<GLbitfield>(19), - static_cast<GLenum>(20)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14), + static_cast<GLint>(15), + static_cast<GLint>(16), + static_cast<GLint>(17), + static_cast<GLint>(18), + static_cast<GLbitfield>(19), + static_cast<GLenum>(20)); EXPECT_EQ(static_cast<uint32>(cmds::BlitFramebufferCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3262,71 +2762,64 @@ TEST_F(GLES2FormatTest, BlitFramebufferCHROMIUM) { EXPECT_EQ(static_cast<GLint>(18), cmd.dstY1); EXPECT_EQ(static_cast<GLbitfield>(19), cmd.mask); EXPECT_EQ(static_cast<GLenum>(20), cmd.filter); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, RenderbufferStorageMultisampleCHROMIUM) { cmds::RenderbufferStorageMultisampleCHROMIUM& cmd = *GetBufferAs<cmds::RenderbufferStorageMultisampleCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizei>(12), - static_cast<GLenum>(13), - static_cast<GLsizei>(14), - static_cast<GLsizei>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizei>(12), + static_cast<GLenum>(13), + static_cast<GLsizei>(14), + static_cast<GLsizei>(15)); EXPECT_EQ( - static_cast<uint32>( - cmds::RenderbufferStorageMultisampleCHROMIUM::kCmdId), - cmd.header.command); + static_cast<uint32>(cmds::RenderbufferStorageMultisampleCHROMIUM::kCmdId), + cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLsizei>(12), cmd.samples); EXPECT_EQ(static_cast<GLenum>(13), cmd.internalformat); EXPECT_EQ(static_cast<GLsizei>(14), cmd.width); EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, RenderbufferStorageMultisampleEXT) { cmds::RenderbufferStorageMultisampleEXT& cmd = *GetBufferAs<cmds::RenderbufferStorageMultisampleEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizei>(12), - static_cast<GLenum>(13), - static_cast<GLsizei>(14), - static_cast<GLsizei>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizei>(12), + static_cast<GLenum>(13), + static_cast<GLsizei>(14), + static_cast<GLsizei>(15)); EXPECT_EQ( static_cast<uint32>(cmds::RenderbufferStorageMultisampleEXT::kCmdId), - cmd.header.command); + cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLsizei>(12), cmd.samples); EXPECT_EQ(static_cast<GLenum>(13), cmd.internalformat); EXPECT_EQ(static_cast<GLsizei>(14), cmd.width); EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, FramebufferTexture2DMultisampleEXT) { cmds::FramebufferTexture2DMultisampleEXT& cmd = *GetBufferAs<cmds::FramebufferTexture2DMultisampleEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13), - static_cast<GLuint>(14), - static_cast<GLint>(15), - static_cast<GLsizei>(16)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13), + static_cast<GLuint>(14), + static_cast<GLint>(15), + static_cast<GLsizei>(16)); EXPECT_EQ( static_cast<uint32>(cmds::FramebufferTexture2DMultisampleEXT::kCmdId), - cmd.header.command); + cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment); @@ -3334,19 +2827,17 @@ TEST_F(GLES2FormatTest, FramebufferTexture2DMultisampleEXT) { EXPECT_EQ(static_cast<GLuint>(14), cmd.texture); EXPECT_EQ(static_cast<GLint>(15), cmd.level); EXPECT_EQ(static_cast<GLsizei>(16), cmd.samples); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexStorage2DEXT) { cmds::TexStorage2DEXT& cmd = *GetBufferAs<cmds::TexStorage2DEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizei>(12), - static_cast<GLenum>(13), - static_cast<GLsizei>(14), - static_cast<GLsizei>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizei>(12), + static_cast<GLenum>(13), + static_cast<GLsizei>(14), + static_cast<GLsizei>(15)); EXPECT_EQ(static_cast<uint32>(cmds::TexStorage2DEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3355,88 +2846,78 @@ TEST_F(GLES2FormatTest, TexStorage2DEXT) { EXPECT_EQ(static_cast<GLenum>(13), cmd.internalFormat); EXPECT_EQ(static_cast<GLsizei>(14), cmd.width); EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenQueriesEXT) { cmds::GenQueriesEXT& cmd = *GetBufferAs<cmds::GenQueriesEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::GenQueriesEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.queries_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.queries_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenQueriesEXTImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::GenQueriesEXTImmediate& cmd = *GetBufferAs<cmds::GenQueriesEXTImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::GenQueriesEXTImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, DeleteQueriesEXT) { cmds::DeleteQueriesEXT& cmd = *GetBufferAs<cmds::DeleteQueriesEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteQueriesEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.queries_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.queries_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteQueriesEXTImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::DeleteQueriesEXTImmediate& cmd = *GetBufferAs<cmds::DeleteQueriesEXTImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::DeleteQueriesEXTImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, BeginQueryEXT) { cmds::BeginQueryEXT& cmd = *GetBufferAs<cmds::BeginQueryEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLuint>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLuint>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::BeginQueryEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3444,185 +2925,155 @@ TEST_F(GLES2FormatTest, BeginQueryEXT) { EXPECT_EQ(static_cast<GLuint>(12), cmd.id); EXPECT_EQ(static_cast<uint32>(13), cmd.sync_data_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.sync_data_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, EndQueryEXT) { cmds::EndQueryEXT& cmd = *GetBufferAs<cmds::EndQueryEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLuint>(12)); - EXPECT_EQ(static_cast<uint32>(cmds::EndQueryEXT::kCmdId), - cmd.header.command); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLuint>(12)); + EXPECT_EQ(static_cast<uint32>(cmds::EndQueryEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLuint>(12), cmd.submit_count); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, InsertEventMarkerEXT) { cmds::InsertEventMarkerEXT& cmd = *GetBufferAs<cmds::InsertEventMarkerEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::InsertEventMarkerEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, PushGroupMarkerEXT) { cmds::PushGroupMarkerEXT& cmd = *GetBufferAs<cmds::PushGroupMarkerEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::PushGroupMarkerEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, PopGroupMarkerEXT) { cmds::PopGroupMarkerEXT& cmd = *GetBufferAs<cmds::PopGroupMarkerEXT>(); - void* next_cmd = cmd.Set( - &cmd); + void* next_cmd = cmd.Set(&cmd); EXPECT_EQ(static_cast<uint32>(cmds::PopGroupMarkerEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenVertexArraysOES) { cmds::GenVertexArraysOES& cmd = *GetBufferAs<cmds::GenVertexArraysOES>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::GenVertexArraysOES::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.arrays_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.arrays_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenVertexArraysOESImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::GenVertexArraysOESImmediate& cmd = *GetBufferAs<cmds::GenVertexArraysOESImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::GenVertexArraysOESImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, DeleteVertexArraysOES) { cmds::DeleteVertexArraysOES& cmd = *GetBufferAs<cmds::DeleteVertexArraysOES>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteVertexArraysOES::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.n); EXPECT_EQ(static_cast<uint32>(12), cmd.arrays_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.arrays_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteVertexArraysOESImmediate) { - static GLuint ids[] = { 12, 23, 34, }; + static GLuint ids[] = {12, 23, 34, }; cmds::DeleteVertexArraysOESImmediate& cmd = *GetBufferAs<cmds::DeleteVertexArraysOESImmediate>(); - void* next_cmd = cmd.Set( - &cmd, static_cast<GLsizei>(arraysize(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(arraysize(ids)), ids); EXPECT_EQ(static_cast<uint32>(cmds::DeleteVertexArraysOESImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(cmd.n * 4u), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(arraysize(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); + next_cmd, + sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); // TODO(gman): Check that ids were inserted; } TEST_F(GLES2FormatTest, IsVertexArrayOES) { cmds::IsVertexArrayOES& cmd = *GetBufferAs<cmds::IsVertexArrayOES>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::IsVertexArrayOES::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.array); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindVertexArrayOES) { cmds::BindVertexArrayOES& cmd = *GetBufferAs<cmds::BindVertexArrayOES>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::BindVertexArrayOES::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.array); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, SwapBuffers) { cmds::SwapBuffers& cmd = *GetBufferAs<cmds::SwapBuffers>(); - void* next_cmd = cmd.Set( - &cmd); - EXPECT_EQ(static_cast<uint32>(cmds::SwapBuffers::kCmdId), - cmd.header.command); + void* next_cmd = cmd.Set(&cmd); + EXPECT_EQ(static_cast<uint32>(cmds::SwapBuffers::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetMaxValueInBufferCHROMIUM) { cmds::GetMaxValueInBufferCHROMIUM& cmd = *GetBufferAs<cmds::GetMaxValueInBufferCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLsizei>(12), - static_cast<GLenum>(13), - static_cast<GLuint>(14), - static_cast<uint32>(15), - static_cast<uint32>(16)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLsizei>(12), + static_cast<GLenum>(13), + static_cast<GLuint>(14), + static_cast<uint32>(15), + static_cast<uint32>(16)); EXPECT_EQ(static_cast<uint32>(cmds::GetMaxValueInBufferCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3632,19 +3083,17 @@ TEST_F(GLES2FormatTest, GetMaxValueInBufferCHROMIUM) { EXPECT_EQ(static_cast<GLuint>(14), cmd.offset); EXPECT_EQ(static_cast<uint32>(15), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(16), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GenSharedIdsCHROMIUM) { cmds::GenSharedIdsCHROMIUM& cmd = *GetBufferAs<cmds::GenSharedIdsCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12), - static_cast<GLsizei>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLuint>(12), + static_cast<GLsizei>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::GenSharedIdsCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3653,19 +3102,17 @@ TEST_F(GLES2FormatTest, GenSharedIdsCHROMIUM) { EXPECT_EQ(static_cast<GLsizei>(13), cmd.n); EXPECT_EQ(static_cast<uint32>(14), cmd.ids_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.ids_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DeleteSharedIdsCHROMIUM) { cmds::DeleteSharedIdsCHROMIUM& cmd = *GetBufferAs<cmds::DeleteSharedIdsCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::DeleteSharedIdsCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3673,19 +3120,17 @@ TEST_F(GLES2FormatTest, DeleteSharedIdsCHROMIUM) { EXPECT_EQ(static_cast<GLsizei>(12), cmd.n); EXPECT_EQ(static_cast<uint32>(13), cmd.ids_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.ids_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, RegisterSharedIdsCHROMIUM) { cmds::RegisterSharedIdsCHROMIUM& cmd = *GetBufferAs<cmds::RegisterSharedIdsCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::RegisterSharedIdsCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3693,85 +3138,72 @@ TEST_F(GLES2FormatTest, RegisterSharedIdsCHROMIUM) { EXPECT_EQ(static_cast<GLsizei>(12), cmd.n); EXPECT_EQ(static_cast<uint32>(13), cmd.ids_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.ids_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, EnableFeatureCHROMIUM) { cmds::EnableFeatureCHROMIUM& cmd = *GetBufferAs<cmds::EnableFeatureCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::EnableFeatureCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ResizeCHROMIUM) { cmds::ResizeCHROMIUM& cmd = *GetBufferAs<cmds::ResizeCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12), - static_cast<GLfloat>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLuint>(12), + static_cast<GLfloat>(13)); EXPECT_EQ(static_cast<uint32>(cmds::ResizeCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.width); EXPECT_EQ(static_cast<GLuint>(12), cmd.height); EXPECT_EQ(static_cast<GLfloat>(13), cmd.scale_factor); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetRequestableExtensionsCHROMIUM) { cmds::GetRequestableExtensionsCHROMIUM& cmd = *GetBufferAs<cmds::GetRequestableExtensionsCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<uint32>(11)); - EXPECT_EQ( - static_cast<uint32>(cmds::GetRequestableExtensionsCHROMIUM::kCmdId), + void* next_cmd = cmd.Set(&cmd, static_cast<uint32>(11)); + EXPECT_EQ(static_cast<uint32>(cmds::GetRequestableExtensionsCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<uint32>(11), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, RequestExtensionCHROMIUM) { cmds::RequestExtensionCHROMIUM& cmd = *GetBufferAs<cmds::RequestExtensionCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<uint32>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<uint32>(11)); EXPECT_EQ(static_cast<uint32>(cmds::RequestExtensionCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<uint32>(11), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetMultipleIntegervCHROMIUM) { cmds::GetMultipleIntegervCHROMIUM& cmd = *GetBufferAs<cmds::GetMultipleIntegervCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<uint32>(11), - static_cast<uint32>(12), - static_cast<GLuint>(13), - static_cast<uint32>(14), - static_cast<uint32>(15), - static_cast<GLsizeiptr>(16)); + void* next_cmd = cmd.Set(&cmd, + static_cast<uint32>(11), + static_cast<uint32>(12), + static_cast<GLuint>(13), + static_cast<uint32>(14), + static_cast<uint32>(15), + static_cast<GLsizeiptr>(16)); EXPECT_EQ(static_cast<uint32>(cmds::GetMultipleIntegervCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3781,51 +3213,43 @@ TEST_F(GLES2FormatTest, GetMultipleIntegervCHROMIUM) { EXPECT_EQ(static_cast<uint32>(14), cmd.results_shm_id); EXPECT_EQ(static_cast<uint32>(15), cmd.results_shm_offset); EXPECT_EQ(static_cast<GLsizeiptr>(16), cmd.size); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetProgramInfoCHROMIUM) { cmds::GetProgramInfoCHROMIUM& cmd = *GetBufferAs<cmds::GetProgramInfoCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32>(12)); EXPECT_EQ(static_cast<uint32>(cmds::GetProgramInfoCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, GetTranslatedShaderSourceANGLE) { cmds::GetTranslatedShaderSourceANGLE& cmd = *GetBufferAs<cmds::GetTranslatedShaderSourceANGLE>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<uint32>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32>(12)); EXPECT_EQ(static_cast<uint32>(cmds::GetTranslatedShaderSourceANGLE::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.shader); EXPECT_EQ(static_cast<uint32>(12), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, PostSubBufferCHROMIUM) { cmds::PostSubBufferCHROMIUM& cmd = *GetBufferAs<cmds::PostSubBufferCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLint>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLint>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14)); EXPECT_EQ(static_cast<uint32>(cmds::PostSubBufferCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3833,20 +3257,18 @@ TEST_F(GLES2FormatTest, PostSubBufferCHROMIUM) { EXPECT_EQ(static_cast<GLint>(12), cmd.y); EXPECT_EQ(static_cast<GLint>(13), cmd.width); EXPECT_EQ(static_cast<GLint>(14), cmd.height); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TexImageIOSurface2DCHROMIUM) { cmds::TexImageIOSurface2DCHROMIUM& cmd = *GetBufferAs<cmds::TexImageIOSurface2DCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizei>(12), - static_cast<GLsizei>(13), - static_cast<GLuint>(14), - static_cast<GLuint>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizei>(12), + static_cast<GLsizei>(13), + static_cast<GLuint>(14), + static_cast<GLuint>(15)); EXPECT_EQ(static_cast<uint32>(cmds::TexImageIOSurface2DCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3855,20 +3277,18 @@ TEST_F(GLES2FormatTest, TexImageIOSurface2DCHROMIUM) { EXPECT_EQ(static_cast<GLsizei>(13), cmd.height); EXPECT_EQ(static_cast<GLuint>(14), cmd.ioSurfaceId); EXPECT_EQ(static_cast<GLuint>(15), cmd.plane); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, CopyTextureCHROMIUM) { cmds::CopyTextureCHROMIUM& cmd = *GetBufferAs<cmds::CopyTextureCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12), - static_cast<GLenum>(13), - static_cast<GLint>(14), - static_cast<GLint>(15), - static_cast<GLenum>(16)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLenum>(12), + static_cast<GLenum>(13), + static_cast<GLint>(14), + static_cast<GLint>(15), + static_cast<GLenum>(16)); EXPECT_EQ(static_cast<uint32>(cmds::CopyTextureCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3878,19 +3298,17 @@ TEST_F(GLES2FormatTest, CopyTextureCHROMIUM) { EXPECT_EQ(static_cast<GLint>(14), cmd.level); EXPECT_EQ(static_cast<GLint>(15), cmd.internalformat); EXPECT_EQ(static_cast<GLenum>(16), cmd.dest_type); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DrawArraysInstancedANGLE) { cmds::DrawArraysInstancedANGLE& cmd = *GetBufferAs<cmds::DrawArraysInstancedANGLE>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLsizei>(13), - static_cast<GLsizei>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLsizei>(13), + static_cast<GLsizei>(14)); EXPECT_EQ(static_cast<uint32>(cmds::DrawArraysInstancedANGLE::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3898,20 +3316,18 @@ TEST_F(GLES2FormatTest, DrawArraysInstancedANGLE) { EXPECT_EQ(static_cast<GLint>(12), cmd.first); EXPECT_EQ(static_cast<GLsizei>(13), cmd.count); EXPECT_EQ(static_cast<GLsizei>(14), cmd.primcount); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DrawElementsInstancedANGLE) { cmds::DrawElementsInstancedANGLE& cmd = *GetBufferAs<cmds::DrawElementsInstancedANGLE>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizei>(12), - static_cast<GLenum>(13), - static_cast<GLuint>(14), - static_cast<GLsizei>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizei>(12), + static_cast<GLenum>(13), + static_cast<GLuint>(14), + static_cast<GLsizei>(15)); EXPECT_EQ(static_cast<uint32>(cmds::DrawElementsInstancedANGLE::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -3920,245 +3336,222 @@ TEST_F(GLES2FormatTest, DrawElementsInstancedANGLE) { EXPECT_EQ(static_cast<GLenum>(13), cmd.type); EXPECT_EQ(static_cast<GLuint>(14), cmd.index_offset); EXPECT_EQ(static_cast<GLsizei>(15), cmd.primcount); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, VertexAttribDivisorANGLE) { cmds::VertexAttribDivisorANGLE& cmd = *GetBufferAs<cmds::VertexAttribDivisorANGLE>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLuint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::VertexAttribDivisorANGLE::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.index); EXPECT_EQ(static_cast<GLuint>(12), cmd.divisor); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } // TODO(gman): Write test for GenMailboxCHROMIUM TEST_F(GLES2FormatTest, ProduceTextureCHROMIUM) { cmds::ProduceTextureCHROMIUM& cmd = *GetBufferAs<cmds::ProduceTextureCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::ProduceTextureCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<uint32>(12), cmd.mailbox_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.mailbox_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ProduceTextureCHROMIUMImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLbyte data[] = { - static_cast<GLbyte>(kSomeBaseValueToTestWith + 0), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 1), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 2), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 3), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 4), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 5), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 6), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 7), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 8), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 9), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 10), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 11), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 12), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 13), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 14), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 15), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 16), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 17), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 18), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 19), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 20), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 21), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 22), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 23), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 24), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 25), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 26), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 27), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 28), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 29), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 30), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 31), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 32), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 33), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 34), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 35), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 36), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 37), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 38), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 39), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 40), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 41), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 42), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 43), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 44), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 45), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 46), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 47), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 48), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 49), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 50), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 51), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 52), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 53), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 54), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 55), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 56), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 57), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 58), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 59), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 60), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 61), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 62), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 63), - }; + static GLbyte data[] = {static_cast<GLbyte>(kSomeBaseValueToTestWith + 0), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 1), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 2), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 3), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 4), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 5), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 6), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 7), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 8), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 9), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 10), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 11), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 12), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 13), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 14), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 15), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 16), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 17), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 18), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 19), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 20), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 21), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 22), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 23), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 24), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 25), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 26), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 27), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 28), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 29), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 30), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 31), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 32), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 33), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 34), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 35), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 36), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 37), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 38), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 39), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 40), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 41), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 42), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 43), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 44), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 45), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 46), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 47), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 48), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 49), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 50), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 51), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 52), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 53), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 54), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 55), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 56), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 57), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 58), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 59), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 60), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 61), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 62), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 63), }; cmds::ProduceTextureCHROMIUMImmediate& cmd = *GetBufferAs<cmds::ProduceTextureCHROMIUMImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - data); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11), data); EXPECT_EQ(static_cast<uint32>(cmds::ProduceTextureCHROMIUMImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, ConsumeTextureCHROMIUM) { cmds::ConsumeTextureCHROMIUM& cmd = *GetBufferAs<cmds::ConsumeTextureCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::ConsumeTextureCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<uint32>(12), cmd.mailbox_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.mailbox_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ConsumeTextureCHROMIUMImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLbyte data[] = { - static_cast<GLbyte>(kSomeBaseValueToTestWith + 0), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 1), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 2), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 3), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 4), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 5), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 6), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 7), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 8), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 9), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 10), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 11), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 12), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 13), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 14), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 15), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 16), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 17), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 18), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 19), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 20), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 21), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 22), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 23), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 24), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 25), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 26), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 27), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 28), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 29), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 30), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 31), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 32), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 33), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 34), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 35), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 36), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 37), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 38), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 39), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 40), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 41), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 42), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 43), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 44), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 45), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 46), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 47), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 48), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 49), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 50), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 51), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 52), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 53), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 54), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 55), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 56), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 57), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 58), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 59), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 60), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 61), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 62), - static_cast<GLbyte>(kSomeBaseValueToTestWith + 63), - }; + static GLbyte data[] = {static_cast<GLbyte>(kSomeBaseValueToTestWith + 0), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 1), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 2), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 3), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 4), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 5), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 6), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 7), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 8), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 9), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 10), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 11), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 12), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 13), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 14), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 15), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 16), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 17), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 18), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 19), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 20), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 21), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 22), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 23), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 24), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 25), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 26), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 27), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 28), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 29), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 30), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 31), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 32), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 33), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 34), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 35), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 36), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 37), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 38), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 39), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 40), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 41), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 42), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 43), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 44), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 45), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 46), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 47), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 48), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 49), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 50), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 51), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 52), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 53), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 54), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 55), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 56), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 57), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 58), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 59), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 60), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 61), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 62), + static_cast<GLbyte>(kSomeBaseValueToTestWith + 63), }; cmds::ConsumeTextureCHROMIUMImmediate& cmd = *GetBufferAs<cmds::ConsumeTextureCHROMIUMImmediate>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - data); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11), data); EXPECT_EQ(static_cast<uint32>(cmds::ConsumeTextureCHROMIUMImmediate::kCmdId), cmd.header.command); - EXPECT_EQ(sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data)), + EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, BindUniformLocationCHROMIUM) { cmds::BindUniformLocationCHROMIUM& cmd = *GetBufferAs<cmds::BindUniformLocationCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLint>(12), - static_cast<uint32>(13), - static_cast<uint32>(14), - static_cast<uint32>(15)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLint>(12), + static_cast<uint32>(13), + static_cast<uint32>(14), + static_cast<uint32>(15)); EXPECT_EQ(static_cast<uint32>(cmds::BindUniformLocationCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -4167,100 +3560,85 @@ TEST_F(GLES2FormatTest, BindUniformLocationCHROMIUM) { EXPECT_EQ(static_cast<uint32>(13), cmd.name_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.name_shm_offset); EXPECT_EQ(static_cast<uint32>(15), cmd.data_size); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindUniformLocationCHROMIUMBucket) { cmds::BindUniformLocationCHROMIUMBucket& cmd = *GetBufferAs<cmds::BindUniformLocationCHROMIUMBucket>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11), - static_cast<GLint>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLuint>(11), + static_cast<GLint>(12), + static_cast<uint32>(13)); EXPECT_EQ( static_cast<uint32>(cmds::BindUniformLocationCHROMIUMBucket::kCmdId), - cmd.header.command); + cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.program); EXPECT_EQ(static_cast<GLint>(12), cmd.location); EXPECT_EQ(static_cast<uint32>(13), cmd.name_bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, BindTexImage2DCHROMIUM) { cmds::BindTexImage2DCHROMIUM& cmd = *GetBufferAs<cmds::BindTexImage2DCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::BindTexImage2DCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLint>(12), cmd.imageId); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, ReleaseTexImage2DCHROMIUM) { cmds::ReleaseTexImage2DCHROMIUM& cmd = *GetBufferAs<cmds::ReleaseTexImage2DCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12)); EXPECT_EQ(static_cast<uint32>(cmds::ReleaseTexImage2DCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLint>(12), cmd.imageId); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TraceBeginCHROMIUM) { cmds::TraceBeginCHROMIUM& cmd = *GetBufferAs<cmds::TraceBeginCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::TraceBeginCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, TraceEndCHROMIUM) { cmds::TraceEndCHROMIUM& cmd = *GetBufferAs<cmds::TraceEndCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd); + void* next_cmd = cmd.Set(&cmd); EXPECT_EQ(static_cast<uint32>(cmds::TraceEndCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, AsyncTexSubImage2DCHROMIUM) { cmds::AsyncTexSubImage2DCHROMIUM& cmd = *GetBufferAs<cmds::AsyncTexSubImage2DCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLint>(14), - static_cast<GLsizei>(15), - static_cast<GLsizei>(16), - static_cast<GLenum>(17), - static_cast<GLenum>(18), - static_cast<uint32>(19), - static_cast<uint32>(20)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLint>(14), + static_cast<GLsizei>(15), + static_cast<GLsizei>(16), + static_cast<GLenum>(17), + static_cast<GLenum>(18), + static_cast<uint32>(19), + static_cast<uint32>(20)); EXPECT_EQ(static_cast<uint32>(cmds::AsyncTexSubImage2DCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -4274,25 +3652,23 @@ TEST_F(GLES2FormatTest, AsyncTexSubImage2DCHROMIUM) { EXPECT_EQ(static_cast<GLenum>(18), cmd.type); EXPECT_EQ(static_cast<uint32>(19), cmd.data_shm_id); EXPECT_EQ(static_cast<uint32>(20), cmd.data_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, AsyncTexImage2DCHROMIUM) { cmds::AsyncTexImage2DCHROMIUM& cmd = *GetBufferAs<cmds::AsyncTexImage2DCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLint>(12), - static_cast<GLint>(13), - static_cast<GLsizei>(14), - static_cast<GLsizei>(15), - static_cast<GLint>(16), - static_cast<GLenum>(17), - static_cast<GLenum>(18), - static_cast<uint32>(19), - static_cast<uint32>(20)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLint>(12), + static_cast<GLint>(13), + static_cast<GLsizei>(14), + static_cast<GLsizei>(15), + static_cast<GLint>(16), + static_cast<GLenum>(17), + static_cast<GLenum>(18), + static_cast<uint32>(19), + static_cast<uint32>(20)); EXPECT_EQ(static_cast<uint32>(cmds::AsyncTexImage2DCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -4306,33 +3682,28 @@ TEST_F(GLES2FormatTest, AsyncTexImage2DCHROMIUM) { EXPECT_EQ(static_cast<GLenum>(18), cmd.type); EXPECT_EQ(static_cast<uint32>(19), cmd.pixels_shm_id); EXPECT_EQ(static_cast<uint32>(20), cmd.pixels_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, WaitAsyncTexImage2DCHROMIUM) { cmds::WaitAsyncTexImage2DCHROMIUM& cmd = *GetBufferAs<cmds::WaitAsyncTexImage2DCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); EXPECT_EQ(static_cast<uint32>(cmds::WaitAsyncTexImage2DCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DiscardFramebufferEXT) { cmds::DiscardFramebufferEXT& cmd = *GetBufferAs<cmds::DiscardFramebufferEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLsizei>(12), - static_cast<uint32>(13), - static_cast<uint32>(14)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLenum>(11), + static_cast<GLsizei>(12), + static_cast<uint32>(13), + static_cast<uint32>(14)); EXPECT_EQ(static_cast<uint32>(cmds::DiscardFramebufferEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); @@ -4340,119 +3711,95 @@ TEST_F(GLES2FormatTest, DiscardFramebufferEXT) { EXPECT_EQ(static_cast<GLsizei>(12), cmd.count); EXPECT_EQ(static_cast<uint32>(13), cmd.attachments_shm_id); EXPECT_EQ(static_cast<uint32>(14), cmd.attachments_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DiscardFramebufferEXTImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLenum data[] = { - static_cast<GLenum>(kSomeBaseValueToTestWith + 0), - static_cast<GLenum>(kSomeBaseValueToTestWith + 1), - }; + static GLenum data[] = {static_cast<GLenum>(kSomeBaseValueToTestWith + 0), + static_cast<GLenum>(kSomeBaseValueToTestWith + 1), }; cmds::DiscardFramebufferEXTImmediate& cmd = *GetBufferAs<cmds::DiscardFramebufferEXTImmediate>(); const GLsizei kNumElements = 2; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLenum) * 1; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(1), - static_cast<GLsizei>(2), - data); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(1), static_cast<GLsizei>(2), data); EXPECT_EQ(static_cast<uint32>(cmds::DiscardFramebufferEXTImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(1), cmd.target); EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, LoseContextCHROMIUM) { cmds::LoseContextCHROMIUM& cmd = *GetBufferAs<cmds::LoseContextCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLenum>(11), - static_cast<GLenum>(12)); + void* next_cmd = + cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12)); EXPECT_EQ(static_cast<uint32>(cmds::LoseContextCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.current); EXPECT_EQ(static_cast<GLenum>(12), cmd.other); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } // TODO(gman): Write test for InsertSyncPointCHROMIUM TEST_F(GLES2FormatTest, WaitSyncPointCHROMIUM) { cmds::WaitSyncPointCHROMIUM& cmd = *GetBufferAs<cmds::WaitSyncPointCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLuint>(11)); + void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11)); EXPECT_EQ(static_cast<uint32>(cmds::WaitSyncPointCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLuint>(11), cmd.sync_point); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DrawBuffersEXT) { cmds::DrawBuffersEXT& cmd = *GetBufferAs<cmds::DrawBuffersEXT>(); - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(11), - static_cast<uint32>(12), - static_cast<uint32>(13)); + void* next_cmd = cmd.Set(&cmd, + static_cast<GLsizei>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(cmds::DrawBuffersEXT::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(11), cmd.count); EXPECT_EQ(static_cast<uint32>(12), cmd.bufs_shm_id); EXPECT_EQ(static_cast<uint32>(13), cmd.bufs_shm_offset); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } TEST_F(GLES2FormatTest, DrawBuffersEXTImmediate) { const int kSomeBaseValueToTestWith = 51; - static GLenum data[] = { - static_cast<GLenum>(kSomeBaseValueToTestWith + 0), - }; + static GLenum data[] = {static_cast<GLenum>(kSomeBaseValueToTestWith + 0), }; cmds::DrawBuffersEXTImmediate& cmd = *GetBufferAs<cmds::DrawBuffersEXTImmediate>(); const GLsizei kNumElements = 1; const size_t kExpectedCmdSize = sizeof(cmd) + kNumElements * sizeof(GLenum) * 1; - void* next_cmd = cmd.Set( - &cmd, - static_cast<GLsizei>(1), - data); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(1), data); EXPECT_EQ(static_cast<uint32>(cmds::DrawBuffersEXTImmediate::kCmdId), cmd.header.command); EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); EXPECT_EQ(static_cast<GLsizei>(1), cmd.count); CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd) + - RoundSizeToMultipleOfEntries(sizeof(data))); + next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data))); // TODO(gman): Check that data was inserted; } TEST_F(GLES2FormatTest, DiscardBackbufferCHROMIUM) { cmds::DiscardBackbufferCHROMIUM& cmd = *GetBufferAs<cmds::DiscardBackbufferCHROMIUM>(); - void* next_cmd = cmd.Set( - &cmd); + void* next_cmd = cmd.Set(&cmd); EXPECT_EQ(static_cast<uint32>(cmds::DiscardBackbufferCHROMIUM::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); - CheckBytesWrittenMatchesExpectedSize( - next_cmd, sizeof(cmd)); + CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ - diff --git a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h index 32a4df5..cc88097 100644 --- a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h @@ -4,253 +4,254 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_IDS_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_IDS_AUTOGEN_H_ -#define GLES2_COMMAND_LIST(OP) \ - OP(ActiveTexture) /* 256 */ \ - OP(AttachShader) /* 257 */ \ - OP(BindAttribLocation) /* 258 */ \ - OP(BindAttribLocationBucket) /* 259 */ \ - OP(BindBuffer) /* 260 */ \ - OP(BindFramebuffer) /* 261 */ \ - OP(BindRenderbuffer) /* 262 */ \ - OP(BindTexture) /* 263 */ \ - OP(BlendColor) /* 264 */ \ - OP(BlendEquation) /* 265 */ \ - OP(BlendEquationSeparate) /* 266 */ \ - OP(BlendFunc) /* 267 */ \ - OP(BlendFuncSeparate) /* 268 */ \ - OP(BufferData) /* 269 */ \ - OP(BufferSubData) /* 270 */ \ - OP(CheckFramebufferStatus) /* 271 */ \ - OP(Clear) /* 272 */ \ - OP(ClearColor) /* 273 */ \ - OP(ClearDepthf) /* 274 */ \ - OP(ClearStencil) /* 275 */ \ - OP(ColorMask) /* 276 */ \ - OP(CompileShader) /* 277 */ \ - OP(CompressedTexImage2D) /* 278 */ \ - OP(CompressedTexImage2DBucket) /* 279 */ \ - OP(CompressedTexSubImage2D) /* 280 */ \ - OP(CompressedTexSubImage2DBucket) /* 281 */ \ - OP(CopyTexImage2D) /* 282 */ \ - OP(CopyTexSubImage2D) /* 283 */ \ - OP(CreateProgram) /* 284 */ \ - OP(CreateShader) /* 285 */ \ - OP(CullFace) /* 286 */ \ - OP(DeleteBuffers) /* 287 */ \ - OP(DeleteBuffersImmediate) /* 288 */ \ - OP(DeleteFramebuffers) /* 289 */ \ - OP(DeleteFramebuffersImmediate) /* 290 */ \ - OP(DeleteProgram) /* 291 */ \ - OP(DeleteRenderbuffers) /* 292 */ \ - OP(DeleteRenderbuffersImmediate) /* 293 */ \ - OP(DeleteShader) /* 294 */ \ - OP(DeleteTextures) /* 295 */ \ - OP(DeleteTexturesImmediate) /* 296 */ \ - OP(DepthFunc) /* 297 */ \ - OP(DepthMask) /* 298 */ \ - OP(DepthRangef) /* 299 */ \ - OP(DetachShader) /* 300 */ \ - OP(Disable) /* 301 */ \ - OP(DisableVertexAttribArray) /* 302 */ \ - OP(DrawArrays) /* 303 */ \ - OP(DrawElements) /* 304 */ \ - OP(Enable) /* 305 */ \ - OP(EnableVertexAttribArray) /* 306 */ \ - OP(Finish) /* 307 */ \ - OP(Flush) /* 308 */ \ - OP(FramebufferRenderbuffer) /* 309 */ \ - OP(FramebufferTexture2D) /* 310 */ \ - OP(FrontFace) /* 311 */ \ - OP(GenBuffers) /* 312 */ \ - OP(GenBuffersImmediate) /* 313 */ \ - OP(GenerateMipmap) /* 314 */ \ - OP(GenFramebuffers) /* 315 */ \ - OP(GenFramebuffersImmediate) /* 316 */ \ - OP(GenRenderbuffers) /* 317 */ \ - OP(GenRenderbuffersImmediate) /* 318 */ \ - OP(GenTextures) /* 319 */ \ - OP(GenTexturesImmediate) /* 320 */ \ - OP(GetActiveAttrib) /* 321 */ \ - OP(GetActiveUniform) /* 322 */ \ - OP(GetAttachedShaders) /* 323 */ \ - OP(GetAttribLocation) /* 324 */ \ - OP(GetAttribLocationBucket) /* 325 */ \ - OP(GetBooleanv) /* 326 */ \ - OP(GetBufferParameteriv) /* 327 */ \ - OP(GetError) /* 328 */ \ - OP(GetFloatv) /* 329 */ \ - OP(GetFramebufferAttachmentParameteriv) /* 330 */ \ - OP(GetIntegerv) /* 331 */ \ - OP(GetProgramiv) /* 332 */ \ - OP(GetProgramInfoLog) /* 333 */ \ - OP(GetRenderbufferParameteriv) /* 334 */ \ - OP(GetShaderiv) /* 335 */ \ - OP(GetShaderInfoLog) /* 336 */ \ - OP(GetShaderPrecisionFormat) /* 337 */ \ - OP(GetShaderSource) /* 338 */ \ - OP(GetString) /* 339 */ \ - OP(GetTexParameterfv) /* 340 */ \ - OP(GetTexParameteriv) /* 341 */ \ - OP(GetUniformfv) /* 342 */ \ - OP(GetUniformiv) /* 343 */ \ - OP(GetUniformLocation) /* 344 */ \ - OP(GetUniformLocationBucket) /* 345 */ \ - OP(GetVertexAttribfv) /* 346 */ \ - OP(GetVertexAttribiv) /* 347 */ \ - OP(GetVertexAttribPointerv) /* 348 */ \ - OP(Hint) /* 349 */ \ - OP(IsBuffer) /* 350 */ \ - OP(IsEnabled) /* 351 */ \ - OP(IsFramebuffer) /* 352 */ \ - OP(IsProgram) /* 353 */ \ - OP(IsRenderbuffer) /* 354 */ \ - OP(IsShader) /* 355 */ \ - OP(IsTexture) /* 356 */ \ - OP(LineWidth) /* 357 */ \ - OP(LinkProgram) /* 358 */ \ - OP(PixelStorei) /* 359 */ \ - OP(PolygonOffset) /* 360 */ \ - OP(ReadPixels) /* 361 */ \ - OP(ReleaseShaderCompiler) /* 362 */ \ - OP(RenderbufferStorage) /* 363 */ \ - OP(SampleCoverage) /* 364 */ \ - OP(Scissor) /* 365 */ \ - OP(ShaderBinary) /* 366 */ \ - OP(ShaderSource) /* 367 */ \ - OP(ShaderSourceBucket) /* 368 */ \ - OP(StencilFunc) /* 369 */ \ - OP(StencilFuncSeparate) /* 370 */ \ - OP(StencilMask) /* 371 */ \ - OP(StencilMaskSeparate) /* 372 */ \ - OP(StencilOp) /* 373 */ \ - OP(StencilOpSeparate) /* 374 */ \ - OP(TexImage2D) /* 375 */ \ - OP(TexParameterf) /* 376 */ \ - OP(TexParameterfv) /* 377 */ \ - OP(TexParameterfvImmediate) /* 378 */ \ - OP(TexParameteri) /* 379 */ \ - OP(TexParameteriv) /* 380 */ \ - OP(TexParameterivImmediate) /* 381 */ \ - OP(TexSubImage2D) /* 382 */ \ - OP(Uniform1f) /* 383 */ \ - OP(Uniform1fv) /* 384 */ \ - OP(Uniform1fvImmediate) /* 385 */ \ - OP(Uniform1i) /* 386 */ \ - OP(Uniform1iv) /* 387 */ \ - OP(Uniform1ivImmediate) /* 388 */ \ - OP(Uniform2f) /* 389 */ \ - OP(Uniform2fv) /* 390 */ \ - OP(Uniform2fvImmediate) /* 391 */ \ - OP(Uniform2i) /* 392 */ \ - OP(Uniform2iv) /* 393 */ \ - OP(Uniform2ivImmediate) /* 394 */ \ - OP(Uniform3f) /* 395 */ \ - OP(Uniform3fv) /* 396 */ \ - OP(Uniform3fvImmediate) /* 397 */ \ - OP(Uniform3i) /* 398 */ \ - OP(Uniform3iv) /* 399 */ \ - OP(Uniform3ivImmediate) /* 400 */ \ - OP(Uniform4f) /* 401 */ \ - OP(Uniform4fv) /* 402 */ \ - OP(Uniform4fvImmediate) /* 403 */ \ - OP(Uniform4i) /* 404 */ \ - OP(Uniform4iv) /* 405 */ \ - OP(Uniform4ivImmediate) /* 406 */ \ - OP(UniformMatrix2fv) /* 407 */ \ - OP(UniformMatrix2fvImmediate) /* 408 */ \ - OP(UniformMatrix3fv) /* 409 */ \ - OP(UniformMatrix3fvImmediate) /* 410 */ \ - OP(UniformMatrix4fv) /* 411 */ \ - OP(UniformMatrix4fvImmediate) /* 412 */ \ - OP(UseProgram) /* 413 */ \ - OP(ValidateProgram) /* 414 */ \ - OP(VertexAttrib1f) /* 415 */ \ - OP(VertexAttrib1fv) /* 416 */ \ - OP(VertexAttrib1fvImmediate) /* 417 */ \ - OP(VertexAttrib2f) /* 418 */ \ - OP(VertexAttrib2fv) /* 419 */ \ - OP(VertexAttrib2fvImmediate) /* 420 */ \ - OP(VertexAttrib3f) /* 421 */ \ - OP(VertexAttrib3fv) /* 422 */ \ - OP(VertexAttrib3fvImmediate) /* 423 */ \ - OP(VertexAttrib4f) /* 424 */ \ - OP(VertexAttrib4fv) /* 425 */ \ - OP(VertexAttrib4fvImmediate) /* 426 */ \ - OP(VertexAttribPointer) /* 427 */ \ - OP(Viewport) /* 428 */ \ - OP(BlitFramebufferCHROMIUM) /* 429 */ \ - OP(RenderbufferStorageMultisampleCHROMIUM) /* 430 */ \ - OP(RenderbufferStorageMultisampleEXT) /* 431 */ \ - OP(FramebufferTexture2DMultisampleEXT) /* 432 */ \ - OP(TexStorage2DEXT) /* 433 */ \ - OP(GenQueriesEXT) /* 434 */ \ - OP(GenQueriesEXTImmediate) /* 435 */ \ - OP(DeleteQueriesEXT) /* 436 */ \ - OP(DeleteQueriesEXTImmediate) /* 437 */ \ - OP(BeginQueryEXT) /* 438 */ \ - OP(EndQueryEXT) /* 439 */ \ - OP(InsertEventMarkerEXT) /* 440 */ \ - OP(PushGroupMarkerEXT) /* 441 */ \ - OP(PopGroupMarkerEXT) /* 442 */ \ - OP(GenVertexArraysOES) /* 443 */ \ - OP(GenVertexArraysOESImmediate) /* 444 */ \ - OP(DeleteVertexArraysOES) /* 445 */ \ - OP(DeleteVertexArraysOESImmediate) /* 446 */ \ - OP(IsVertexArrayOES) /* 447 */ \ - OP(BindVertexArrayOES) /* 448 */ \ - OP(SwapBuffers) /* 449 */ \ - OP(GetMaxValueInBufferCHROMIUM) /* 450 */ \ - OP(GenSharedIdsCHROMIUM) /* 451 */ \ - OP(DeleteSharedIdsCHROMIUM) /* 452 */ \ - OP(RegisterSharedIdsCHROMIUM) /* 453 */ \ - OP(EnableFeatureCHROMIUM) /* 454 */ \ - OP(ResizeCHROMIUM) /* 455 */ \ - OP(GetRequestableExtensionsCHROMIUM) /* 456 */ \ - OP(RequestExtensionCHROMIUM) /* 457 */ \ - OP(GetMultipleIntegervCHROMIUM) /* 458 */ \ - OP(GetProgramInfoCHROMIUM) /* 459 */ \ - OP(GetTranslatedShaderSourceANGLE) /* 460 */ \ - OP(PostSubBufferCHROMIUM) /* 461 */ \ - OP(TexImageIOSurface2DCHROMIUM) /* 462 */ \ - OP(CopyTextureCHROMIUM) /* 463 */ \ - OP(DrawArraysInstancedANGLE) /* 464 */ \ - OP(DrawElementsInstancedANGLE) /* 465 */ \ - OP(VertexAttribDivisorANGLE) /* 466 */ \ - OP(GenMailboxCHROMIUM) /* 467 */ \ - OP(ProduceTextureCHROMIUM) /* 468 */ \ - OP(ProduceTextureCHROMIUMImmediate) /* 469 */ \ - OP(ConsumeTextureCHROMIUM) /* 470 */ \ - OP(ConsumeTextureCHROMIUMImmediate) /* 471 */ \ - OP(BindUniformLocationCHROMIUM) /* 472 */ \ - OP(BindUniformLocationCHROMIUMBucket) /* 473 */ \ - OP(BindTexImage2DCHROMIUM) /* 474 */ \ - OP(ReleaseTexImage2DCHROMIUM) /* 475 */ \ - OP(TraceBeginCHROMIUM) /* 476 */ \ - OP(TraceEndCHROMIUM) /* 477 */ \ - OP(AsyncTexSubImage2DCHROMIUM) /* 478 */ \ - OP(AsyncTexImage2DCHROMIUM) /* 479 */ \ - OP(WaitAsyncTexImage2DCHROMIUM) /* 480 */ \ - OP(DiscardFramebufferEXT) /* 481 */ \ - OP(DiscardFramebufferEXTImmediate) /* 482 */ \ - OP(LoseContextCHROMIUM) /* 483 */ \ - OP(InsertSyncPointCHROMIUM) /* 484 */ \ - OP(WaitSyncPointCHROMIUM) /* 485 */ \ - OP(DrawBuffersEXT) /* 486 */ \ - OP(DrawBuffersEXTImmediate) /* 487 */ \ - OP(DiscardBackbufferCHROMIUM) /* 488 */ \ +#define GLES2_COMMAND_LIST(OP) \ + OP(ActiveTexture) /* 256 */ \ + OP(AttachShader) /* 257 */ \ + OP(BindAttribLocation) /* 258 */ \ + OP(BindAttribLocationBucket) /* 259 */ \ + OP(BindBuffer) /* 260 */ \ + OP(BindFramebuffer) /* 261 */ \ + OP(BindRenderbuffer) /* 262 */ \ + OP(BindTexture) /* 263 */ \ + OP(BlendColor) /* 264 */ \ + OP(BlendEquation) /* 265 */ \ + OP(BlendEquationSeparate) /* 266 */ \ + OP(BlendFunc) /* 267 */ \ + OP(BlendFuncSeparate) /* 268 */ \ + OP(BufferData) /* 269 */ \ + OP(BufferSubData) /* 270 */ \ + OP(CheckFramebufferStatus) /* 271 */ \ + OP(Clear) /* 272 */ \ + OP(ClearColor) /* 273 */ \ + OP(ClearDepthf) /* 274 */ \ + OP(ClearStencil) /* 275 */ \ + OP(ColorMask) /* 276 */ \ + OP(CompileShader) /* 277 */ \ + OP(CompressedTexImage2D) /* 278 */ \ + OP(CompressedTexImage2DBucket) /* 279 */ \ + OP(CompressedTexSubImage2D) /* 280 */ \ + OP(CompressedTexSubImage2DBucket) /* 281 */ \ + OP(CopyTexImage2D) /* 282 */ \ + OP(CopyTexSubImage2D) /* 283 */ \ + OP(CreateProgram) /* 284 */ \ + OP(CreateShader) /* 285 */ \ + OP(CullFace) /* 286 */ \ + OP(DeleteBuffers) /* 287 */ \ + OP(DeleteBuffersImmediate) /* 288 */ \ + OP(DeleteFramebuffers) /* 289 */ \ + OP(DeleteFramebuffersImmediate) /* 290 */ \ + OP(DeleteProgram) /* 291 */ \ + OP(DeleteRenderbuffers) /* 292 */ \ + OP(DeleteRenderbuffersImmediate) /* 293 */ \ + OP(DeleteShader) /* 294 */ \ + OP(DeleteTextures) /* 295 */ \ + OP(DeleteTexturesImmediate) /* 296 */ \ + OP(DepthFunc) /* 297 */ \ + OP(DepthMask) /* 298 */ \ + OP(DepthRangef) /* 299 */ \ + OP(DetachShader) /* 300 */ \ + OP(Disable) /* 301 */ \ + OP(DisableVertexAttribArray) /* 302 */ \ + OP(DrawArrays) /* 303 */ \ + OP(DrawElements) /* 304 */ \ + OP(Enable) /* 305 */ \ + OP(EnableVertexAttribArray) /* 306 */ \ + OP(Finish) /* 307 */ \ + OP(Flush) /* 308 */ \ + OP(FramebufferRenderbuffer) /* 309 */ \ + OP(FramebufferTexture2D) /* 310 */ \ + OP(FrontFace) /* 311 */ \ + OP(GenBuffers) /* 312 */ \ + OP(GenBuffersImmediate) /* 313 */ \ + OP(GenerateMipmap) /* 314 */ \ + OP(GenFramebuffers) /* 315 */ \ + OP(GenFramebuffersImmediate) /* 316 */ \ + OP(GenRenderbuffers) /* 317 */ \ + OP(GenRenderbuffersImmediate) /* 318 */ \ + OP(GenTextures) /* 319 */ \ + OP(GenTexturesImmediate) /* 320 */ \ + OP(GetActiveAttrib) /* 321 */ \ + OP(GetActiveUniform) /* 322 */ \ + OP(GetAttachedShaders) /* 323 */ \ + OP(GetAttribLocation) /* 324 */ \ + OP(GetAttribLocationBucket) /* 325 */ \ + OP(GetBooleanv) /* 326 */ \ + OP(GetBufferParameteriv) /* 327 */ \ + OP(GetError) /* 328 */ \ + OP(GetFloatv) /* 329 */ \ + OP(GetFramebufferAttachmentParameteriv) /* 330 */ \ + OP(GetIntegerv) /* 331 */ \ + OP(GetProgramiv) /* 332 */ \ + OP(GetProgramInfoLog) /* 333 */ \ + OP(GetRenderbufferParameteriv) /* 334 */ \ + OP(GetShaderiv) /* 335 */ \ + OP(GetShaderInfoLog) /* 336 */ \ + OP(GetShaderPrecisionFormat) /* 337 */ \ + OP(GetShaderSource) /* 338 */ \ + OP(GetString) /* 339 */ \ + OP(GetTexParameterfv) /* 340 */ \ + OP(GetTexParameteriv) /* 341 */ \ + OP(GetUniformfv) /* 342 */ \ + OP(GetUniformiv) /* 343 */ \ + OP(GetUniformLocation) /* 344 */ \ + OP(GetUniformLocationBucket) /* 345 */ \ + OP(GetVertexAttribfv) /* 346 */ \ + OP(GetVertexAttribiv) /* 347 */ \ + OP(GetVertexAttribPointerv) /* 348 */ \ + OP(Hint) /* 349 */ \ + OP(IsBuffer) /* 350 */ \ + OP(IsEnabled) /* 351 */ \ + OP(IsFramebuffer) /* 352 */ \ + OP(IsProgram) /* 353 */ \ + OP(IsRenderbuffer) /* 354 */ \ + OP(IsShader) /* 355 */ \ + OP(IsTexture) /* 356 */ \ + OP(LineWidth) /* 357 */ \ + OP(LinkProgram) /* 358 */ \ + OP(PixelStorei) /* 359 */ \ + OP(PolygonOffset) /* 360 */ \ + OP(ReadPixels) /* 361 */ \ + OP(ReleaseShaderCompiler) /* 362 */ \ + OP(RenderbufferStorage) /* 363 */ \ + OP(SampleCoverage) /* 364 */ \ + OP(Scissor) /* 365 */ \ + OP(ShaderBinary) /* 366 */ \ + OP(ShaderSource) /* 367 */ \ + OP(ShaderSourceBucket) /* 368 */ \ + OP(StencilFunc) /* 369 */ \ + OP(StencilFuncSeparate) /* 370 */ \ + OP(StencilMask) /* 371 */ \ + OP(StencilMaskSeparate) /* 372 */ \ + OP(StencilOp) /* 373 */ \ + OP(StencilOpSeparate) /* 374 */ \ + OP(TexImage2D) /* 375 */ \ + OP(TexParameterf) /* 376 */ \ + OP(TexParameterfv) /* 377 */ \ + OP(TexParameterfvImmediate) /* 378 */ \ + OP(TexParameteri) /* 379 */ \ + OP(TexParameteriv) /* 380 */ \ + OP(TexParameterivImmediate) /* 381 */ \ + OP(TexSubImage2D) /* 382 */ \ + OP(Uniform1f) /* 383 */ \ + OP(Uniform1fv) /* 384 */ \ + OP(Uniform1fvImmediate) /* 385 */ \ + OP(Uniform1i) /* 386 */ \ + OP(Uniform1iv) /* 387 */ \ + OP(Uniform1ivImmediate) /* 388 */ \ + OP(Uniform2f) /* 389 */ \ + OP(Uniform2fv) /* 390 */ \ + OP(Uniform2fvImmediate) /* 391 */ \ + OP(Uniform2i) /* 392 */ \ + OP(Uniform2iv) /* 393 */ \ + OP(Uniform2ivImmediate) /* 394 */ \ + OP(Uniform3f) /* 395 */ \ + OP(Uniform3fv) /* 396 */ \ + OP(Uniform3fvImmediate) /* 397 */ \ + OP(Uniform3i) /* 398 */ \ + OP(Uniform3iv) /* 399 */ \ + OP(Uniform3ivImmediate) /* 400 */ \ + OP(Uniform4f) /* 401 */ \ + OP(Uniform4fv) /* 402 */ \ + OP(Uniform4fvImmediate) /* 403 */ \ + OP(Uniform4i) /* 404 */ \ + OP(Uniform4iv) /* 405 */ \ + OP(Uniform4ivImmediate) /* 406 */ \ + OP(UniformMatrix2fv) /* 407 */ \ + OP(UniformMatrix2fvImmediate) /* 408 */ \ + OP(UniformMatrix3fv) /* 409 */ \ + OP(UniformMatrix3fvImmediate) /* 410 */ \ + OP(UniformMatrix4fv) /* 411 */ \ + OP(UniformMatrix4fvImmediate) /* 412 */ \ + OP(UseProgram) /* 413 */ \ + OP(ValidateProgram) /* 414 */ \ + OP(VertexAttrib1f) /* 415 */ \ + OP(VertexAttrib1fv) /* 416 */ \ + OP(VertexAttrib1fvImmediate) /* 417 */ \ + OP(VertexAttrib2f) /* 418 */ \ + OP(VertexAttrib2fv) /* 419 */ \ + OP(VertexAttrib2fvImmediate) /* 420 */ \ + OP(VertexAttrib3f) /* 421 */ \ + OP(VertexAttrib3fv) /* 422 */ \ + OP(VertexAttrib3fvImmediate) /* 423 */ \ + OP(VertexAttrib4f) /* 424 */ \ + OP(VertexAttrib4fv) /* 425 */ \ + OP(VertexAttrib4fvImmediate) /* 426 */ \ + OP(VertexAttribPointer) /* 427 */ \ + OP(Viewport) /* 428 */ \ + OP(BlitFramebufferCHROMIUM) /* 429 */ \ + OP(RenderbufferStorageMultisampleCHROMIUM) /* 430 */ \ + OP(RenderbufferStorageMultisampleEXT) /* 431 */ \ + OP(FramebufferTexture2DMultisampleEXT) /* 432 */ \ + OP(TexStorage2DEXT) /* 433 */ \ + OP(GenQueriesEXT) /* 434 */ \ + OP(GenQueriesEXTImmediate) /* 435 */ \ + OP(DeleteQueriesEXT) /* 436 */ \ + OP(DeleteQueriesEXTImmediate) /* 437 */ \ + OP(BeginQueryEXT) /* 438 */ \ + OP(EndQueryEXT) /* 439 */ \ + OP(InsertEventMarkerEXT) /* 440 */ \ + OP(PushGroupMarkerEXT) /* 441 */ \ + OP(PopGroupMarkerEXT) /* 442 */ \ + OP(GenVertexArraysOES) /* 443 */ \ + OP(GenVertexArraysOESImmediate) /* 444 */ \ + OP(DeleteVertexArraysOES) /* 445 */ \ + OP(DeleteVertexArraysOESImmediate) /* 446 */ \ + OP(IsVertexArrayOES) /* 447 */ \ + OP(BindVertexArrayOES) /* 448 */ \ + OP(SwapBuffers) /* 449 */ \ + OP(GetMaxValueInBufferCHROMIUM) /* 450 */ \ + OP(GenSharedIdsCHROMIUM) /* 451 */ \ + OP(DeleteSharedIdsCHROMIUM) /* 452 */ \ + OP(RegisterSharedIdsCHROMIUM) /* 453 */ \ + OP(EnableFeatureCHROMIUM) /* 454 */ \ + OP(ResizeCHROMIUM) /* 455 */ \ + OP(GetRequestableExtensionsCHROMIUM) /* 456 */ \ + OP(RequestExtensionCHROMIUM) /* 457 */ \ + OP(GetMultipleIntegervCHROMIUM) /* 458 */ \ + OP(GetProgramInfoCHROMIUM) /* 459 */ \ + OP(GetTranslatedShaderSourceANGLE) /* 460 */ \ + OP(PostSubBufferCHROMIUM) /* 461 */ \ + OP(TexImageIOSurface2DCHROMIUM) /* 462 */ \ + OP(CopyTextureCHROMIUM) /* 463 */ \ + OP(DrawArraysInstancedANGLE) /* 464 */ \ + OP(DrawElementsInstancedANGLE) /* 465 */ \ + OP(VertexAttribDivisorANGLE) /* 466 */ \ + OP(GenMailboxCHROMIUM) /* 467 */ \ + OP(ProduceTextureCHROMIUM) /* 468 */ \ + OP(ProduceTextureCHROMIUMImmediate) /* 469 */ \ + OP(ConsumeTextureCHROMIUM) /* 470 */ \ + OP(ConsumeTextureCHROMIUMImmediate) /* 471 */ \ + OP(BindUniformLocationCHROMIUM) /* 472 */ \ + OP(BindUniformLocationCHROMIUMBucket) /* 473 */ \ + OP(BindTexImage2DCHROMIUM) /* 474 */ \ + OP(ReleaseTexImage2DCHROMIUM) /* 475 */ \ + OP(TraceBeginCHROMIUM) /* 476 */ \ + OP(TraceEndCHROMIUM) /* 477 */ \ + OP(AsyncTexSubImage2DCHROMIUM) /* 478 */ \ + OP(AsyncTexImage2DCHROMIUM) /* 479 */ \ + OP(WaitAsyncTexImage2DCHROMIUM) /* 480 */ \ + OP(DiscardFramebufferEXT) /* 481 */ \ + OP(DiscardFramebufferEXTImmediate) /* 482 */ \ + OP(LoseContextCHROMIUM) /* 483 */ \ + OP(InsertSyncPointCHROMIUM) /* 484 */ \ + OP(WaitSyncPointCHROMIUM) /* 485 */ \ + OP(DrawBuffersEXT) /* 486 */ \ + OP(DrawBuffersEXTImmediate) /* 487 */ \ + OP(DiscardBackbufferCHROMIUM) /* 488 */ enum CommandId { kStartPoint = cmd::kLastCommonId, // All GLES2 commands start after this. -#define GLES2_CMD_OP(name) k ## name, +#define GLES2_CMD_OP(name) k##name, GLES2_COMMAND_LIST(GLES2_CMD_OP) #undef GLES2_CMD_OP kNumCommands }; #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_IDS_AUTOGEN_H_ - diff --git a/gpu/command_buffer/common/gles2_cmd_utils_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_autogen.h index 42a89df..0f28002 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_utils_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_AUTOGEN_H_ @@ -66,4 +68,3 @@ static std::string GetStringVertexAttribute(uint32 value); static std::string GetStringVertexPointer(uint32 value); #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_AUTOGEN_H_ - diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h index d63d184..5908cc0 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h @@ -4,783 +4,784 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_IMPLEMENTATION_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_IMPLEMENTATION_AUTOGEN_H_ static const GLES2Util::EnumToString enum_to_string_table[] = { - { 0x78EC, "GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM", }, - { 0x8825, "GL_DRAW_BUFFER0_EXT", }, - { 0x0BC1, "GL_ALPHA_TEST_FUNC_QCOM", }, - { 0x884C, "GL_TEXTURE_COMPARE_MODE_EXT", }, - { 0x0BC2, "GL_ALPHA_TEST_REF_QCOM", }, - { 0x884D, "GL_TEXTURE_COMPARE_FUNC_EXT", }, - { 0x884E, "GL_COMPARE_REF_TO_TEXTURE_EXT", }, - { 0x93A1, "GL_BGRA8_EXT", }, - { 0, "GL_FALSE", }, - { 0x00400000, "GL_STENCIL_BUFFER_BIT6_QCOM", }, - { 0x9138, "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG", }, - { 0x8FC4, "GL_SHADER_BINARY_VIV", }, - { 0x9130, "GL_SGX_PROGRAM_BINARY_IMG", }, - { 0x9133, "GL_RENDERBUFFER_SAMPLES_IMG", }, - { 0x82E0, "GL_BUFFER_KHR", }, - { 0x9135, "GL_MAX_SAMPLES_IMG", }, - { 0x9134, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG", }, - { 0x9137, "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG", }, - { 0x9136, "GL_TEXTURE_SAMPLES_IMG", }, - { 0x00000020, "GL_COLOR_BUFFER_BIT5_QCOM", }, - { 0x0008, "GL_MAP_INVALIDATE_BUFFER_BIT_EXT", }, - { 0x0BC0, "GL_ALPHA_TEST_QCOM", }, - { 0x0006, "GL_TRIANGLE_FAN", }, - { 0x0004, "GL_TRIANGLES", }, - { 0x0005, "GL_TRIANGLE_STRIP", }, - { 0x0002, "GL_LINE_LOOP", }, - { 0x0003, "GL_LINE_STRIP", }, - { 0x0000, "GL_POINTS", }, - { 0x0001, "GL_LINES", }, - { 0x78F0, "GL_IMAGE_ROWBYTES_CHROMIUM", }, - { 0x88B8, "GL_READ_ONLY", }, - { 0x88B9, "GL_WRITE_ONLY_OES", }, - { 0x8211, "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT", }, - { 0x8210, "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT", }, - { 0x8741, "GL_PROGRAM_BINARY_LENGTH_OES", }, - { 0x8740, "GL_Z400_BINARY_AMD", }, - { 0x8192, "GL_GENERATE_MIPMAP_HINT", }, - { 0x8A54, "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT", }, - { 0x8A55, "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT", }, - { 0x8A56, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT", }, - { 0x8A57, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT", }, - { 0x8A51, "GL_RGB_RAW_422_APPLE", }, - { 0x87F9, "GL_3DC_X_AMD", }, - { 0x8A53, "GL_SYNC_OBJECT_APPLE", }, - { 0x8DF8, "GL_SHADER_BINARY_FORMATS", }, - { 0x8DF9, "GL_NUM_SHADER_BINARY_FORMATS", }, - { 0x826D, "GL_DEBUG_GROUP_STACK_DEPTH_KHR", }, - { 0x826B, "GL_DEBUG_SEVERITY_NOTIFICATION_KHR", }, - { 0x826C, "GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR", }, - { 0x8B59, "GL_BOOL_VEC4", }, - { 0x826A, "GL_DEBUG_TYPE_POP_GROUP_KHR", }, - { 0x8B57, "GL_BOOL_VEC2", }, - { 0x8DF1, "GL_MEDIUM_FLOAT", }, - { 0x8B55, "GL_INT_VEC4", }, - { 0x8B54, "GL_INT_VEC3", }, - { 0x8DF4, "GL_MEDIUM_INT", }, - { 0x8DF5, "GL_HIGH_INT", }, - { 0x8B51, "GL_FLOAT_VEC3", }, - { 0x8B50, "GL_FLOAT_VEC2", }, - { 0x806F, "GL_TEXTURE_3D_OES", }, - { 0x92E0, "GL_DEBUG_OUTPUT_KHR", }, - { 0x806A, "GL_TEXTURE_BINDING_3D_OES", }, - { 0x8CE3, "GL_COLOR_ATTACHMENT3_EXT", }, - { 0x1904, "GL_GREEN_NV", }, - { 0x928D, "GL_DST_OUT_NV", }, - { 0x8069, "GL_TEXTURE_BINDING_2D", }, - { 0x8261, "GL_NO_RESET_NOTIFICATION_EXT", }, - { 0x8DFA, "GL_SHADER_COMPILER", }, - { 0x8DFB, "GL_MAX_VERTEX_UNIFORM_VECTORS", }, - { 0x8DFC, "GL_MAX_VARYING_VECTORS", }, - { 0x8B5C, "GL_FLOAT_MAT4", }, - { 0x8B5B, "GL_FLOAT_MAT3", }, - { 0x8268, "GL_DEBUG_TYPE_MARKER_KHR", }, - { 0x8269, "GL_DEBUG_TYPE_PUSH_GROUP_KHR", }, - { 0x1905, "GL_BLUE_NV", }, - { 0x87FF, "GL_PROGRAM_BINARY_FORMATS_OES", }, - { 0x87FE, "GL_NUM_PROGRAM_BINARY_FORMATS_OES", }, - { 0x2600, "GL_NEAREST", }, - { 0x2601, "GL_LINEAR", }, - { 0x8C03, "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG", }, - { 0x9242, "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM", }, - { 0x88BA, "GL_READ_WRITE", }, - { 0x88BB, "GL_BUFFER_ACCESS_OES", }, - { 0x88BC, "GL_BUFFER_MAPPED_OES", }, - { 0x88BD, "GL_BUFFER_MAP_POINTER_OES", }, - { 0x88BF, "GL_TIME_ELAPSED_EXT", }, - { 0x0C10, "GL_SCISSOR_BOX", }, - { 0x0C11, "GL_SCISSOR_TEST", }, - { 0x80000000, "GL_MULTISAMPLE_BUFFER_BIT7_QCOM", }, - { 0x8A48, "GL_TEXTURE_SRGB_DECODE_EXT", }, - { 0x300E, "GL_CONTEXT_LOST", }, - { 0x02000000, "GL_MULTISAMPLE_BUFFER_BIT1_QCOM", }, - { 0x8C2F, "GL_ANY_SAMPLES_PASSED_EXT", }, - { 0x8BD2, "GL_TEXTURE_WIDTH_QCOM", }, - { 0x8BD3, "GL_TEXTURE_HEIGHT_QCOM", }, - { 0x8BD4, "GL_TEXTURE_DEPTH_QCOM", }, - { 0x8BD5, "GL_TEXTURE_INTERNAL_FORMAT_QCOM", }, - { 0x8BD6, "GL_TEXTURE_FORMAT_QCOM", }, - { 0x8BD7, "GL_TEXTURE_TYPE_QCOM", }, - { 0x8B8D, "GL_CURRENT_PROGRAM", }, - { 0x8BD9, "GL_TEXTURE_NUM_LEVELS_QCOM", }, - { 0x00200000, "GL_STENCIL_BUFFER_BIT5_QCOM", }, - { 0x8B8A, "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH", }, - { 0x8B8B, "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES", }, - { 0x8B8C, "GL_SHADING_LANGUAGE_VERSION", }, - { 0x8BDA, "GL_TEXTURE_TARGET_QCOM", }, - { 0x8BDB, "GL_TEXTURE_OBJECT_VALID_QCOM", }, - { 0x8BDC, "GL_STATE_RESTORE", }, - { 0x8B88, "GL_SHADER_SOURCE_LENGTH", }, - { 0x8B89, "GL_ACTIVE_ATTRIBUTES", }, - { 0x93C9, "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES", }, - { 0x93C8, "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES", }, - { 0x8B84, "GL_INFO_LOG_LENGTH", }, - { 0x8B85, "GL_ATTACHED_SHADERS", }, - { 0x8B86, "GL_ACTIVE_UNIFORMS", }, - { 0x8B87, "GL_ACTIVE_UNIFORM_MAX_LENGTH", }, - { 0x8B80, "GL_DELETE_STATUS", }, - { 0x8B81, "GL_COMPILE_STATUS", }, - { 0x8B82, "GL_LINK_STATUS", }, - { 0x8B83, "GL_VALIDATE_STATUS", }, - { 0x8D48, "GL_STENCIL_INDEX8", }, - { 0x8D46, "GL_STENCIL_INDEX1_OES", }, - { 0x8D47, "GL_STENCIL_INDEX4_OES", }, - { 0x8D44, "GL_RENDERBUFFER_INTERNAL_FORMAT", }, - { 0x00000100, "GL_DEPTH_BUFFER_BIT", }, - { 0x8D42, "GL_RENDERBUFFER_WIDTH", }, - { 0x8D43, "GL_RENDERBUFFER_HEIGHT", }, - { 0x8D40, "GL_FRAMEBUFFER", }, - { 0x8D41, "GL_RENDERBUFFER", }, - { 0x0BD0, "GL_DITHER", }, - { 0x93D3, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR", }, - { 0x1801, "GL_DEPTH_EXT", }, - { 0x1800, "GL_COLOR_EXT", }, - { 0x1802, "GL_STENCIL_EXT", }, - { 0x0B21, "GL_LINE_WIDTH", }, - { 0x81A5, "GL_DEPTH_COMPONENT16", }, - { 0x81A6, "GL_DEPTH_COMPONENT24_OES", }, - { 0x81A7, "GL_DEPTH_COMPONENT32_OES", }, - { 0x88FE, "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", }, - { 0x8B6A, "GL_FLOAT_MAT4x3_NV", }, - { 0x93D0, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR", }, - { 0x9143, "GL_MAX_DEBUG_MESSAGE_LENGTH_KHR", }, - { 0x9144, "GL_MAX_DEBUG_LOGGED_MESSAGES_KHR", }, - { 0x9145, "GL_DEBUG_LOGGED_MESSAGES_KHR", }, - { 0x9146, "GL_DEBUG_SEVERITY_HIGH_KHR", }, - { 0x9147, "GL_DEBUG_SEVERITY_MEDIUM_KHR", }, - { 0x9148, "GL_DEBUG_SEVERITY_LOW_KHR", }, - { 0x9260, "GL_GCCSO_SHADER_BINARY_FJ", }, - { 0x8F60, "GL_MALI_SHADER_BINARY_ARM", }, - { 0x8F61, "GL_MALI_PROGRAM_BINARY_ARM", }, - { 0x87EE, "GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD", }, - { 0x822B, "GL_RG8_EXT", }, - { 0x822F, "GL_RG16F_EXT", }, - { 0x822D, "GL_R16F_EXT", }, - { 0x822E, "GL_R32F_EXT", }, - { 1, "GL_ES_VERSION_2_0", }, - { 0x84F9, "GL_DEPTH_STENCIL_OES", }, - { 0x8368, "GL_UNSIGNED_INT_2_10_10_10_REV_EXT", }, - { 0x8819, "GL_LUMINANCE_ALPHA32F_EXT", }, - { 0x8818, "GL_LUMINANCE32F_EXT", }, - { 0x8363, "GL_UNSIGNED_SHORT_5_6_5", }, - { 0x8814, "GL_RGBA32F_EXT", }, - { 0x84F2, "GL_ALL_COMPLETED_NV", }, - { 0x8816, "GL_ALPHA32F_EXT", }, - { 0x84F4, "GL_FENCE_CONDITION_NV", }, - { 0x8366, "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT", }, - { 0x8365, "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT", }, - { 0x881E, "GL_LUMINANCE16F_EXT", }, - { 0x84FA, "GL_UNSIGNED_INT_24_8_OES", }, - { 0x881F, "GL_LUMINANCE_ALPHA16F_EXT", }, - { 0x881A, "GL_RGBA16F_EXT", }, - { 0x84FE, "GL_TEXTURE_MAX_ANISOTROPY_EXT", }, - { 0x0901, "GL_CCW", }, - { 0x0900, "GL_CW", }, - { 0x8229, "GL_R8_EXT", }, - { 0x9283, "GL_DISJOINT_NV", }, - { 0x8227, "GL_RG_EXT", }, - { 0x8B66, "GL_FLOAT_MAT2x4_NV", }, - { 0x8B67, "GL_FLOAT_MAT3x2_NV", }, - { 0x8B65, "GL_FLOAT_MAT2x3_NV", }, - { 0x8B62, "GL_SAMPLER_2D_SHADOW_EXT", }, - { 0x8B63, "GL_SAMPLER_2D_RECT_ARB", }, - { 0x8B60, "GL_SAMPLER_CUBE", }, - { 0x00001000, "GL_DEPTH_BUFFER_BIT4_QCOM", }, - { 0x8B68, "GL_FLOAT_MAT3x4_NV", }, - { 0x83F0, "GL_COMPRESSED_RGB_S3TC_DXT1_EXT", }, - { 0x00000080, "GL_COLOR_BUFFER_BIT7_QCOM", }, - { 0x88F0, "GL_DEPTH24_STENCIL8_OES", }, - { 0x80A0, "GL_SAMPLE_COVERAGE", }, - { 0x928F, "GL_DST_ATOP_NV", }, - { 0x80A9, "GL_SAMPLES", }, - { 0x80A8, "GL_SAMPLE_BUFFERS", }, - { 0x0D55, "GL_ALPHA_BITS", }, - { 0x0D54, "GL_BLUE_BITS", }, - { 0x0D57, "GL_STENCIL_BITS", }, - { 0x0D56, "GL_DEPTH_BITS", }, - { 0x8CD5, "GL_FRAMEBUFFER_COMPLETE", }, - { 0x0D50, "GL_SUBPIXEL_BITS", }, - { 0x0D53, "GL_GREEN_BITS", }, - { 0x0D52, "GL_RED_BITS", }, - { 0x8037, "GL_POLYGON_OFFSET_FILL", }, - { 0x928C, "GL_SRC_OUT_NV", }, - { 0x8034, "GL_UNSIGNED_SHORT_5_5_5_1", }, - { 0x8033, "GL_UNSIGNED_SHORT_4_4_4_4", }, - { 0x928B, "GL_DST_IN_NV", }, - { 0x0305, "GL_ONE_MINUS_DST_ALPHA", }, - { 0x0304, "GL_DST_ALPHA", }, - { 0x0307, "GL_ONE_MINUS_DST_COLOR", }, - { 0x0306, "GL_DST_COLOR", }, - { 0x0301, "GL_ONE_MINUS_SRC_COLOR", }, - { 0x0300, "GL_SRC_COLOR", }, - { 0x0303, "GL_ONE_MINUS_SRC_ALPHA", }, - { 0x0302, "GL_SRC_ALPHA", }, - { 0x0308, "GL_SRC_ALPHA_SATURATE", }, - { 0x2A00, "GL_POLYGON_OFFSET_UNITS", }, - { 0xFFFFFFFF, "GL_ALL_SHADER_BITS_EXT", }, - { 0x00800000, "GL_STENCIL_BUFFER_BIT7_QCOM", }, - { 0x8C4D, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV", }, - { 0x00020000, "GL_STENCIL_BUFFER_BIT1_QCOM", }, - { 0x8D00, "GL_DEPTH_ATTACHMENT", }, - { 0x8FA0, "GL_PERFMON_GLOBAL_MODE_QCOM", }, - { 0x8815, "GL_RGB32F_EXT", }, - { 0x813D, "GL_TEXTURE_MAX_LEVEL_APPLE", }, - { 0x8DFD, "GL_MAX_FRAGMENT_UNIFORM_VECTORS", }, - { 0x8CDD, "GL_FRAMEBUFFER_UNSUPPORTED", }, - { 0x8CDF, "GL_MAX_COLOR_ATTACHMENTS_EXT", }, - { 0x90F3, "GL_CONTEXT_ROBUST_ACCESS_EXT", }, - { 0x90F2, "GL_MAX_MULTIVIEW_BUFFERS_EXT", }, - { 0x90F1, "GL_MULTIVIEW_EXT", }, - { 0x90F0, "GL_COLOR_ATTACHMENT_EXT", }, - { 0x803C, "GL_ALPHA8_OES", }, - { 0x84F5, "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM", }, - { 0x882A, "GL_DRAW_BUFFER5_EXT", }, - { 0x80AA, "GL_SAMPLE_COVERAGE_VALUE", }, - { 0x84F6, "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM", }, - { 0x80AB, "GL_SAMPLE_COVERAGE_INVERT", }, - { 0x8C41, "GL_SRGB8_NV", }, - { 0x8C40, "GL_SRGB_EXT", }, - { 0x882B, "GL_DRAW_BUFFER6_EXT", }, - { 0x8C17, "GL_UNSIGNED_NORMALIZED_EXT", }, - { 0x8A4A, "GL_SKIP_DECODE_EXT", }, - { 0x8A4F, "GL_PROGRAM_PIPELINE_OBJECT_EXT", }, - { 0x882C, "GL_DRAW_BUFFER7_EXT", }, - { 0x0010, "GL_MAP_FLUSH_EXPLICIT_BIT_EXT", }, - { 0x882D, "GL_DRAW_BUFFER8_EXT", }, - { 0x8F37, "GL_COPY_WRITE_BUFFER_NV", }, - { 0x8F36, "GL_COPY_READ_BUFFER_NV", }, - { 0x84FF, "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT", }, - { 0x6000, "GL_TEXTURE_POOL_CHROMIUM", }, - { 0x0B74, "GL_DEPTH_FUNC", }, - { 0x8A49, "GL_DECODE_EXT", }, - { 0x881B, "GL_RGB16F_EXT", }, - { 0x0B71, "GL_DEPTH_TEST", }, - { 0x0B70, "GL_DEPTH_RANGE", }, - { 0x0B73, "GL_DEPTH_CLEAR_VALUE", }, - { 0x0B72, "GL_DEPTH_WRITEMASK", }, - { 0x85BA, "GL_UNSIGNED_SHORT_8_8_APPLE", }, - { 0x882E, "GL_DRAW_BUFFER9_EXT", }, - { 0x6001, "GL_TEXTURE_POOL_MANAGED_CHROMIUM", }, - { 0x8073, "GL_MAX_3D_TEXTURE_SIZE_OES", }, - { 0x8072, "GL_TEXTURE_WRAP_R_OES", }, - { 0x9289, "GL_DST_OVER_NV", }, - { 0x882F, "GL_DRAW_BUFFER10_EXT", }, - { 0x8074, "GL_VERTEX_ARRAY_KHR", }, - { 0x80E1, "GL_BGRA_EXT", }, - { 0x8ED7, "GL_COVERAGE_AUTOMATIC_NV", }, - { 0x8ED6, "GL_COVERAGE_EDGE_FRAGMENTS_NV", }, - { 0x8ED5, "GL_COVERAGE_ALL_FRAGMENTS_NV", }, - { 0x8ED4, "GL_COVERAGE_SAMPLES_NV", }, - { 0x8ED3, "GL_COVERAGE_BUFFERS_NV", }, - { 0x8ED2, "GL_COVERAGE_ATTACHMENT_NV", }, - { 0x8ED1, "GL_COVERAGE_COMPONENT4_NV", }, - { 0x8ED0, "GL_COVERAGE_COMPONENT_NV", }, - { 0x9288, "GL_SRC_OVER_NV", }, - { 0x800B, "GL_FUNC_REVERSE_SUBTRACT", }, - { 0x00000400, "GL_STENCIL_BUFFER_BIT", }, - { 0x800A, "GL_FUNC_SUBTRACT", }, - { 0x8E2C, "GL_DEPTH_COMPONENT16_NONLINEAR_NV", }, - { 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", }, - { 0x8219, "GL_FRAMEBUFFER_UNDEFINED_OES", }, - { 0x8E22, "GL_TRANSFORM_FEEDBACK", }, - { 0x8E28, "GL_TIMESTAMP_EXT", }, - { 0x8006, "GL_FUNC_ADD", }, - { 0x8007, "GL_MIN_EXT", }, - { 0x8004, "GL_ONE_MINUS_CONSTANT_ALPHA", }, - { 0x8005, "GL_BLEND_COLOR", }, - { 0x8002, "GL_ONE_MINUS_CONSTANT_COLOR", }, - { 0x8003, "GL_CONSTANT_ALPHA", }, - { 0x8001, "GL_CONSTANT_COLOR", }, - { 0x0204, "GL_GREATER", }, - { 0x0205, "GL_NOTEQUAL", }, - { 0x0206, "GL_GEQUAL", }, - { 0x0207, "GL_ALWAYS", }, - { 0x0200, "GL_NEVER", }, - { 0x0201, "GL_LESS", }, - { 0x0202, "GL_EQUAL", }, - { 0x0203, "GL_LEQUAL", }, - { 0x2901, "GL_REPEAT", }, - { 0x92A0, "GL_EXCLUSION_NV", }, - { 0x93D8, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR", }, - { 0x93D9, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR", }, - { 0x8FB2, "GL_GPU_OPTIMIZED_QCOM", }, - { 0x190A, "GL_LUMINANCE_ALPHA", }, - { 0x8FB0, "GL_BINNING_CONTROL_HINT_QCOM", }, - { 0x92A1, "GL_CONTRAST_NV", }, - { 0x1E00, "GL_KEEP", }, - { 0x1E01, "GL_REPLACE", }, - { 0x1E02, "GL_INCR", }, - { 0x1E03, "GL_DECR", }, - { 0x93D6, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR", }, - { 0x93D7, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR", }, - { 0x93D4, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR", }, - { 0x93D5, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR", }, - { 0x0BE2, "GL_BLEND", }, - { 0x84CB, "GL_TEXTURE11", }, - { 0x8D55, "GL_RENDERBUFFER_STENCIL_SIZE", }, - { 0x8D54, "GL_RENDERBUFFER_DEPTH_SIZE", }, - { 0x8D57, "GL_MAX_SAMPLES_ANGLE", }, - { 0x8D56, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE", }, - { 0x8D51, "GL_RENDERBUFFER_GREEN_SIZE", }, - { 0x8D50, "GL_RENDERBUFFER_RED_SIZE", }, - { 0x8D53, "GL_RENDERBUFFER_ALPHA_SIZE", }, - { 0x8D52, "GL_RENDERBUFFER_BLUE_SIZE", }, - { 0x92A6, "GL_VIVIDLIGHT_NV", }, - { 0x00080000, "GL_STENCIL_BUFFER_BIT3_QCOM", }, - { 0x92A7, "GL_LINEARLIGHT_NV", }, - { 0x886A, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED", }, - { 0x0C01, "GL_DRAW_BUFFER_EXT", }, - { 0x93C7, "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES", }, - { 0x8B5F, "GL_SAMPLER_3D_OES", }, - { 0x8B95, "GL_PALETTE8_RGB8_OES", }, - { 0x9250, "GL_SHADER_BINARY_DMP", }, - { 0x10000000, "GL_MULTISAMPLE_BUFFER_BIT4_QCOM", }, - { 0x8C92, "GL_ATC_RGB_AMD", }, - { 0x9154, "GL_VERTEX_ARRAY_OBJECT_EXT", }, - { 0x9153, "GL_QUERY_OBJECT_EXT", }, - { 0x8864, "GL_QUERY_COUNTER_BITS_EXT", }, - { 0x9151, "GL_BUFFER_OBJECT_EXT", }, - { 0x8C93, "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD", }, - { 0x00000002, "GL_CONTEXT_FLAG_DEBUG_BIT_KHR", }, - { 0x00000001, "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE", }, - { 0x00000004, "GL_COLOR_BUFFER_BIT2_QCOM", }, - { 0x1702, "GL_TEXTURE", }, - { 0x00000008, "GL_COLOR_BUFFER_BIT3_QCOM", }, - { 0x8B58, "GL_BOOL_VEC3", }, - { 0x8828, "GL_DRAW_BUFFER3_EXT", }, - { 0x8DF0, "GL_LOW_FLOAT", }, - { 0x1906, "GL_ALPHA", }, - { 0x1907, "GL_RGB", }, - { 0x8FBB, "GL_GPU_DISJOINT_EXT", }, - { 0x1902, "GL_DEPTH_COMPONENT", }, - { 0x8B56, "GL_BOOL", }, - { 0x93DB, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR", }, - { 0x8B9B, "GL_IMPLEMENTATION_COLOR_READ_FORMAT", }, - { 0x8B9A, "GL_IMPLEMENTATION_COLOR_READ_TYPE", }, - { 0x93DA, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR", }, - { 0x1908, "GL_RGBA", }, - { 0x8DF2, "GL_HIGH_FLOAT", }, - { 0x93DD, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR", }, - { 0x8827, "GL_DRAW_BUFFER2_EXT", }, - { 0x9243, "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM", }, - { 0x8DF3, "GL_LOW_INT", }, - { 0x82E8, "GL_MAX_LABEL_LENGTH_KHR", }, - { 0x82E6, "GL_SAMPLER_KHR", }, - { 0x0C02, "GL_READ_BUFFER_EXT", }, - { 0x82E3, "GL_QUERY_KHR", }, - { 0x82E2, "GL_PROGRAM_KHR", }, - { 0x82E1, "GL_SHADER_KHR", }, - { 0x8B52, "GL_FLOAT_VEC4", }, - { 0x9240, "GL_UNPACK_FLIP_Y_CHROMIUM", }, - { 0x8DF6, "GL_UNSIGNED_INT_10_10_10_2_OES", }, - { 0x8230, "GL_RG32F_EXT", }, - { 0x8DF7, "GL_INT_10_10_10_2_OES", }, - { 0x8B69, "GL_FLOAT_MAT4x2_NV", }, - { 0x812D, "GL_CLAMP_TO_BORDER_NV", }, - { 0x812F, "GL_CLAMP_TO_EDGE", }, - { 0x86A3, "GL_COMPRESSED_TEXTURE_FORMATS", }, - { 0x86A2, "GL_NUM_COMPRESSED_TEXTURE_FORMATS", }, - { 0x0CF3, "GL_UNPACK_SKIP_ROWS_EXT", }, - { 0x0CF2, "GL_UNPACK_ROW_LENGTH_EXT", }, - { 0x140C, "GL_FIXED", }, - { 0x8008, "GL_MAX_EXT", }, - { 0x0CF5, "GL_UNPACK_ALIGNMENT", }, - { 0x0CF4, "GL_UNPACK_SKIP_PIXELS_EXT", }, - { 0x8009, "GL_BLEND_EQUATION", }, - { 0x1401, "GL_UNSIGNED_BYTE", }, - { 0x1400, "GL_BYTE", }, - { 0x1403, "GL_UNSIGNED_SHORT", }, - { 0x1402, "GL_SHORT", }, - { 0x1405, "GL_UNSIGNED_INT", }, - { 0x1404, "GL_INT", }, - { 0x1406, "GL_FLOAT", }, - { 0x8043, "GL_LUMINANCE4_ALPHA4_OES", }, - { 0x8040, "GL_LUMINANCE8_OES", }, - { 0x8045, "GL_LUMINANCE8_ALPHA8_OES", }, - { 0x8CD1, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", }, - { 0x00040000, "GL_STENCIL_BUFFER_BIT2_QCOM", }, - { 0x8CD0, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", }, - { 0x8CE4, "GL_COLOR_ATTACHMENT4_EXT", }, - { 0x8CD3, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", }, - { 0x929E, "GL_DIFFERENCE_NV", }, - { 0x0B90, "GL_STENCIL_TEST", }, - { 0x8CD2, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", }, - { 0x881C, "GL_ALPHA16F_EXT", }, - { 0x928E, "GL_SRC_ATOP_NV", }, - { 0x8CD4, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES", }, - { 0x9298, "GL_LIGHTEN_NV", }, - { 0x8CD7, "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", }, - { 0x9112, "GL_OBJECT_TYPE_APPLE", }, - { 0x8038, "GL_POLYGON_OFFSET_FACTOR", }, - { 0x851A, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z", }, - { 0x851C, "GL_MAX_CUBE_MAP_TEXTURE_SIZE", }, - { 0x8CD9, "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS", }, - { 0x84CC, "GL_TEXTURE12", }, - { 0x0BA2, "GL_VIEWPORT", }, - { 0x84CA, "GL_TEXTURE10", }, - { 0x84CF, "GL_TEXTURE15", }, - { 0x84CE, "GL_TEXTURE14", }, - { 0x84CD, "GL_TEXTURE13", }, - { 0x9115, "GL_SYNC_FLAGS_APPLE", }, - { 0x9286, "GL_SRC_NV", }, - { 0x83F3, "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE", }, - { 0x83F2, "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE", }, - { 0x83F1, "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT", }, - { 0x9114, "GL_SYNC_STATUS_APPLE", }, - { 0x8C0A, "GL_SGX_BINARY_IMG", }, - { 0x9285, "GL_BLEND_ADVANCED_COHERENT_NV", }, - { 0x911C, "GL_CONDITION_SATISFIED_APPLE", }, - { 0x911B, "GL_TIMEOUT_EXPIRED_APPLE", }, - { 0x911A, "GL_ALREADY_SIGNALED_APPLE", }, - { 0x9284, "GL_CONJOINT_NV", }, - { 0x911D, "GL_WAIT_FAILED_APPLE", }, - { 0x929A, "GL_COLORBURN_NV", }, - { 0x929B, "GL_HARDLIGHT_NV", }, - { 0x929C, "GL_SOFTLIGHT_NV", }, - { 0x846D, "GL_ALIASED_POINT_SIZE_RANGE", }, - { 0x846E, "GL_ALIASED_LINE_WIDTH_RANGE", }, - { 0x929F, "GL_MINUS_NV", }, - { 0x9282, "GL_UNCORRELATED_NV", }, - { 0x9113, "GL_SYNC_CONDITION_APPLE", }, - { 0x93A4, "GL_PACK_REVERSE_ROW_ORDER_ANGLE", }, - { 0x9111, "GL_MAX_SERVER_WAIT_TIMEOUT_APPLE", }, - { 0x93A6, "GL_PROGRAM_BINARY_ANGLE", }, - { 0x9117, "GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE", }, - { 0x93A0, "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE", }, - { 0x93A3, "GL_FRAMEBUFFER_ATTACHMENT_ANGLE", }, - { 0x93A2, "GL_TEXTURE_USAGE_ANGLE", }, - { 0x8802, "GL_STENCIL_BACK_PASS_DEPTH_FAIL", }, - { 0x9119, "GL_SIGNALED_APPLE", }, - { 0x9118, "GL_UNSIGNALED_APPLE", }, - { 0x9294, "GL_MULTIPLY_NV", }, - { 0x9295, "GL_SCREEN_NV", }, - { 0x9296, "GL_OVERLAY_NV", }, - { 0x9297, "GL_DARKEN_NV", }, - { 0x0020, "GL_MAP_UNSYNCHRONIZED_BIT_EXT", }, - { 0x8C01, "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG", }, - { 0x8C00, "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG", }, - { 0x8A52, "GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT", }, - { 0x8C02, "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG", }, - { 0x84C9, "GL_TEXTURE9", }, - { 0x84C8, "GL_TEXTURE8", }, - { 0x8869, "GL_MAX_VERTEX_ATTRIBS", }, - { 0x84C3, "GL_TEXTURE3", }, - { 0x84C2, "GL_TEXTURE2", }, - { 0x84C1, "GL_TEXTURE1", }, - { 0x84C0, "GL_TEXTURE0", }, - { 0x84C7, "GL_TEXTURE7", }, - { 0x84C6, "GL_TEXTURE6", }, - { 0x84C5, "GL_TEXTURE5", }, - { 0x8803, "GL_STENCIL_BACK_PASS_DEPTH_PASS", }, - { 0x928A, "GL_SRC_IN_NV", }, - { 0x8518, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y", }, - { 0x8519, "GL_TEXTURE_CUBE_MAP_POSITIVE_Z", }, - { 0x8514, "GL_TEXTURE_BINDING_CUBE_MAP", }, - { 0x8515, "GL_TEXTURE_CUBE_MAP_POSITIVE_X", }, - { 0x8516, "GL_TEXTURE_CUBE_MAP_NEGATIVE_X", }, - { 0x8517, "GL_TEXTURE_CUBE_MAP_POSITIVE_Y", }, - { 0x8513, "GL_TEXTURE_CUBE_MAP", }, - { 0x8626, "GL_CURRENT_VERTEX_ATTRIB", }, - { 0x92B1, "GL_PLUS_CLAMPED_NV", }, - { 0x92B0, "GL_HSL_LUMINOSITY_NV", }, - { 0x92B3, "GL_MINUS_CLAMPED_NV", }, - { 0x92B2, "GL_PLUS_CLAMPED_ALPHA_NV", }, - { 0x8765, "GL_BUFFER_USAGE", }, - { 0x8764, "GL_BUFFER_SIZE", }, - { 0x8B99, "GL_PALETTE8_RGB5_A1_OES", }, - { 0x0503, "GL_STACK_OVERFLOW_KHR", }, - { 0x0502, "GL_INVALID_OPERATION", }, - { 0x0501, "GL_INVALID_VALUE", }, - { 0x0500, "GL_INVALID_ENUM", }, - { 64, "GL_MAILBOX_SIZE_CHROMIUM", }, - { 0x0506, "GL_INVALID_FRAMEBUFFER_OPERATION", }, - { 0x0505, "GL_OUT_OF_MEMORY", }, - { 0x0504, "GL_STACK_UNDERFLOW_KHR", }, - { 0x0B44, "GL_CULL_FACE", }, - { 0x8B5E, "GL_SAMPLER_2D", }, - { 0x0B46, "GL_FRONT_FACE", }, - { 0x8FB3, "GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM", }, - { 0x824A, "GL_DEBUG_SOURCE_APPLICATION_KHR", }, - { 0x824B, "GL_DEBUG_SOURCE_OTHER_KHR", }, - { 0x824C, "GL_DEBUG_TYPE_ERROR_KHR", }, - { 0x824D, "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR", }, - { 0x824E, "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR", }, - { 0x824F, "GL_DEBUG_TYPE_PORTABILITY_KHR", }, - { 0x8B31, "GL_VERTEX_SHADER", }, - { 0x8B30, "GL_FRAGMENT_SHADER", }, - { 0x8FB1, "GL_CPU_OPTIMIZED_QCOM", }, - { 0x93D2, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR", }, - { 0x8B5A, "GL_FLOAT_MAT2", }, - { 0x84D8, "GL_TEXTURE24", }, - { 0x84D9, "GL_TEXTURE25", }, - { 0x84D6, "GL_TEXTURE22", }, - { 0x84D7, "GL_TEXTURE23", }, - { 0x84D4, "GL_TEXTURE20", }, - { 0x0D05, "GL_PACK_ALIGNMENT", }, - { 0x84D2, "GL_TEXTURE18", }, - { 0x84D3, "GL_TEXTURE19", }, - { 0x84D0, "GL_TEXTURE16", }, - { 0x84D1, "GL_TEXTURE17", }, - { 0x93D1, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR", }, - { 0x84DF, "GL_TEXTURE31", }, - { 0x8B97, "GL_PALETTE8_R5_G6_B5_OES", }, - { 0x84DD, "GL_TEXTURE29", }, - { 0x84DE, "GL_TEXTURE30", }, - { 0x84DB, "GL_TEXTURE27", }, - { 0x84DC, "GL_TEXTURE28", }, - { 0x6002, "GL_TEXTURE_POOL_UNMANAGED_CHROMIUM", }, - { 0x84DA, "GL_TEXTURE26", }, - { 0x8242, "GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR", }, - { 0x8243, "GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR", }, - { 0x8244, "GL_DEBUG_CALLBACK_FUNCTION_KHR", }, - { 0x8245, "GL_DEBUG_CALLBACK_USER_PARAM_KHR", }, - { 0x8246, "GL_DEBUG_SOURCE_API_KHR", }, - { 0x8247, "GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR", }, - { 0x8248, "GL_DEBUG_SOURCE_SHADER_COMPILER_KHR", }, - { 0x8249, "GL_DEBUG_SOURCE_THIRD_PARTY_KHR", }, - { 0x8B94, "GL_PALETTE4_RGB5_A1_OES", }, - { 0x00000040, "GL_COLOR_BUFFER_BIT6_QCOM", }, - { 0x8645, "GL_VERTEX_ATTRIB_ARRAY_POINTER", }, - { 0x8865, "GL_CURRENT_QUERY_EXT", }, - { 0x8866, "GL_QUERY_RESULT_EXT", }, - { 0x8867, "GL_QUERY_RESULT_AVAILABLE_EXT", }, - { 0x08000000, "GL_MULTISAMPLE_BUFFER_BIT3_QCOM", }, - { 0x87FA, "GL_3DC_XY_AMD", }, - { 0x84C4, "GL_TEXTURE4", }, - { 0x85B5, "GL_VERTEX_ARRAY_BINDING_OES", }, - { 0x8D6A, "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT", }, - { 0x8D6C, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT", }, - { 0x8252, "GL_LOSE_CONTEXT_ON_RESET_EXT", }, - { 0x8C4C, "GL_COMPRESSED_SRGB_S3TC_DXT1_NV", }, - { 0x8C4E, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV", }, - { 0x1102, "GL_NICEST", }, - { 0x8C4F, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV", }, - { 0x93E9, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES", }, - { 0x93E8, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES", }, - { 0x8C43, "GL_SRGB8_ALPHA8_EXT", }, - { 0x8C42, "GL_SRGB_ALPHA_EXT", }, - { 0x8C45, "GL_SLUMINANCE8_ALPHA8_NV", }, - { 0x8C44, "GL_SLUMINANCE_ALPHA_NV", }, - { 0x8C47, "GL_SLUMINANCE8_NV", }, - { 0x8C46, "GL_SLUMINANCE_NV", }, - { 0x93E1, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES", }, - { 0x93E0, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES", }, - { 0x93E3, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES", }, - { 0x93E2, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES", }, - { 0x93E5, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES", }, - { 0x93E4, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES", }, - { 0x93E7, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES", }, - { 0x93E6, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES", }, - { 0x8D68, "GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES", }, - { 0x85BB, "GL_UNSIGNED_SHORT_8_8_REV_APPLE", }, - { 0x8D61, "GL_HALF_FLOAT_OES", }, - { 0x8D62, "GL_RGB565", }, - { 0x8D64, "GL_ETC1_RGB8_OES", }, - { 0x8D65, "GL_TEXTURE_EXTERNAL_OES", }, - { 0x8D66, "GL_SAMPLER_EXTERNAL_OES", }, - { 0x8D67, "GL_TEXTURE_BINDING_EXTERNAL_OES", }, - { 0x04000000, "GL_MULTISAMPLE_BUFFER_BIT2_QCOM", }, - { 0x8CEE, "GL_COLOR_ATTACHMENT14_EXT", }, - { 0x2800, "GL_TEXTURE_MAG_FILTER", }, - { 0x2801, "GL_TEXTURE_MIN_FILTER", }, - { 0x2802, "GL_TEXTURE_WRAP_S", }, - { 0x2803, "GL_TEXTURE_WRAP_T", }, - { 0x2703, "GL_LINEAR_MIPMAP_LINEAR", }, - { 0x8B98, "GL_PALETTE8_RGBA4_OES", }, - { 0x84F3, "GL_FENCE_STATUS_NV", }, - { 0x2702, "GL_NEAREST_MIPMAP_LINEAR", }, - { 0x1F03, "GL_EXTENSIONS", }, - { 0x1F02, "GL_VERSION", }, - { 0x1F01, "GL_RENDERER", }, - { 0x1F00, "GL_VENDOR", }, - { 0x2701, "GL_LINEAR_MIPMAP_NEAREST", }, - { 0x92B4, "GL_INVERT_OVG_NV", }, - { 0x0B94, "GL_STENCIL_FAIL", }, - { 0x8B4C, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS", }, - { 0x8B4D, "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS", }, - { 0x8B4F, "GL_SHADER_TYPE", }, - { 0x00004000, "GL_COLOR_BUFFER_BIT", }, - { 0x00000010, "GL_COLOR_BUFFER_BIT4_QCOM", }, - { 0x8834, "GL_DRAW_BUFFER15_EXT", }, - { 0x8833, "GL_DRAW_BUFFER14_EXT", }, - { 0x8832, "GL_DRAW_BUFFER13_EXT", }, - { 0x8831, "GL_DRAW_BUFFER12_EXT", }, - { 0x8830, "GL_DRAW_BUFFER11_EXT", }, - { 0x8DC5, "GL_SAMPLER_CUBE_SHADOW_NV", }, - { 0x93B8, "GL_COMPRESSED_RGBA_ASTC_10x5_KHR", }, - { 0x9241, "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM", }, - { 0x00010000, "GL_STENCIL_BUFFER_BIT0_QCOM", }, - { 0x0B93, "GL_STENCIL_VALUE_MASK", }, - { 0x0B92, "GL_STENCIL_FUNC", }, - { 0x0B91, "GL_STENCIL_CLEAR_VALUE", }, - { 0x883D, "GL_BLEND_EQUATION_ALPHA", }, - { 0x0B97, "GL_STENCIL_REF", }, - { 0x0B96, "GL_STENCIL_PASS_DEPTH_PASS", }, - { 0x0B95, "GL_STENCIL_PASS_DEPTH_FAIL", }, - { 0x2700, "GL_NEAREST_MIPMAP_NEAREST", }, - { 0x0B98, "GL_STENCIL_WRITEMASK", }, - { 0x8B40, "GL_PROGRAM_OBJECT_EXT", }, - { 0x1004, "GL_TEXTURE_BORDER_COLOR_NV", }, - { 0x8B48, "GL_SHADER_OBJECT_EXT", }, - { 0x912F, "GL_TEXTURE_IMMUTABLE_FORMAT_EXT", }, - { 0x20000000, "GL_MULTISAMPLE_BUFFER_BIT5_QCOM", }, - { 0x0DE1, "GL_TEXTURE_2D", }, - { 0x80C9, "GL_BLEND_SRC_RGB", }, - { 0x80C8, "GL_BLEND_DST_RGB", }, - { 0x8059, "GL_RGB10_A2_EXT", }, - { 0x8058, "GL_RGBA8_OES", }, - { 0x8B93, "GL_PALETTE4_RGBA4_OES", }, - { 0x00002000, "GL_DEPTH_BUFFER_BIT5_QCOM", }, - { 0x8051, "GL_RGB8_OES", }, - { 0x8052, "GL_RGB10_EXT", }, - { 0x8CAB, "GL_RENDERBUFFER_SAMPLES_ANGLE", }, - { 0x8057, "GL_RGB5_A1", }, - { 0x8056, "GL_RGBA4", }, - { 0x150A, "GL_INVERT", }, - { 0x01000000, "GL_MULTISAMPLE_BUFFER_BIT0_QCOM", }, - { 0x78ED, "GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM", }, - { 0x78EE, "GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM", }, - { 0x78EF, "GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM", }, - { 0x0B45, "GL_CULL_FACE_MODE", }, - { 0x8B92, "GL_PALETTE4_R5_G6_B5_OES", }, - { 0x00100000, "GL_STENCIL_BUFFER_BIT4_QCOM", }, - { 0x9299, "GL_COLORDODGE_NV", }, - { 0x8D20, "GL_STENCIL_ATTACHMENT", }, - { 0x8B91, "GL_PALETTE4_RGBA8_OES", }, - { 0x00000200, "GL_DEPTH_BUFFER_BIT1_QCOM", }, - { 0x00008000, "GL_COVERAGE_BUFFER_BIT_NV", }, - { 0x1506, "GL_XOR_NV", }, - { 0x8CA8, "GL_READ_FRAMEBUFFER_ANGLE", }, - { 0x8CA9, "GL_DRAW_FRAMEBUFFER_ANGLE", }, - { 0x8CA6, "GL_FRAMEBUFFER_BINDING", }, - { 0x8CA7, "GL_RENDERBUFFER_BINDING", }, - { 0x8CA4, "GL_STENCIL_BACK_VALUE_MASK", }, - { 0x8CA5, "GL_STENCIL_BACK_WRITEMASK", }, - { 0x8B90, "GL_PALETTE4_RGB8_OES", }, - { 0x8CA3, "GL_STENCIL_BACK_REF", }, - { 0x80CB, "GL_BLEND_SRC_ALPHA", }, - { 0x80CA, "GL_BLEND_DST_ALPHA", }, - { 0x8CE7, "GL_COLOR_ATTACHMENT7_EXT", }, - { 0x93B0, "GL_COMPRESSED_RGBA_ASTC_4x4_KHR", }, - { 0x93B1, "GL_COMPRESSED_RGBA_ASTC_5x4_KHR", }, - { 0x93B2, "GL_COMPRESSED_RGBA_ASTC_5x5_KHR", }, - { 0x93B3, "GL_COMPRESSED_RGBA_ASTC_6x5_KHR", }, - { 0x93B4, "GL_COMPRESSED_RGBA_ASTC_6x6_KHR", }, - { 0x93B5, "GL_COMPRESSED_RGBA_ASTC_8x5_KHR", }, - { 0x93B6, "GL_COMPRESSED_RGBA_ASTC_8x6_KHR", }, - { 0x93B7, "GL_COMPRESSED_RGBA_ASTC_8x8_KHR", }, - { 0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", }, - { 0x93B9, "GL_COMPRESSED_RGBA_ASTC_10x6_KHR", }, - { 0x8253, "GL_GUILTY_CONTEXT_RESET_EXT", }, - { 0x8CE5, "GL_COLOR_ATTACHMENT5_EXT", }, - { 0x8CE9, "GL_COLOR_ATTACHMENT9_EXT", }, - { 0x8B96, "GL_PALETTE8_RGBA8_OES", }, - { 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS", }, - { 0x8508, "GL_DECR_WRAP", }, - { 0x92AD, "GL_HSL_HUE_NV", }, - { 0x92AE, "GL_HSL_SATURATION_NV", }, - { 0x92AF, "GL_HSL_COLOR_NV", }, - { 0x8DC4, "GL_SAMPLER_2D_ARRAY_SHADOW_NV", }, - { 0x8507, "GL_INCR_WRAP", }, - { 0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING", }, - { 0x8894, "GL_ARRAY_BUFFER_BINDING", }, - { 0x92A3, "GL_INVERT_RGB_NV", }, - { 0x92A4, "GL_LINEARDODGE_NV", }, - { 0x92A5, "GL_LINEARBURN_NV", }, - { 0x8893, "GL_ELEMENT_ARRAY_BUFFER", }, - { 0x8892, "GL_ARRAY_BUFFER", }, - { 0x92A8, "GL_PINLIGHT_NV", }, - { 0x92A9, "GL_HARDMIX_NV", }, - { 0x8BD8, "GL_TEXTURE_IMAGE_VALID_QCOM", }, - { 0x84D5, "GL_TEXTURE21", }, - { 0x9287, "GL_DST_NV", }, - { 0x93BA, "GL_COMPRESSED_RGBA_ASTC_10x8_KHR", }, - { 0x93BB, "GL_COMPRESSED_RGBA_ASTC_10x10_KHR", }, - { 0x93BC, "GL_COMPRESSED_RGBA_ASTC_12x10_KHR", }, - { 0x93BD, "GL_COMPRESSED_RGBA_ASTC_12x12_KHR", }, - { 0x84E8, "GL_MAX_RENDERBUFFER_SIZE", }, - { 0x9281, "GL_BLEND_OVERLAP_NV", }, - { 0x9280, "GL_BLEND_PREMULTIPLIED_SRC_NV", }, - { 0x8370, "GL_MIRRORED_REPEAT", }, - { 0x84E0, "GL_ACTIVE_TEXTURE", }, - { 0x8800, "GL_STENCIL_BACK_FUNC", }, - { 0x8801, "GL_STENCIL_BACK_FAIL", }, - { 0x0D33, "GL_MAX_TEXTURE_SIZE", }, - { 0x8624, "GL_VERTEX_ATTRIB_ARRAY_STRIDE", }, - { 0x8625, "GL_VERTEX_ATTRIB_ARRAY_TYPE", }, - { 0x8622, "GL_VERTEX_ATTRIB_ARRAY_ENABLED", }, - { 0x8623, "GL_VERTEX_ATTRIB_ARRAY_SIZE", }, - { 0x8DB9, "GL_FRAMEBUFFER_SRGB_EXT", }, - { 0x8259, "GL_ACTIVE_PROGRAM_EXT", }, - { 0x8258, "GL_PROGRAM_SEPARABLE_EXT", }, - { 0x8256, "GL_RESET_NOTIFICATION_STRATEGY_EXT", }, - { 0x8255, "GL_UNKNOWN_CONTEXT_RESET_EXT", }, - { 0x8254, "GL_INNOCENT_CONTEXT_RESET_EXT", }, - { 0x1100, "GL_DONT_CARE", }, - { 0x1101, "GL_FASTEST", }, - { 0x8251, "GL_DEBUG_TYPE_OTHER_KHR", }, - { 0x8250, "GL_DEBUG_TYPE_PERFORMANCE_KHR", }, - { 0x8CEB, "GL_COLOR_ATTACHMENT11_EXT", }, - { 0x8CEC, "GL_COLOR_ATTACHMENT12_EXT", }, - { 0x0408, "GL_FRONT_AND_BACK", }, - { 0x8CEA, "GL_COLOR_ATTACHMENT10_EXT", }, - { 0x8CEF, "GL_COLOR_ATTACHMENT15_EXT", }, - { 0x8CED, "GL_COLOR_ATTACHMENT13_EXT", }, - { 0x8829, "GL_DRAW_BUFFER4_EXT", }, - { 0x0404, "GL_FRONT", }, - { 0x0405, "GL_BACK", }, - { 0x88E1, "GL_STREAM_READ", }, - { 0x88E0, "GL_STREAM_DRAW", }, - { 0x88E4, "GL_STATIC_DRAW", }, - { 0x93C6, "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES", }, - { 0x88E8, "GL_DYNAMIC_DRAW", }, - { 0x9291, "GL_PLUS_NV", }, - { 0x8CAA, "GL_READ_FRAMEBUFFER_BINDING_ANGLE", }, - { 0x93C5, "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES", }, - { 0x40000000, "GL_MULTISAMPLE_BUFFER_BIT6_QCOM", }, - { 0x9116, "GL_SYNC_FENCE_APPLE", }, - { 0x93C4, "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES", }, - { 0x88EE, "GL_ETC1_SRGB8_NV", }, - { 0x93C3, "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES", }, - { 0x00000800, "GL_DEPTH_BUFFER_BIT3_QCOM", }, - { 0x1903, "GL_RED_EXT", }, - { 0x93C2, "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES", }, - { 0x8CE2, "GL_COLOR_ATTACHMENT2_EXT", }, - { 0x8BC1, "GL_COUNTER_RANGE_AMD", }, - { 0x8CE0, "GL_COLOR_ATTACHMENT0", }, - { 0x8CE1, "GL_COLOR_ATTACHMENT1_EXT", }, - { 0x8CE6, "GL_COLOR_ATTACHMENT6_EXT", }, - { 0x93C1, "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES", }, - { 0x8A1F, "GL_RGB_422_APPLE", }, - { 0x93DC, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR", }, - { 0x9292, "GL_PLUS_DARKER_NV", }, - { 0x8CE8, "GL_COLOR_ATTACHMENT8_EXT", }, - { 0x93C0, "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES", }, - { 0x0C23, "GL_COLOR_WRITEMASK", }, - { 0x0C22, "GL_COLOR_CLEAR_VALUE", }, - { 0x8823, "GL_WRITEONLY_RENDERING_QCOM", }, - { 0x8824, "GL_MAX_DRAW_BUFFERS_EXT", }, - { 0x825A, "GL_PROGRAM_PIPELINE_BINDING_EXT", }, - { 0x1909, "GL_LUMINANCE", }, - { 0x0D3A, "GL_MAX_VIEWPORT_DIMS", }, - { 0x8B53, "GL_INT_VEC2", }, - { 0x8826, "GL_DRAW_BUFFER1_EXT", }, - { 0x809E, "GL_SAMPLE_ALPHA_TO_COVERAGE", }, - { 0x8BC0, "GL_COUNTER_TYPE_AMD", }, - { 0x8BC3, "GL_PERCENTAGE_AMD", }, - { 0x8BC2, "GL_UNSIGNED_INT64_AMD", }, - { 0x8BC5, "GL_PERFMON_RESULT_SIZE_AMD", }, - { 0x8BC4, "GL_PERFMON_RESULT_AVAILABLE_AMD", }, - { 0x8BC6, "GL_PERFMON_RESULT_AMD", }, -}; + {0x78EC, "GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM", }, + {0x8825, "GL_DRAW_BUFFER0_EXT", }, + {0x0BC1, "GL_ALPHA_TEST_FUNC_QCOM", }, + {0x884C, "GL_TEXTURE_COMPARE_MODE_EXT", }, + {0x0BC2, "GL_ALPHA_TEST_REF_QCOM", }, + {0x884D, "GL_TEXTURE_COMPARE_FUNC_EXT", }, + {0x884E, "GL_COMPARE_REF_TO_TEXTURE_EXT", }, + {0x93A1, "GL_BGRA8_EXT", }, + {0, "GL_FALSE", }, + {0x00400000, "GL_STENCIL_BUFFER_BIT6_QCOM", }, + {0x9138, "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG", }, + {0x8FC4, "GL_SHADER_BINARY_VIV", }, + {0x9130, "GL_SGX_PROGRAM_BINARY_IMG", }, + {0x9133, "GL_RENDERBUFFER_SAMPLES_IMG", }, + {0x82E0, "GL_BUFFER_KHR", }, + {0x9135, "GL_MAX_SAMPLES_IMG", }, + {0x9134, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG", }, + {0x9137, "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG", }, + {0x9136, "GL_TEXTURE_SAMPLES_IMG", }, + {0x00000020, "GL_COLOR_BUFFER_BIT5_QCOM", }, + {0x0008, "GL_MAP_INVALIDATE_BUFFER_BIT_EXT", }, + {0x0BC0, "GL_ALPHA_TEST_QCOM", }, + {0x0006, "GL_TRIANGLE_FAN", }, + {0x0004, "GL_TRIANGLES", }, + {0x0005, "GL_TRIANGLE_STRIP", }, + {0x0002, "GL_LINE_LOOP", }, + {0x0003, "GL_LINE_STRIP", }, + {0x0000, "GL_POINTS", }, + {0x0001, "GL_LINES", }, + {0x78F0, "GL_IMAGE_ROWBYTES_CHROMIUM", }, + {0x88B8, "GL_READ_ONLY", }, + {0x88B9, "GL_WRITE_ONLY_OES", }, + {0x8211, "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT", }, + {0x8210, "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT", }, + {0x8741, "GL_PROGRAM_BINARY_LENGTH_OES", }, + {0x8740, "GL_Z400_BINARY_AMD", }, + {0x8192, "GL_GENERATE_MIPMAP_HINT", }, + {0x8A54, "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT", }, + {0x8A55, "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT", }, + {0x8A56, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT", }, + {0x8A57, "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT", }, + {0x8A51, "GL_RGB_RAW_422_APPLE", }, + {0x87F9, "GL_3DC_X_AMD", }, + {0x8A53, "GL_SYNC_OBJECT_APPLE", }, + {0x8DF8, "GL_SHADER_BINARY_FORMATS", }, + {0x8DF9, "GL_NUM_SHADER_BINARY_FORMATS", }, + {0x826D, "GL_DEBUG_GROUP_STACK_DEPTH_KHR", }, + {0x826B, "GL_DEBUG_SEVERITY_NOTIFICATION_KHR", }, + {0x826C, "GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR", }, + {0x8B59, "GL_BOOL_VEC4", }, + {0x826A, "GL_DEBUG_TYPE_POP_GROUP_KHR", }, + {0x8B57, "GL_BOOL_VEC2", }, + {0x8DF1, "GL_MEDIUM_FLOAT", }, + {0x8B55, "GL_INT_VEC4", }, + {0x8B54, "GL_INT_VEC3", }, + {0x8DF4, "GL_MEDIUM_INT", }, + {0x8DF5, "GL_HIGH_INT", }, + {0x8B51, "GL_FLOAT_VEC3", }, + {0x8B50, "GL_FLOAT_VEC2", }, + {0x806F, "GL_TEXTURE_3D_OES", }, + {0x92E0, "GL_DEBUG_OUTPUT_KHR", }, + {0x806A, "GL_TEXTURE_BINDING_3D_OES", }, + {0x8CE3, "GL_COLOR_ATTACHMENT3_EXT", }, + {0x1904, "GL_GREEN_NV", }, + {0x928D, "GL_DST_OUT_NV", }, + {0x8069, "GL_TEXTURE_BINDING_2D", }, + {0x8261, "GL_NO_RESET_NOTIFICATION_EXT", }, + {0x8DFA, "GL_SHADER_COMPILER", }, + {0x8DFB, "GL_MAX_VERTEX_UNIFORM_VECTORS", }, + {0x8DFC, "GL_MAX_VARYING_VECTORS", }, + {0x8B5C, "GL_FLOAT_MAT4", }, + {0x8B5B, "GL_FLOAT_MAT3", }, + {0x8268, "GL_DEBUG_TYPE_MARKER_KHR", }, + {0x8269, "GL_DEBUG_TYPE_PUSH_GROUP_KHR", }, + {0x1905, "GL_BLUE_NV", }, + {0x87FF, "GL_PROGRAM_BINARY_FORMATS_OES", }, + {0x87FE, "GL_NUM_PROGRAM_BINARY_FORMATS_OES", }, + {0x2600, "GL_NEAREST", }, + {0x2601, "GL_LINEAR", }, + {0x8C03, "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG", }, + {0x9242, "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM", }, + {0x88BA, "GL_READ_WRITE", }, + {0x88BB, "GL_BUFFER_ACCESS_OES", }, + {0x88BC, "GL_BUFFER_MAPPED_OES", }, + {0x88BD, "GL_BUFFER_MAP_POINTER_OES", }, + {0x88BF, "GL_TIME_ELAPSED_EXT", }, + {0x0C10, "GL_SCISSOR_BOX", }, + {0x0C11, "GL_SCISSOR_TEST", }, + {0x80000000, "GL_MULTISAMPLE_BUFFER_BIT7_QCOM", }, + {0x8A48, "GL_TEXTURE_SRGB_DECODE_EXT", }, + {0x300E, "GL_CONTEXT_LOST", }, + {0x02000000, "GL_MULTISAMPLE_BUFFER_BIT1_QCOM", }, + {0x8C2F, "GL_ANY_SAMPLES_PASSED_EXT", }, + {0x8BD2, "GL_TEXTURE_WIDTH_QCOM", }, + {0x8BD3, "GL_TEXTURE_HEIGHT_QCOM", }, + {0x8BD4, "GL_TEXTURE_DEPTH_QCOM", }, + {0x8BD5, "GL_TEXTURE_INTERNAL_FORMAT_QCOM", }, + {0x8BD6, "GL_TEXTURE_FORMAT_QCOM", }, + {0x8BD7, "GL_TEXTURE_TYPE_QCOM", }, + {0x8B8D, "GL_CURRENT_PROGRAM", }, + {0x8BD9, "GL_TEXTURE_NUM_LEVELS_QCOM", }, + {0x00200000, "GL_STENCIL_BUFFER_BIT5_QCOM", }, + {0x8B8A, "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH", }, + {0x8B8B, "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES", }, + {0x8B8C, "GL_SHADING_LANGUAGE_VERSION", }, + {0x8BDA, "GL_TEXTURE_TARGET_QCOM", }, + {0x8BDB, "GL_TEXTURE_OBJECT_VALID_QCOM", }, + {0x8BDC, "GL_STATE_RESTORE", }, + {0x8B88, "GL_SHADER_SOURCE_LENGTH", }, + {0x8B89, "GL_ACTIVE_ATTRIBUTES", }, + {0x93C9, "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES", }, + {0x93C8, "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES", }, + {0x8B84, "GL_INFO_LOG_LENGTH", }, + {0x8B85, "GL_ATTACHED_SHADERS", }, + {0x8B86, "GL_ACTIVE_UNIFORMS", }, + {0x8B87, "GL_ACTIVE_UNIFORM_MAX_LENGTH", }, + {0x8B80, "GL_DELETE_STATUS", }, + {0x8B81, "GL_COMPILE_STATUS", }, + {0x8B82, "GL_LINK_STATUS", }, + {0x8B83, "GL_VALIDATE_STATUS", }, + {0x8D48, "GL_STENCIL_INDEX8", }, + {0x8D46, "GL_STENCIL_INDEX1_OES", }, + {0x8D47, "GL_STENCIL_INDEX4_OES", }, + {0x8D44, "GL_RENDERBUFFER_INTERNAL_FORMAT", }, + {0x00000100, "GL_DEPTH_BUFFER_BIT", }, + {0x8D42, "GL_RENDERBUFFER_WIDTH", }, + {0x8D43, "GL_RENDERBUFFER_HEIGHT", }, + {0x8D40, "GL_FRAMEBUFFER", }, + {0x8D41, "GL_RENDERBUFFER", }, + {0x0BD0, "GL_DITHER", }, + {0x93D3, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR", }, + {0x1801, "GL_DEPTH_EXT", }, + {0x1800, "GL_COLOR_EXT", }, + {0x1802, "GL_STENCIL_EXT", }, + {0x0B21, "GL_LINE_WIDTH", }, + {0x81A5, "GL_DEPTH_COMPONENT16", }, + {0x81A6, "GL_DEPTH_COMPONENT24_OES", }, + {0x81A7, "GL_DEPTH_COMPONENT32_OES", }, + {0x88FE, "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", }, + {0x8B6A, "GL_FLOAT_MAT4x3_NV", }, + {0x93D0, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR", }, + {0x9143, "GL_MAX_DEBUG_MESSAGE_LENGTH_KHR", }, + {0x9144, "GL_MAX_DEBUG_LOGGED_MESSAGES_KHR", }, + {0x9145, "GL_DEBUG_LOGGED_MESSAGES_KHR", }, + {0x9146, "GL_DEBUG_SEVERITY_HIGH_KHR", }, + {0x9147, "GL_DEBUG_SEVERITY_MEDIUM_KHR", }, + {0x9148, "GL_DEBUG_SEVERITY_LOW_KHR", }, + {0x9260, "GL_GCCSO_SHADER_BINARY_FJ", }, + {0x8F60, "GL_MALI_SHADER_BINARY_ARM", }, + {0x8F61, "GL_MALI_PROGRAM_BINARY_ARM", }, + {0x87EE, "GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD", }, + {0x822B, "GL_RG8_EXT", }, + {0x822F, "GL_RG16F_EXT", }, + {0x822D, "GL_R16F_EXT", }, + {0x822E, "GL_R32F_EXT", }, + {1, "GL_ES_VERSION_2_0", }, + {0x84F9, "GL_DEPTH_STENCIL_OES", }, + {0x8368, "GL_UNSIGNED_INT_2_10_10_10_REV_EXT", }, + {0x8819, "GL_LUMINANCE_ALPHA32F_EXT", }, + {0x8818, "GL_LUMINANCE32F_EXT", }, + {0x8363, "GL_UNSIGNED_SHORT_5_6_5", }, + {0x8814, "GL_RGBA32F_EXT", }, + {0x84F2, "GL_ALL_COMPLETED_NV", }, + {0x8816, "GL_ALPHA32F_EXT", }, + {0x84F4, "GL_FENCE_CONDITION_NV", }, + {0x8366, "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT", }, + {0x8365, "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT", }, + {0x881E, "GL_LUMINANCE16F_EXT", }, + {0x84FA, "GL_UNSIGNED_INT_24_8_OES", }, + {0x881F, "GL_LUMINANCE_ALPHA16F_EXT", }, + {0x881A, "GL_RGBA16F_EXT", }, + {0x84FE, "GL_TEXTURE_MAX_ANISOTROPY_EXT", }, + {0x0901, "GL_CCW", }, + {0x0900, "GL_CW", }, + {0x8229, "GL_R8_EXT", }, + {0x9283, "GL_DISJOINT_NV", }, + {0x8227, "GL_RG_EXT", }, + {0x8B66, "GL_FLOAT_MAT2x4_NV", }, + {0x8B67, "GL_FLOAT_MAT3x2_NV", }, + {0x8B65, "GL_FLOAT_MAT2x3_NV", }, + {0x8B62, "GL_SAMPLER_2D_SHADOW_EXT", }, + {0x8B63, "GL_SAMPLER_2D_RECT_ARB", }, + {0x8B60, "GL_SAMPLER_CUBE", }, + {0x00001000, "GL_DEPTH_BUFFER_BIT4_QCOM", }, + {0x8B68, "GL_FLOAT_MAT3x4_NV", }, + {0x83F0, "GL_COMPRESSED_RGB_S3TC_DXT1_EXT", }, + {0x00000080, "GL_COLOR_BUFFER_BIT7_QCOM", }, + {0x88F0, "GL_DEPTH24_STENCIL8_OES", }, + {0x80A0, "GL_SAMPLE_COVERAGE", }, + {0x928F, "GL_DST_ATOP_NV", }, + {0x80A9, "GL_SAMPLES", }, + {0x80A8, "GL_SAMPLE_BUFFERS", }, + {0x0D55, "GL_ALPHA_BITS", }, + {0x0D54, "GL_BLUE_BITS", }, + {0x0D57, "GL_STENCIL_BITS", }, + {0x0D56, "GL_DEPTH_BITS", }, + {0x8CD5, "GL_FRAMEBUFFER_COMPLETE", }, + {0x0D50, "GL_SUBPIXEL_BITS", }, + {0x0D53, "GL_GREEN_BITS", }, + {0x0D52, "GL_RED_BITS", }, + {0x8037, "GL_POLYGON_OFFSET_FILL", }, + {0x928C, "GL_SRC_OUT_NV", }, + {0x8034, "GL_UNSIGNED_SHORT_5_5_5_1", }, + {0x8033, "GL_UNSIGNED_SHORT_4_4_4_4", }, + {0x928B, "GL_DST_IN_NV", }, + {0x0305, "GL_ONE_MINUS_DST_ALPHA", }, + {0x0304, "GL_DST_ALPHA", }, + {0x0307, "GL_ONE_MINUS_DST_COLOR", }, + {0x0306, "GL_DST_COLOR", }, + {0x0301, "GL_ONE_MINUS_SRC_COLOR", }, + {0x0300, "GL_SRC_COLOR", }, + {0x0303, "GL_ONE_MINUS_SRC_ALPHA", }, + {0x0302, "GL_SRC_ALPHA", }, + {0x0308, "GL_SRC_ALPHA_SATURATE", }, + {0x2A00, "GL_POLYGON_OFFSET_UNITS", }, + {0xFFFFFFFF, "GL_ALL_SHADER_BITS_EXT", }, + {0x00800000, "GL_STENCIL_BUFFER_BIT7_QCOM", }, + {0x8C4D, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV", }, + {0x00020000, "GL_STENCIL_BUFFER_BIT1_QCOM", }, + {0x8D00, "GL_DEPTH_ATTACHMENT", }, + {0x8FA0, "GL_PERFMON_GLOBAL_MODE_QCOM", }, + {0x8815, "GL_RGB32F_EXT", }, + {0x813D, "GL_TEXTURE_MAX_LEVEL_APPLE", }, + {0x8DFD, "GL_MAX_FRAGMENT_UNIFORM_VECTORS", }, + {0x8CDD, "GL_FRAMEBUFFER_UNSUPPORTED", }, + {0x8CDF, "GL_MAX_COLOR_ATTACHMENTS_EXT", }, + {0x90F3, "GL_CONTEXT_ROBUST_ACCESS_EXT", }, + {0x90F2, "GL_MAX_MULTIVIEW_BUFFERS_EXT", }, + {0x90F1, "GL_MULTIVIEW_EXT", }, + {0x90F0, "GL_COLOR_ATTACHMENT_EXT", }, + {0x803C, "GL_ALPHA8_OES", }, + {0x84F5, "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM", }, + {0x882A, "GL_DRAW_BUFFER5_EXT", }, + {0x80AA, "GL_SAMPLE_COVERAGE_VALUE", }, + {0x84F6, "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM", }, + {0x80AB, "GL_SAMPLE_COVERAGE_INVERT", }, + {0x8C41, "GL_SRGB8_NV", }, + {0x8C40, "GL_SRGB_EXT", }, + {0x882B, "GL_DRAW_BUFFER6_EXT", }, + {0x8C17, "GL_UNSIGNED_NORMALIZED_EXT", }, + {0x8A4A, "GL_SKIP_DECODE_EXT", }, + {0x8A4F, "GL_PROGRAM_PIPELINE_OBJECT_EXT", }, + {0x882C, "GL_DRAW_BUFFER7_EXT", }, + {0x0010, "GL_MAP_FLUSH_EXPLICIT_BIT_EXT", }, + {0x882D, "GL_DRAW_BUFFER8_EXT", }, + {0x8F37, "GL_COPY_WRITE_BUFFER_NV", }, + {0x8F36, "GL_COPY_READ_BUFFER_NV", }, + {0x84FF, "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT", }, + {0x6000, "GL_TEXTURE_POOL_CHROMIUM", }, + {0x0B74, "GL_DEPTH_FUNC", }, + {0x8A49, "GL_DECODE_EXT", }, + {0x881B, "GL_RGB16F_EXT", }, + {0x0B71, "GL_DEPTH_TEST", }, + {0x0B70, "GL_DEPTH_RANGE", }, + {0x0B73, "GL_DEPTH_CLEAR_VALUE", }, + {0x0B72, "GL_DEPTH_WRITEMASK", }, + {0x85BA, "GL_UNSIGNED_SHORT_8_8_APPLE", }, + {0x882E, "GL_DRAW_BUFFER9_EXT", }, + {0x6001, "GL_TEXTURE_POOL_MANAGED_CHROMIUM", }, + {0x8073, "GL_MAX_3D_TEXTURE_SIZE_OES", }, + {0x8072, "GL_TEXTURE_WRAP_R_OES", }, + {0x9289, "GL_DST_OVER_NV", }, + {0x882F, "GL_DRAW_BUFFER10_EXT", }, + {0x8074, "GL_VERTEX_ARRAY_KHR", }, + {0x80E1, "GL_BGRA_EXT", }, + {0x8ED7, "GL_COVERAGE_AUTOMATIC_NV", }, + {0x8ED6, "GL_COVERAGE_EDGE_FRAGMENTS_NV", }, + {0x8ED5, "GL_COVERAGE_ALL_FRAGMENTS_NV", }, + {0x8ED4, "GL_COVERAGE_SAMPLES_NV", }, + {0x8ED3, "GL_COVERAGE_BUFFERS_NV", }, + {0x8ED2, "GL_COVERAGE_ATTACHMENT_NV", }, + {0x8ED1, "GL_COVERAGE_COMPONENT4_NV", }, + {0x8ED0, "GL_COVERAGE_COMPONENT_NV", }, + {0x9288, "GL_SRC_OVER_NV", }, + {0x800B, "GL_FUNC_REVERSE_SUBTRACT", }, + {0x00000400, "GL_STENCIL_BUFFER_BIT", }, + {0x800A, "GL_FUNC_SUBTRACT", }, + {0x8E2C, "GL_DEPTH_COMPONENT16_NONLINEAR_NV", }, + {0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", }, + {0x8219, "GL_FRAMEBUFFER_UNDEFINED_OES", }, + {0x8E22, "GL_TRANSFORM_FEEDBACK", }, + {0x8E28, "GL_TIMESTAMP_EXT", }, + {0x8006, "GL_FUNC_ADD", }, + {0x8007, "GL_MIN_EXT", }, + {0x8004, "GL_ONE_MINUS_CONSTANT_ALPHA", }, + {0x8005, "GL_BLEND_COLOR", }, + {0x8002, "GL_ONE_MINUS_CONSTANT_COLOR", }, + {0x8003, "GL_CONSTANT_ALPHA", }, + {0x8001, "GL_CONSTANT_COLOR", }, + {0x0204, "GL_GREATER", }, + {0x0205, "GL_NOTEQUAL", }, + {0x0206, "GL_GEQUAL", }, + {0x0207, "GL_ALWAYS", }, + {0x0200, "GL_NEVER", }, + {0x0201, "GL_LESS", }, + {0x0202, "GL_EQUAL", }, + {0x0203, "GL_LEQUAL", }, + {0x2901, "GL_REPEAT", }, + {0x92A0, "GL_EXCLUSION_NV", }, + {0x93D8, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR", }, + {0x93D9, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR", }, + {0x8FB2, "GL_GPU_OPTIMIZED_QCOM", }, + {0x190A, "GL_LUMINANCE_ALPHA", }, + {0x8FB0, "GL_BINNING_CONTROL_HINT_QCOM", }, + {0x92A1, "GL_CONTRAST_NV", }, + {0x1E00, "GL_KEEP", }, + {0x1E01, "GL_REPLACE", }, + {0x1E02, "GL_INCR", }, + {0x1E03, "GL_DECR", }, + {0x93D6, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR", }, + {0x93D7, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR", }, + {0x93D4, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR", }, + {0x93D5, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR", }, + {0x0BE2, "GL_BLEND", }, + {0x84CB, "GL_TEXTURE11", }, + {0x8D55, "GL_RENDERBUFFER_STENCIL_SIZE", }, + {0x8D54, "GL_RENDERBUFFER_DEPTH_SIZE", }, + {0x8D57, "GL_MAX_SAMPLES_ANGLE", }, + {0x8D56, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE", }, + {0x8D51, "GL_RENDERBUFFER_GREEN_SIZE", }, + {0x8D50, "GL_RENDERBUFFER_RED_SIZE", }, + {0x8D53, "GL_RENDERBUFFER_ALPHA_SIZE", }, + {0x8D52, "GL_RENDERBUFFER_BLUE_SIZE", }, + {0x92A6, "GL_VIVIDLIGHT_NV", }, + {0x00080000, "GL_STENCIL_BUFFER_BIT3_QCOM", }, + {0x92A7, "GL_LINEARLIGHT_NV", }, + {0x886A, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED", }, + {0x0C01, "GL_DRAW_BUFFER_EXT", }, + {0x93C7, "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES", }, + {0x8B5F, "GL_SAMPLER_3D_OES", }, + {0x8B95, "GL_PALETTE8_RGB8_OES", }, + {0x9250, "GL_SHADER_BINARY_DMP", }, + {0x10000000, "GL_MULTISAMPLE_BUFFER_BIT4_QCOM", }, + {0x8C92, "GL_ATC_RGB_AMD", }, + {0x9154, "GL_VERTEX_ARRAY_OBJECT_EXT", }, + {0x9153, "GL_QUERY_OBJECT_EXT", }, + {0x8864, "GL_QUERY_COUNTER_BITS_EXT", }, + {0x9151, "GL_BUFFER_OBJECT_EXT", }, + {0x8C93, "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD", }, + {0x00000002, "GL_CONTEXT_FLAG_DEBUG_BIT_KHR", }, + {0x00000001, "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE", }, + {0x00000004, "GL_COLOR_BUFFER_BIT2_QCOM", }, + {0x1702, "GL_TEXTURE", }, + {0x00000008, "GL_COLOR_BUFFER_BIT3_QCOM", }, + {0x8B58, "GL_BOOL_VEC3", }, + {0x8828, "GL_DRAW_BUFFER3_EXT", }, + {0x8DF0, "GL_LOW_FLOAT", }, + {0x1906, "GL_ALPHA", }, + {0x1907, "GL_RGB", }, + {0x8FBB, "GL_GPU_DISJOINT_EXT", }, + {0x1902, "GL_DEPTH_COMPONENT", }, + {0x8B56, "GL_BOOL", }, + {0x93DB, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR", }, + {0x8B9B, "GL_IMPLEMENTATION_COLOR_READ_FORMAT", }, + {0x8B9A, "GL_IMPLEMENTATION_COLOR_READ_TYPE", }, + {0x93DA, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR", }, + {0x1908, "GL_RGBA", }, + {0x8DF2, "GL_HIGH_FLOAT", }, + {0x93DD, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR", }, + {0x8827, "GL_DRAW_BUFFER2_EXT", }, + {0x9243, "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM", }, + {0x8DF3, "GL_LOW_INT", }, + {0x82E8, "GL_MAX_LABEL_LENGTH_KHR", }, + {0x82E6, "GL_SAMPLER_KHR", }, + {0x0C02, "GL_READ_BUFFER_EXT", }, + {0x82E3, "GL_QUERY_KHR", }, + {0x82E2, "GL_PROGRAM_KHR", }, + {0x82E1, "GL_SHADER_KHR", }, + {0x8B52, "GL_FLOAT_VEC4", }, + {0x9240, "GL_UNPACK_FLIP_Y_CHROMIUM", }, + {0x8DF6, "GL_UNSIGNED_INT_10_10_10_2_OES", }, + {0x8230, "GL_RG32F_EXT", }, + {0x8DF7, "GL_INT_10_10_10_2_OES", }, + {0x8B69, "GL_FLOAT_MAT4x2_NV", }, + {0x812D, "GL_CLAMP_TO_BORDER_NV", }, + {0x812F, "GL_CLAMP_TO_EDGE", }, + {0x86A3, "GL_COMPRESSED_TEXTURE_FORMATS", }, + {0x86A2, "GL_NUM_COMPRESSED_TEXTURE_FORMATS", }, + {0x0CF3, "GL_UNPACK_SKIP_ROWS_EXT", }, + {0x0CF2, "GL_UNPACK_ROW_LENGTH_EXT", }, + {0x140C, "GL_FIXED", }, + {0x8008, "GL_MAX_EXT", }, + {0x0CF5, "GL_UNPACK_ALIGNMENT", }, + {0x0CF4, "GL_UNPACK_SKIP_PIXELS_EXT", }, + {0x8009, "GL_BLEND_EQUATION", }, + {0x1401, "GL_UNSIGNED_BYTE", }, + {0x1400, "GL_BYTE", }, + {0x1403, "GL_UNSIGNED_SHORT", }, + {0x1402, "GL_SHORT", }, + {0x1405, "GL_UNSIGNED_INT", }, + {0x1404, "GL_INT", }, + {0x1406, "GL_FLOAT", }, + {0x8043, "GL_LUMINANCE4_ALPHA4_OES", }, + {0x8040, "GL_LUMINANCE8_OES", }, + {0x8045, "GL_LUMINANCE8_ALPHA8_OES", }, + {0x8CD1, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", }, + {0x00040000, "GL_STENCIL_BUFFER_BIT2_QCOM", }, + {0x8CD0, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", }, + {0x8CE4, "GL_COLOR_ATTACHMENT4_EXT", }, + {0x8CD3, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", }, + {0x929E, "GL_DIFFERENCE_NV", }, + {0x0B90, "GL_STENCIL_TEST", }, + {0x8CD2, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", }, + {0x881C, "GL_ALPHA16F_EXT", }, + {0x928E, "GL_SRC_ATOP_NV", }, + {0x8CD4, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES", }, + {0x9298, "GL_LIGHTEN_NV", }, + {0x8CD7, "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", }, + {0x9112, "GL_OBJECT_TYPE_APPLE", }, + {0x8038, "GL_POLYGON_OFFSET_FACTOR", }, + {0x851A, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z", }, + {0x851C, "GL_MAX_CUBE_MAP_TEXTURE_SIZE", }, + {0x8CD9, "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS", }, + {0x84CC, "GL_TEXTURE12", }, + {0x0BA2, "GL_VIEWPORT", }, + {0x84CA, "GL_TEXTURE10", }, + {0x84CF, "GL_TEXTURE15", }, + {0x84CE, "GL_TEXTURE14", }, + {0x84CD, "GL_TEXTURE13", }, + {0x9115, "GL_SYNC_FLAGS_APPLE", }, + {0x9286, "GL_SRC_NV", }, + {0x83F3, "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE", }, + {0x83F2, "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE", }, + {0x83F1, "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT", }, + {0x9114, "GL_SYNC_STATUS_APPLE", }, + {0x8C0A, "GL_SGX_BINARY_IMG", }, + {0x9285, "GL_BLEND_ADVANCED_COHERENT_NV", }, + {0x911C, "GL_CONDITION_SATISFIED_APPLE", }, + {0x911B, "GL_TIMEOUT_EXPIRED_APPLE", }, + {0x911A, "GL_ALREADY_SIGNALED_APPLE", }, + {0x9284, "GL_CONJOINT_NV", }, + {0x911D, "GL_WAIT_FAILED_APPLE", }, + {0x929A, "GL_COLORBURN_NV", }, + {0x929B, "GL_HARDLIGHT_NV", }, + {0x929C, "GL_SOFTLIGHT_NV", }, + {0x846D, "GL_ALIASED_POINT_SIZE_RANGE", }, + {0x846E, "GL_ALIASED_LINE_WIDTH_RANGE", }, + {0x929F, "GL_MINUS_NV", }, + {0x9282, "GL_UNCORRELATED_NV", }, + {0x9113, "GL_SYNC_CONDITION_APPLE", }, + {0x93A4, "GL_PACK_REVERSE_ROW_ORDER_ANGLE", }, + {0x9111, "GL_MAX_SERVER_WAIT_TIMEOUT_APPLE", }, + {0x93A6, "GL_PROGRAM_BINARY_ANGLE", }, + {0x9117, "GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE", }, + {0x93A0, "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE", }, + {0x93A3, "GL_FRAMEBUFFER_ATTACHMENT_ANGLE", }, + {0x93A2, "GL_TEXTURE_USAGE_ANGLE", }, + {0x8802, "GL_STENCIL_BACK_PASS_DEPTH_FAIL", }, + {0x9119, "GL_SIGNALED_APPLE", }, + {0x9118, "GL_UNSIGNALED_APPLE", }, + {0x9294, "GL_MULTIPLY_NV", }, + {0x9295, "GL_SCREEN_NV", }, + {0x9296, "GL_OVERLAY_NV", }, + {0x9297, "GL_DARKEN_NV", }, + {0x0020, "GL_MAP_UNSYNCHRONIZED_BIT_EXT", }, + {0x8C01, "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG", }, + {0x8C00, "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG", }, + {0x8A52, "GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT", }, + {0x8C02, "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG", }, + {0x84C9, "GL_TEXTURE9", }, + {0x84C8, "GL_TEXTURE8", }, + {0x8869, "GL_MAX_VERTEX_ATTRIBS", }, + {0x84C3, "GL_TEXTURE3", }, + {0x84C2, "GL_TEXTURE2", }, + {0x84C1, "GL_TEXTURE1", }, + {0x84C0, "GL_TEXTURE0", }, + {0x84C7, "GL_TEXTURE7", }, + {0x84C6, "GL_TEXTURE6", }, + {0x84C5, "GL_TEXTURE5", }, + {0x8803, "GL_STENCIL_BACK_PASS_DEPTH_PASS", }, + {0x928A, "GL_SRC_IN_NV", }, + {0x8518, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y", }, + {0x8519, "GL_TEXTURE_CUBE_MAP_POSITIVE_Z", }, + {0x8514, "GL_TEXTURE_BINDING_CUBE_MAP", }, + {0x8515, "GL_TEXTURE_CUBE_MAP_POSITIVE_X", }, + {0x8516, "GL_TEXTURE_CUBE_MAP_NEGATIVE_X", }, + {0x8517, "GL_TEXTURE_CUBE_MAP_POSITIVE_Y", }, + {0x8513, "GL_TEXTURE_CUBE_MAP", }, + {0x8626, "GL_CURRENT_VERTEX_ATTRIB", }, + {0x92B1, "GL_PLUS_CLAMPED_NV", }, + {0x92B0, "GL_HSL_LUMINOSITY_NV", }, + {0x92B3, "GL_MINUS_CLAMPED_NV", }, + {0x92B2, "GL_PLUS_CLAMPED_ALPHA_NV", }, + {0x8765, "GL_BUFFER_USAGE", }, + {0x8764, "GL_BUFFER_SIZE", }, + {0x8B99, "GL_PALETTE8_RGB5_A1_OES", }, + {0x0503, "GL_STACK_OVERFLOW_KHR", }, + {0x0502, "GL_INVALID_OPERATION", }, + {0x0501, "GL_INVALID_VALUE", }, + {0x0500, "GL_INVALID_ENUM", }, + {64, "GL_MAILBOX_SIZE_CHROMIUM", }, + {0x0506, "GL_INVALID_FRAMEBUFFER_OPERATION", }, + {0x0505, "GL_OUT_OF_MEMORY", }, + {0x0504, "GL_STACK_UNDERFLOW_KHR", }, + {0x0B44, "GL_CULL_FACE", }, + {0x8B5E, "GL_SAMPLER_2D", }, + {0x0B46, "GL_FRONT_FACE", }, + {0x8FB3, "GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM", }, + {0x824A, "GL_DEBUG_SOURCE_APPLICATION_KHR", }, + {0x824B, "GL_DEBUG_SOURCE_OTHER_KHR", }, + {0x824C, "GL_DEBUG_TYPE_ERROR_KHR", }, + {0x824D, "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR", }, + {0x824E, "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR", }, + {0x824F, "GL_DEBUG_TYPE_PORTABILITY_KHR", }, + {0x8B31, "GL_VERTEX_SHADER", }, + {0x8B30, "GL_FRAGMENT_SHADER", }, + {0x8FB1, "GL_CPU_OPTIMIZED_QCOM", }, + {0x93D2, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR", }, + {0x8B5A, "GL_FLOAT_MAT2", }, + {0x84D8, "GL_TEXTURE24", }, + {0x84D9, "GL_TEXTURE25", }, + {0x84D6, "GL_TEXTURE22", }, + {0x84D7, "GL_TEXTURE23", }, + {0x84D4, "GL_TEXTURE20", }, + {0x0D05, "GL_PACK_ALIGNMENT", }, + {0x84D2, "GL_TEXTURE18", }, + {0x84D3, "GL_TEXTURE19", }, + {0x84D0, "GL_TEXTURE16", }, + {0x84D1, "GL_TEXTURE17", }, + {0x93D1, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR", }, + {0x84DF, "GL_TEXTURE31", }, + {0x8B97, "GL_PALETTE8_R5_G6_B5_OES", }, + {0x84DD, "GL_TEXTURE29", }, + {0x84DE, "GL_TEXTURE30", }, + {0x84DB, "GL_TEXTURE27", }, + {0x84DC, "GL_TEXTURE28", }, + {0x6002, "GL_TEXTURE_POOL_UNMANAGED_CHROMIUM", }, + {0x84DA, "GL_TEXTURE26", }, + {0x8242, "GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR", }, + {0x8243, "GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR", }, + {0x8244, "GL_DEBUG_CALLBACK_FUNCTION_KHR", }, + {0x8245, "GL_DEBUG_CALLBACK_USER_PARAM_KHR", }, + {0x8246, "GL_DEBUG_SOURCE_API_KHR", }, + {0x8247, "GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR", }, + {0x8248, "GL_DEBUG_SOURCE_SHADER_COMPILER_KHR", }, + {0x8249, "GL_DEBUG_SOURCE_THIRD_PARTY_KHR", }, + {0x8B94, "GL_PALETTE4_RGB5_A1_OES", }, + {0x00000040, "GL_COLOR_BUFFER_BIT6_QCOM", }, + {0x8645, "GL_VERTEX_ATTRIB_ARRAY_POINTER", }, + {0x8865, "GL_CURRENT_QUERY_EXT", }, + {0x8866, "GL_QUERY_RESULT_EXT", }, + {0x8867, "GL_QUERY_RESULT_AVAILABLE_EXT", }, + {0x08000000, "GL_MULTISAMPLE_BUFFER_BIT3_QCOM", }, + {0x87FA, "GL_3DC_XY_AMD", }, + {0x84C4, "GL_TEXTURE4", }, + {0x85B5, "GL_VERTEX_ARRAY_BINDING_OES", }, + {0x8D6A, "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT", }, + {0x8D6C, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT", }, + {0x8252, "GL_LOSE_CONTEXT_ON_RESET_EXT", }, + {0x8C4C, "GL_COMPRESSED_SRGB_S3TC_DXT1_NV", }, + {0x8C4E, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV", }, + {0x1102, "GL_NICEST", }, + {0x8C4F, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV", }, + {0x93E9, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES", }, + {0x93E8, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES", }, + {0x8C43, "GL_SRGB8_ALPHA8_EXT", }, + {0x8C42, "GL_SRGB_ALPHA_EXT", }, + {0x8C45, "GL_SLUMINANCE8_ALPHA8_NV", }, + {0x8C44, "GL_SLUMINANCE_ALPHA_NV", }, + {0x8C47, "GL_SLUMINANCE8_NV", }, + {0x8C46, "GL_SLUMINANCE_NV", }, + {0x93E1, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES", }, + {0x93E0, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES", }, + {0x93E3, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES", }, + {0x93E2, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES", }, + {0x93E5, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES", }, + {0x93E4, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES", }, + {0x93E7, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES", }, + {0x93E6, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES", }, + {0x8D68, "GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES", }, + {0x85BB, "GL_UNSIGNED_SHORT_8_8_REV_APPLE", }, + {0x8D61, "GL_HALF_FLOAT_OES", }, + {0x8D62, "GL_RGB565", }, + {0x8D64, "GL_ETC1_RGB8_OES", }, + {0x8D65, "GL_TEXTURE_EXTERNAL_OES", }, + {0x8D66, "GL_SAMPLER_EXTERNAL_OES", }, + {0x8D67, "GL_TEXTURE_BINDING_EXTERNAL_OES", }, + {0x04000000, "GL_MULTISAMPLE_BUFFER_BIT2_QCOM", }, + {0x8CEE, "GL_COLOR_ATTACHMENT14_EXT", }, + {0x2800, "GL_TEXTURE_MAG_FILTER", }, + {0x2801, "GL_TEXTURE_MIN_FILTER", }, + {0x2802, "GL_TEXTURE_WRAP_S", }, + {0x2803, "GL_TEXTURE_WRAP_T", }, + {0x2703, "GL_LINEAR_MIPMAP_LINEAR", }, + {0x8B98, "GL_PALETTE8_RGBA4_OES", }, + {0x84F3, "GL_FENCE_STATUS_NV", }, + {0x2702, "GL_NEAREST_MIPMAP_LINEAR", }, + {0x1F03, "GL_EXTENSIONS", }, + {0x1F02, "GL_VERSION", }, + {0x1F01, "GL_RENDERER", }, + {0x1F00, "GL_VENDOR", }, + {0x2701, "GL_LINEAR_MIPMAP_NEAREST", }, + {0x92B4, "GL_INVERT_OVG_NV", }, + {0x0B94, "GL_STENCIL_FAIL", }, + {0x8B4C, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS", }, + {0x8B4D, "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS", }, + {0x8B4F, "GL_SHADER_TYPE", }, + {0x00004000, "GL_COLOR_BUFFER_BIT", }, + {0x00000010, "GL_COLOR_BUFFER_BIT4_QCOM", }, + {0x8834, "GL_DRAW_BUFFER15_EXT", }, + {0x8833, "GL_DRAW_BUFFER14_EXT", }, + {0x8832, "GL_DRAW_BUFFER13_EXT", }, + {0x8831, "GL_DRAW_BUFFER12_EXT", }, + {0x8830, "GL_DRAW_BUFFER11_EXT", }, + {0x8DC5, "GL_SAMPLER_CUBE_SHADOW_NV", }, + {0x93B8, "GL_COMPRESSED_RGBA_ASTC_10x5_KHR", }, + {0x9241, "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM", }, + {0x00010000, "GL_STENCIL_BUFFER_BIT0_QCOM", }, + {0x0B93, "GL_STENCIL_VALUE_MASK", }, + {0x0B92, "GL_STENCIL_FUNC", }, + {0x0B91, "GL_STENCIL_CLEAR_VALUE", }, + {0x883D, "GL_BLEND_EQUATION_ALPHA", }, + {0x0B97, "GL_STENCIL_REF", }, + {0x0B96, "GL_STENCIL_PASS_DEPTH_PASS", }, + {0x0B95, "GL_STENCIL_PASS_DEPTH_FAIL", }, + {0x2700, "GL_NEAREST_MIPMAP_NEAREST", }, + {0x0B98, "GL_STENCIL_WRITEMASK", }, + {0x8B40, "GL_PROGRAM_OBJECT_EXT", }, + {0x1004, "GL_TEXTURE_BORDER_COLOR_NV", }, + {0x8B48, "GL_SHADER_OBJECT_EXT", }, + {0x912F, "GL_TEXTURE_IMMUTABLE_FORMAT_EXT", }, + {0x20000000, "GL_MULTISAMPLE_BUFFER_BIT5_QCOM", }, + {0x0DE1, "GL_TEXTURE_2D", }, + {0x80C9, "GL_BLEND_SRC_RGB", }, + {0x80C8, "GL_BLEND_DST_RGB", }, + {0x8059, "GL_RGB10_A2_EXT", }, + {0x8058, "GL_RGBA8_OES", }, + {0x8B93, "GL_PALETTE4_RGBA4_OES", }, + {0x00002000, "GL_DEPTH_BUFFER_BIT5_QCOM", }, + {0x8051, "GL_RGB8_OES", }, + {0x8052, "GL_RGB10_EXT", }, + {0x8CAB, "GL_RENDERBUFFER_SAMPLES_ANGLE", }, + {0x8057, "GL_RGB5_A1", }, + {0x8056, "GL_RGBA4", }, + {0x150A, "GL_INVERT", }, + {0x01000000, "GL_MULTISAMPLE_BUFFER_BIT0_QCOM", }, + {0x78ED, "GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM", }, + {0x78EE, "GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM", }, + {0x78EF, "GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM", }, + {0x0B45, "GL_CULL_FACE_MODE", }, + {0x8B92, "GL_PALETTE4_R5_G6_B5_OES", }, + {0x00100000, "GL_STENCIL_BUFFER_BIT4_QCOM", }, + {0x9299, "GL_COLORDODGE_NV", }, + {0x8D20, "GL_STENCIL_ATTACHMENT", }, + {0x8B91, "GL_PALETTE4_RGBA8_OES", }, + {0x00000200, "GL_DEPTH_BUFFER_BIT1_QCOM", }, + {0x00008000, "GL_COVERAGE_BUFFER_BIT_NV", }, + {0x1506, "GL_XOR_NV", }, + {0x8CA8, "GL_READ_FRAMEBUFFER_ANGLE", }, + {0x8CA9, "GL_DRAW_FRAMEBUFFER_ANGLE", }, + {0x8CA6, "GL_FRAMEBUFFER_BINDING", }, + {0x8CA7, "GL_RENDERBUFFER_BINDING", }, + {0x8CA4, "GL_STENCIL_BACK_VALUE_MASK", }, + {0x8CA5, "GL_STENCIL_BACK_WRITEMASK", }, + {0x8B90, "GL_PALETTE4_RGB8_OES", }, + {0x8CA3, "GL_STENCIL_BACK_REF", }, + {0x80CB, "GL_BLEND_SRC_ALPHA", }, + {0x80CA, "GL_BLEND_DST_ALPHA", }, + {0x8CE7, "GL_COLOR_ATTACHMENT7_EXT", }, + {0x93B0, "GL_COMPRESSED_RGBA_ASTC_4x4_KHR", }, + {0x93B1, "GL_COMPRESSED_RGBA_ASTC_5x4_KHR", }, + {0x93B2, "GL_COMPRESSED_RGBA_ASTC_5x5_KHR", }, + {0x93B3, "GL_COMPRESSED_RGBA_ASTC_6x5_KHR", }, + {0x93B4, "GL_COMPRESSED_RGBA_ASTC_6x6_KHR", }, + {0x93B5, "GL_COMPRESSED_RGBA_ASTC_8x5_KHR", }, + {0x93B6, "GL_COMPRESSED_RGBA_ASTC_8x6_KHR", }, + {0x93B7, "GL_COMPRESSED_RGBA_ASTC_8x8_KHR", }, + {0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", }, + {0x93B9, "GL_COMPRESSED_RGBA_ASTC_10x6_KHR", }, + {0x8253, "GL_GUILTY_CONTEXT_RESET_EXT", }, + {0x8CE5, "GL_COLOR_ATTACHMENT5_EXT", }, + {0x8CE9, "GL_COLOR_ATTACHMENT9_EXT", }, + {0x8B96, "GL_PALETTE8_RGBA8_OES", }, + {0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS", }, + {0x8508, "GL_DECR_WRAP", }, + {0x92AD, "GL_HSL_HUE_NV", }, + {0x92AE, "GL_HSL_SATURATION_NV", }, + {0x92AF, "GL_HSL_COLOR_NV", }, + {0x8DC4, "GL_SAMPLER_2D_ARRAY_SHADOW_NV", }, + {0x8507, "GL_INCR_WRAP", }, + {0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING", }, + {0x8894, "GL_ARRAY_BUFFER_BINDING", }, + {0x92A3, "GL_INVERT_RGB_NV", }, + {0x92A4, "GL_LINEARDODGE_NV", }, + {0x92A5, "GL_LINEARBURN_NV", }, + {0x8893, "GL_ELEMENT_ARRAY_BUFFER", }, + {0x8892, "GL_ARRAY_BUFFER", }, + {0x92A8, "GL_PINLIGHT_NV", }, + {0x92A9, "GL_HARDMIX_NV", }, + {0x8BD8, "GL_TEXTURE_IMAGE_VALID_QCOM", }, + {0x84D5, "GL_TEXTURE21", }, + {0x9287, "GL_DST_NV", }, + {0x93BA, "GL_COMPRESSED_RGBA_ASTC_10x8_KHR", }, + {0x93BB, "GL_COMPRESSED_RGBA_ASTC_10x10_KHR", }, + {0x93BC, "GL_COMPRESSED_RGBA_ASTC_12x10_KHR", }, + {0x93BD, "GL_COMPRESSED_RGBA_ASTC_12x12_KHR", }, + {0x84E8, "GL_MAX_RENDERBUFFER_SIZE", }, + {0x9281, "GL_BLEND_OVERLAP_NV", }, + {0x9280, "GL_BLEND_PREMULTIPLIED_SRC_NV", }, + {0x8370, "GL_MIRRORED_REPEAT", }, + {0x84E0, "GL_ACTIVE_TEXTURE", }, + {0x8800, "GL_STENCIL_BACK_FUNC", }, + {0x8801, "GL_STENCIL_BACK_FAIL", }, + {0x0D33, "GL_MAX_TEXTURE_SIZE", }, + {0x8624, "GL_VERTEX_ATTRIB_ARRAY_STRIDE", }, + {0x8625, "GL_VERTEX_ATTRIB_ARRAY_TYPE", }, + {0x8622, "GL_VERTEX_ATTRIB_ARRAY_ENABLED", }, + {0x8623, "GL_VERTEX_ATTRIB_ARRAY_SIZE", }, + {0x8DB9, "GL_FRAMEBUFFER_SRGB_EXT", }, + {0x8259, "GL_ACTIVE_PROGRAM_EXT", }, + {0x8258, "GL_PROGRAM_SEPARABLE_EXT", }, + {0x8256, "GL_RESET_NOTIFICATION_STRATEGY_EXT", }, + {0x8255, "GL_UNKNOWN_CONTEXT_RESET_EXT", }, + {0x8254, "GL_INNOCENT_CONTEXT_RESET_EXT", }, + {0x1100, "GL_DONT_CARE", }, + {0x1101, "GL_FASTEST", }, + {0x8251, "GL_DEBUG_TYPE_OTHER_KHR", }, + {0x8250, "GL_DEBUG_TYPE_PERFORMANCE_KHR", }, + {0x8CEB, "GL_COLOR_ATTACHMENT11_EXT", }, + {0x8CEC, "GL_COLOR_ATTACHMENT12_EXT", }, + {0x0408, "GL_FRONT_AND_BACK", }, + {0x8CEA, "GL_COLOR_ATTACHMENT10_EXT", }, + {0x8CEF, "GL_COLOR_ATTACHMENT15_EXT", }, + {0x8CED, "GL_COLOR_ATTACHMENT13_EXT", }, + {0x8829, "GL_DRAW_BUFFER4_EXT", }, + {0x0404, "GL_FRONT", }, + {0x0405, "GL_BACK", }, + {0x88E1, "GL_STREAM_READ", }, + {0x88E0, "GL_STREAM_DRAW", }, + {0x88E4, "GL_STATIC_DRAW", }, + {0x93C6, "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES", }, + {0x88E8, "GL_DYNAMIC_DRAW", }, + {0x9291, "GL_PLUS_NV", }, + {0x8CAA, "GL_READ_FRAMEBUFFER_BINDING_ANGLE", }, + {0x93C5, "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES", }, + {0x40000000, "GL_MULTISAMPLE_BUFFER_BIT6_QCOM", }, + {0x9116, "GL_SYNC_FENCE_APPLE", }, + {0x93C4, "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES", }, + {0x88EE, "GL_ETC1_SRGB8_NV", }, + {0x93C3, "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES", }, + {0x00000800, "GL_DEPTH_BUFFER_BIT3_QCOM", }, + {0x1903, "GL_RED_EXT", }, + {0x93C2, "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES", }, + {0x8CE2, "GL_COLOR_ATTACHMENT2_EXT", }, + {0x8BC1, "GL_COUNTER_RANGE_AMD", }, + {0x8CE0, "GL_COLOR_ATTACHMENT0", }, + {0x8CE1, "GL_COLOR_ATTACHMENT1_EXT", }, + {0x8CE6, "GL_COLOR_ATTACHMENT6_EXT", }, + {0x93C1, "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES", }, + {0x8A1F, "GL_RGB_422_APPLE", }, + {0x93DC, "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR", }, + {0x9292, "GL_PLUS_DARKER_NV", }, + {0x8CE8, "GL_COLOR_ATTACHMENT8_EXT", }, + {0x93C0, "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES", }, + {0x0C23, "GL_COLOR_WRITEMASK", }, + {0x0C22, "GL_COLOR_CLEAR_VALUE", }, + {0x8823, "GL_WRITEONLY_RENDERING_QCOM", }, + {0x8824, "GL_MAX_DRAW_BUFFERS_EXT", }, + {0x825A, "GL_PROGRAM_PIPELINE_BINDING_EXT", }, + {0x1909, "GL_LUMINANCE", }, + {0x0D3A, "GL_MAX_VIEWPORT_DIMS", }, + {0x8B53, "GL_INT_VEC2", }, + {0x8826, "GL_DRAW_BUFFER1_EXT", }, + {0x809E, "GL_SAMPLE_ALPHA_TO_COVERAGE", }, + {0x8BC0, "GL_COUNTER_TYPE_AMD", }, + {0x8BC3, "GL_PERCENTAGE_AMD", }, + {0x8BC2, "GL_UNSIGNED_INT64_AMD", }, + {0x8BC5, "GL_PERFMON_RESULT_SIZE_AMD", }, + {0x8BC4, "GL_PERFMON_RESULT_AVAILABLE_AMD", }, + {0x8BC6, "GL_PERFMON_RESULT_AMD", }, }; const GLES2Util::EnumToString* const GLES2Util::enum_to_string_table_ = enum_to_string_table; @@ -789,729 +790,665 @@ const size_t GLES2Util::enum_to_string_table_len_ = std::string GLES2Util::GetStringAttachment(uint32 value) { static const EnumToString string_table[] = { - { GL_COLOR_ATTACHMENT0, "GL_COLOR_ATTACHMENT0" }, - { GL_DEPTH_ATTACHMENT, "GL_DEPTH_ATTACHMENT" }, - { GL_STENCIL_ATTACHMENT, "GL_STENCIL_ATTACHMENT" }, - }; + {GL_COLOR_ATTACHMENT0, "GL_COLOR_ATTACHMENT0"}, + {GL_DEPTH_ATTACHMENT, "GL_DEPTH_ATTACHMENT"}, + {GL_STENCIL_ATTACHMENT, "GL_STENCIL_ATTACHMENT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringBackbufferAttachment(uint32 value) { static const EnumToString string_table[] = { - { GL_COLOR_EXT, "GL_COLOR_EXT" }, - { GL_DEPTH_EXT, "GL_DEPTH_EXT" }, - { GL_STENCIL_EXT, "GL_STENCIL_EXT" }, - }; + {GL_COLOR_EXT, "GL_COLOR_EXT"}, + {GL_DEPTH_EXT, "GL_DEPTH_EXT"}, + {GL_STENCIL_EXT, "GL_STENCIL_EXT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringBlitFilter(uint32 value) { - static const EnumToString string_table[] = { - { GL_NEAREST, "GL_NEAREST" }, - { GL_LINEAR, "GL_LINEAR" }, - }; + static const EnumToString string_table[] = {{GL_NEAREST, "GL_NEAREST"}, + {GL_LINEAR, "GL_LINEAR"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringBufferParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_BUFFER_SIZE, "GL_BUFFER_SIZE" }, - { GL_BUFFER_USAGE, "GL_BUFFER_USAGE" }, - }; + {GL_BUFFER_SIZE, "GL_BUFFER_SIZE"}, + {GL_BUFFER_USAGE, "GL_BUFFER_USAGE"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringBufferTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_ARRAY_BUFFER, "GL_ARRAY_BUFFER" }, - { GL_ELEMENT_ARRAY_BUFFER, "GL_ELEMENT_ARRAY_BUFFER" }, - }; + {GL_ARRAY_BUFFER, "GL_ARRAY_BUFFER"}, + {GL_ELEMENT_ARRAY_BUFFER, "GL_ELEMENT_ARRAY_BUFFER"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringBufferUsage(uint32 value) { static const EnumToString string_table[] = { - { GL_STREAM_DRAW, "GL_STREAM_DRAW" }, - { GL_STATIC_DRAW, "GL_STATIC_DRAW" }, - { GL_DYNAMIC_DRAW, "GL_DYNAMIC_DRAW" }, - }; + {GL_STREAM_DRAW, "GL_STREAM_DRAW"}, + {GL_STATIC_DRAW, "GL_STATIC_DRAW"}, + {GL_DYNAMIC_DRAW, "GL_DYNAMIC_DRAW"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringCapability(uint32 value) { static const EnumToString string_table[] = { - { GL_BLEND, "GL_BLEND" }, - { GL_CULL_FACE, "GL_CULL_FACE" }, - { GL_DEPTH_TEST, "GL_DEPTH_TEST" }, - { GL_DITHER, "GL_DITHER" }, - { GL_POLYGON_OFFSET_FILL, "GL_POLYGON_OFFSET_FILL" }, - { GL_SAMPLE_ALPHA_TO_COVERAGE, "GL_SAMPLE_ALPHA_TO_COVERAGE" }, - { GL_SAMPLE_COVERAGE, "GL_SAMPLE_COVERAGE" }, - { GL_SCISSOR_TEST, "GL_SCISSOR_TEST" }, - { GL_STENCIL_TEST, "GL_STENCIL_TEST" }, - }; + {GL_BLEND, "GL_BLEND"}, + {GL_CULL_FACE, "GL_CULL_FACE"}, + {GL_DEPTH_TEST, "GL_DEPTH_TEST"}, + {GL_DITHER, "GL_DITHER"}, + {GL_POLYGON_OFFSET_FILL, "GL_POLYGON_OFFSET_FILL"}, + {GL_SAMPLE_ALPHA_TO_COVERAGE, "GL_SAMPLE_ALPHA_TO_COVERAGE"}, + {GL_SAMPLE_COVERAGE, "GL_SAMPLE_COVERAGE"}, + {GL_SCISSOR_TEST, "GL_SCISSOR_TEST"}, + {GL_STENCIL_TEST, "GL_STENCIL_TEST"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringCmpFunction(uint32 value) { - static const EnumToString string_table[] = { - { GL_NEVER, "GL_NEVER" }, - { GL_LESS, "GL_LESS" }, - { GL_EQUAL, "GL_EQUAL" }, - { GL_LEQUAL, "GL_LEQUAL" }, - { GL_GREATER, "GL_GREATER" }, - { GL_NOTEQUAL, "GL_NOTEQUAL" }, - { GL_GEQUAL, "GL_GEQUAL" }, - { GL_ALWAYS, "GL_ALWAYS" }, - }; + static const EnumToString string_table[] = {{GL_NEVER, "GL_NEVER"}, + {GL_LESS, "GL_LESS"}, + {GL_EQUAL, "GL_EQUAL"}, + {GL_LEQUAL, "GL_LEQUAL"}, + {GL_GREATER, "GL_GREATER"}, + {GL_NOTEQUAL, "GL_NOTEQUAL"}, + {GL_GEQUAL, "GL_GEQUAL"}, + {GL_ALWAYS, "GL_ALWAYS"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringCompressedTextureFormat(uint32 value) { - return GLES2Util::GetQualifiedEnumString( - NULL, 0, value); + return GLES2Util::GetQualifiedEnumString(NULL, 0, value); } std::string GLES2Util::GetStringDrawMode(uint32 value) { static const EnumToString string_table[] = { - { GL_POINTS, "GL_POINTS" }, - { GL_LINE_STRIP, "GL_LINE_STRIP" }, - { GL_LINE_LOOP, "GL_LINE_LOOP" }, - { GL_LINES, "GL_LINES" }, - { GL_TRIANGLE_STRIP, "GL_TRIANGLE_STRIP" }, - { GL_TRIANGLE_FAN, "GL_TRIANGLE_FAN" }, - { GL_TRIANGLES, "GL_TRIANGLES" }, - }; + {GL_POINTS, "GL_POINTS"}, + {GL_LINE_STRIP, "GL_LINE_STRIP"}, + {GL_LINE_LOOP, "GL_LINE_LOOP"}, + {GL_LINES, "GL_LINES"}, + {GL_TRIANGLE_STRIP, "GL_TRIANGLE_STRIP"}, + {GL_TRIANGLE_FAN, "GL_TRIANGLE_FAN"}, + {GL_TRIANGLES, "GL_TRIANGLES"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringDstBlendFactor(uint32 value) { static const EnumToString string_table[] = { - { GL_ZERO, "GL_ZERO" }, - { GL_ONE, "GL_ONE" }, - { GL_SRC_COLOR, "GL_SRC_COLOR" }, - { GL_ONE_MINUS_SRC_COLOR, "GL_ONE_MINUS_SRC_COLOR" }, - { GL_DST_COLOR, "GL_DST_COLOR" }, - { GL_ONE_MINUS_DST_COLOR, "GL_ONE_MINUS_DST_COLOR" }, - { GL_SRC_ALPHA, "GL_SRC_ALPHA" }, - { GL_ONE_MINUS_SRC_ALPHA, "GL_ONE_MINUS_SRC_ALPHA" }, - { GL_DST_ALPHA, "GL_DST_ALPHA" }, - { GL_ONE_MINUS_DST_ALPHA, "GL_ONE_MINUS_DST_ALPHA" }, - { GL_CONSTANT_COLOR, "GL_CONSTANT_COLOR" }, - { GL_ONE_MINUS_CONSTANT_COLOR, "GL_ONE_MINUS_CONSTANT_COLOR" }, - { GL_CONSTANT_ALPHA, "GL_CONSTANT_ALPHA" }, - { GL_ONE_MINUS_CONSTANT_ALPHA, "GL_ONE_MINUS_CONSTANT_ALPHA" }, - }; + {GL_ZERO, "GL_ZERO"}, + {GL_ONE, "GL_ONE"}, + {GL_SRC_COLOR, "GL_SRC_COLOR"}, + {GL_ONE_MINUS_SRC_COLOR, "GL_ONE_MINUS_SRC_COLOR"}, + {GL_DST_COLOR, "GL_DST_COLOR"}, + {GL_ONE_MINUS_DST_COLOR, "GL_ONE_MINUS_DST_COLOR"}, + {GL_SRC_ALPHA, "GL_SRC_ALPHA"}, + {GL_ONE_MINUS_SRC_ALPHA, "GL_ONE_MINUS_SRC_ALPHA"}, + {GL_DST_ALPHA, "GL_DST_ALPHA"}, + {GL_ONE_MINUS_DST_ALPHA, "GL_ONE_MINUS_DST_ALPHA"}, + {GL_CONSTANT_COLOR, "GL_CONSTANT_COLOR"}, + {GL_ONE_MINUS_CONSTANT_COLOR, "GL_ONE_MINUS_CONSTANT_COLOR"}, + {GL_CONSTANT_ALPHA, "GL_CONSTANT_ALPHA"}, + {GL_ONE_MINUS_CONSTANT_ALPHA, "GL_ONE_MINUS_CONSTANT_ALPHA"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringEquation(uint32 value) { static const EnumToString string_table[] = { - { GL_FUNC_ADD, "GL_FUNC_ADD" }, - { GL_FUNC_SUBTRACT, "GL_FUNC_SUBTRACT" }, - { GL_FUNC_REVERSE_SUBTRACT, "GL_FUNC_REVERSE_SUBTRACT" }, - }; + {GL_FUNC_ADD, "GL_FUNC_ADD"}, + {GL_FUNC_SUBTRACT, "GL_FUNC_SUBTRACT"}, + {GL_FUNC_REVERSE_SUBTRACT, "GL_FUNC_REVERSE_SUBTRACT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringFaceMode(uint32 value) { - static const EnumToString string_table[] = { - { GL_CW, "GL_CW" }, - { GL_CCW, "GL_CCW" }, - }; + static const EnumToString string_table[] = {{GL_CW, "GL_CW"}, + {GL_CCW, "GL_CCW"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringFaceType(uint32 value) { static const EnumToString string_table[] = { - { GL_FRONT, "GL_FRONT" }, - { GL_BACK, "GL_BACK" }, - { GL_FRONT_AND_BACK, "GL_FRONT_AND_BACK" }, - }; + {GL_FRONT, "GL_FRONT"}, + {GL_BACK, "GL_BACK"}, + {GL_FRONT_AND_BACK, "GL_FRONT_AND_BACK"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringFrameBufferParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE" }, - { GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME" }, - { GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL" }, - { GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE" }, - }; + {GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"}, + {GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, + "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"}, + {GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"}, + {GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, + "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringFrameBufferTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_FRAMEBUFFER, "GL_FRAMEBUFFER" }, - }; + {GL_FRAMEBUFFER, "GL_FRAMEBUFFER"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringGLState(uint32 value) { static const EnumToString string_table[] = { - { GL_ACTIVE_TEXTURE, "GL_ACTIVE_TEXTURE" }, - { GL_ALIASED_LINE_WIDTH_RANGE, "GL_ALIASED_LINE_WIDTH_RANGE" }, - { GL_ALIASED_POINT_SIZE_RANGE, "GL_ALIASED_POINT_SIZE_RANGE" }, - { GL_ALPHA_BITS, "GL_ALPHA_BITS" }, - { GL_ARRAY_BUFFER_BINDING, "GL_ARRAY_BUFFER_BINDING" }, - { GL_BLUE_BITS, "GL_BLUE_BITS" }, - { GL_COMPRESSED_TEXTURE_FORMATS, "GL_COMPRESSED_TEXTURE_FORMATS" }, - { GL_CURRENT_PROGRAM, "GL_CURRENT_PROGRAM" }, - { GL_DEPTH_BITS, "GL_DEPTH_BITS" }, - { GL_DEPTH_RANGE, "GL_DEPTH_RANGE" }, - { GL_ELEMENT_ARRAY_BUFFER_BINDING, "GL_ELEMENT_ARRAY_BUFFER_BINDING" }, - { GL_FRAMEBUFFER_BINDING, "GL_FRAMEBUFFER_BINDING" }, - { GL_GENERATE_MIPMAP_HINT, "GL_GENERATE_MIPMAP_HINT" }, - { GL_GREEN_BITS, "GL_GREEN_BITS" }, - { GL_IMPLEMENTATION_COLOR_READ_FORMAT, - "GL_IMPLEMENTATION_COLOR_READ_FORMAT" }, - { GL_IMPLEMENTATION_COLOR_READ_TYPE, "GL_IMPLEMENTATION_COLOR_READ_TYPE" }, - { GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, - "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS" }, - { GL_MAX_CUBE_MAP_TEXTURE_SIZE, "GL_MAX_CUBE_MAP_TEXTURE_SIZE" }, - { GL_MAX_FRAGMENT_UNIFORM_VECTORS, "GL_MAX_FRAGMENT_UNIFORM_VECTORS" }, - { GL_MAX_RENDERBUFFER_SIZE, "GL_MAX_RENDERBUFFER_SIZE" }, - { GL_MAX_TEXTURE_IMAGE_UNITS, "GL_MAX_TEXTURE_IMAGE_UNITS" }, - { GL_MAX_TEXTURE_SIZE, "GL_MAX_TEXTURE_SIZE" }, - { GL_MAX_VARYING_VECTORS, "GL_MAX_VARYING_VECTORS" }, - { GL_MAX_VERTEX_ATTRIBS, "GL_MAX_VERTEX_ATTRIBS" }, - { GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS" }, - { GL_MAX_VERTEX_UNIFORM_VECTORS, "GL_MAX_VERTEX_UNIFORM_VECTORS" }, - { GL_MAX_VIEWPORT_DIMS, "GL_MAX_VIEWPORT_DIMS" }, - { GL_NUM_COMPRESSED_TEXTURE_FORMATS, "GL_NUM_COMPRESSED_TEXTURE_FORMATS" }, - { GL_NUM_SHADER_BINARY_FORMATS, "GL_NUM_SHADER_BINARY_FORMATS" }, - { GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT" }, - { GL_RED_BITS, "GL_RED_BITS" }, - { GL_RENDERBUFFER_BINDING, "GL_RENDERBUFFER_BINDING" }, - { GL_SAMPLE_BUFFERS, "GL_SAMPLE_BUFFERS" }, - { GL_SAMPLE_COVERAGE_INVERT, "GL_SAMPLE_COVERAGE_INVERT" }, - { GL_SAMPLE_COVERAGE_VALUE, "GL_SAMPLE_COVERAGE_VALUE" }, - { GL_SAMPLES, "GL_SAMPLES" }, - { GL_SCISSOR_BOX, "GL_SCISSOR_BOX" }, - { GL_SHADER_BINARY_FORMATS, "GL_SHADER_BINARY_FORMATS" }, - { GL_SHADER_COMPILER, "GL_SHADER_COMPILER" }, - { GL_SUBPIXEL_BITS, "GL_SUBPIXEL_BITS" }, - { GL_STENCIL_BITS, "GL_STENCIL_BITS" }, - { GL_TEXTURE_BINDING_2D, "GL_TEXTURE_BINDING_2D" }, - { GL_TEXTURE_BINDING_CUBE_MAP, "GL_TEXTURE_BINDING_CUBE_MAP" }, - { GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT" }, - { GL_UNPACK_FLIP_Y_CHROMIUM, "GL_UNPACK_FLIP_Y_CHROMIUM" }, - { GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, - "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM" }, - { GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, - "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM" }, - { GL_VERTEX_ARRAY_BINDING_OES, "GL_VERTEX_ARRAY_BINDING_OES" }, - { GL_VIEWPORT, "GL_VIEWPORT" }, - { GL_BLEND_COLOR, "GL_BLEND_COLOR" }, - { GL_BLEND_EQUATION_RGB, "GL_BLEND_EQUATION_RGB" }, - { GL_BLEND_EQUATION_ALPHA, "GL_BLEND_EQUATION_ALPHA" }, - { GL_BLEND_SRC_RGB, "GL_BLEND_SRC_RGB" }, - { GL_BLEND_DST_RGB, "GL_BLEND_DST_RGB" }, - { GL_BLEND_SRC_ALPHA, "GL_BLEND_SRC_ALPHA" }, - { GL_BLEND_DST_ALPHA, "GL_BLEND_DST_ALPHA" }, - { GL_COLOR_CLEAR_VALUE, "GL_COLOR_CLEAR_VALUE" }, - { GL_DEPTH_CLEAR_VALUE, "GL_DEPTH_CLEAR_VALUE" }, - { GL_STENCIL_CLEAR_VALUE, "GL_STENCIL_CLEAR_VALUE" }, - { GL_COLOR_WRITEMASK, "GL_COLOR_WRITEMASK" }, - { GL_CULL_FACE_MODE, "GL_CULL_FACE_MODE" }, - { GL_DEPTH_FUNC, "GL_DEPTH_FUNC" }, - { GL_DEPTH_WRITEMASK, "GL_DEPTH_WRITEMASK" }, - { GL_DEPTH_RANGE, "GL_DEPTH_RANGE" }, - { GL_FRONT_FACE, "GL_FRONT_FACE" }, - { GL_GENERATE_MIPMAP_HINT, "GL_GENERATE_MIPMAP_HINT" }, - { GL_LINE_WIDTH, "GL_LINE_WIDTH" }, - { GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT" }, - { GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT" }, - { GL_POLYGON_OFFSET_FACTOR, "GL_POLYGON_OFFSET_FACTOR" }, - { GL_POLYGON_OFFSET_UNITS, "GL_POLYGON_OFFSET_UNITS" }, - { GL_SAMPLE_COVERAGE_VALUE, "GL_SAMPLE_COVERAGE_VALUE" }, - { GL_SAMPLE_COVERAGE_INVERT, "GL_SAMPLE_COVERAGE_INVERT" }, - { GL_SCISSOR_BOX, "GL_SCISSOR_BOX" }, - { GL_STENCIL_FUNC, "GL_STENCIL_FUNC" }, - { GL_STENCIL_REF, "GL_STENCIL_REF" }, - { GL_STENCIL_VALUE_MASK, "GL_STENCIL_VALUE_MASK" }, - { GL_STENCIL_BACK_FUNC, "GL_STENCIL_BACK_FUNC" }, - { GL_STENCIL_BACK_REF, "GL_STENCIL_BACK_REF" }, - { GL_STENCIL_BACK_VALUE_MASK, "GL_STENCIL_BACK_VALUE_MASK" }, - { GL_STENCIL_WRITEMASK, "GL_STENCIL_WRITEMASK" }, - { GL_STENCIL_BACK_WRITEMASK, "GL_STENCIL_BACK_WRITEMASK" }, - { GL_STENCIL_FAIL, "GL_STENCIL_FAIL" }, - { GL_STENCIL_PASS_DEPTH_FAIL, "GL_STENCIL_PASS_DEPTH_FAIL" }, - { GL_STENCIL_PASS_DEPTH_PASS, "GL_STENCIL_PASS_DEPTH_PASS" }, - { GL_STENCIL_BACK_FAIL, "GL_STENCIL_BACK_FAIL" }, - { GL_STENCIL_BACK_PASS_DEPTH_FAIL, "GL_STENCIL_BACK_PASS_DEPTH_FAIL" }, - { GL_STENCIL_BACK_PASS_DEPTH_PASS, "GL_STENCIL_BACK_PASS_DEPTH_PASS" }, - { GL_VIEWPORT, "GL_VIEWPORT" }, - { GL_BLEND, "GL_BLEND" }, - { GL_CULL_FACE, "GL_CULL_FACE" }, - { GL_DEPTH_TEST, "GL_DEPTH_TEST" }, - { GL_DITHER, "GL_DITHER" }, - { GL_POLYGON_OFFSET_FILL, "GL_POLYGON_OFFSET_FILL" }, - { GL_SAMPLE_ALPHA_TO_COVERAGE, "GL_SAMPLE_ALPHA_TO_COVERAGE" }, - { GL_SAMPLE_COVERAGE, "GL_SAMPLE_COVERAGE" }, - { GL_SCISSOR_TEST, "GL_SCISSOR_TEST" }, - { GL_STENCIL_TEST, "GL_STENCIL_TEST" }, - }; + {GL_ACTIVE_TEXTURE, "GL_ACTIVE_TEXTURE"}, + {GL_ALIASED_LINE_WIDTH_RANGE, "GL_ALIASED_LINE_WIDTH_RANGE"}, + {GL_ALIASED_POINT_SIZE_RANGE, "GL_ALIASED_POINT_SIZE_RANGE"}, + {GL_ALPHA_BITS, "GL_ALPHA_BITS"}, + {GL_ARRAY_BUFFER_BINDING, "GL_ARRAY_BUFFER_BINDING"}, + {GL_BLUE_BITS, "GL_BLUE_BITS"}, + {GL_COMPRESSED_TEXTURE_FORMATS, "GL_COMPRESSED_TEXTURE_FORMATS"}, + {GL_CURRENT_PROGRAM, "GL_CURRENT_PROGRAM"}, + {GL_DEPTH_BITS, "GL_DEPTH_BITS"}, + {GL_DEPTH_RANGE, "GL_DEPTH_RANGE"}, + {GL_ELEMENT_ARRAY_BUFFER_BINDING, "GL_ELEMENT_ARRAY_BUFFER_BINDING"}, + {GL_FRAMEBUFFER_BINDING, "GL_FRAMEBUFFER_BINDING"}, + {GL_GENERATE_MIPMAP_HINT, "GL_GENERATE_MIPMAP_HINT"}, + {GL_GREEN_BITS, "GL_GREEN_BITS"}, + {GL_IMPLEMENTATION_COLOR_READ_FORMAT, + "GL_IMPLEMENTATION_COLOR_READ_FORMAT"}, + {GL_IMPLEMENTATION_COLOR_READ_TYPE, "GL_IMPLEMENTATION_COLOR_READ_TYPE"}, + {GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, + "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS"}, + {GL_MAX_CUBE_MAP_TEXTURE_SIZE, "GL_MAX_CUBE_MAP_TEXTURE_SIZE"}, + {GL_MAX_FRAGMENT_UNIFORM_VECTORS, "GL_MAX_FRAGMENT_UNIFORM_VECTORS"}, + {GL_MAX_RENDERBUFFER_SIZE, "GL_MAX_RENDERBUFFER_SIZE"}, + {GL_MAX_TEXTURE_IMAGE_UNITS, "GL_MAX_TEXTURE_IMAGE_UNITS"}, + {GL_MAX_TEXTURE_SIZE, "GL_MAX_TEXTURE_SIZE"}, + {GL_MAX_VARYING_VECTORS, "GL_MAX_VARYING_VECTORS"}, + {GL_MAX_VERTEX_ATTRIBS, "GL_MAX_VERTEX_ATTRIBS"}, + {GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS"}, + {GL_MAX_VERTEX_UNIFORM_VECTORS, "GL_MAX_VERTEX_UNIFORM_VECTORS"}, + {GL_MAX_VIEWPORT_DIMS, "GL_MAX_VIEWPORT_DIMS"}, + {GL_NUM_COMPRESSED_TEXTURE_FORMATS, "GL_NUM_COMPRESSED_TEXTURE_FORMATS"}, + {GL_NUM_SHADER_BINARY_FORMATS, "GL_NUM_SHADER_BINARY_FORMATS"}, + {GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT"}, + {GL_RED_BITS, "GL_RED_BITS"}, + {GL_RENDERBUFFER_BINDING, "GL_RENDERBUFFER_BINDING"}, + {GL_SAMPLE_BUFFERS, "GL_SAMPLE_BUFFERS"}, + {GL_SAMPLE_COVERAGE_INVERT, "GL_SAMPLE_COVERAGE_INVERT"}, + {GL_SAMPLE_COVERAGE_VALUE, "GL_SAMPLE_COVERAGE_VALUE"}, + {GL_SAMPLES, "GL_SAMPLES"}, + {GL_SCISSOR_BOX, "GL_SCISSOR_BOX"}, + {GL_SHADER_BINARY_FORMATS, "GL_SHADER_BINARY_FORMATS"}, + {GL_SHADER_COMPILER, "GL_SHADER_COMPILER"}, + {GL_SUBPIXEL_BITS, "GL_SUBPIXEL_BITS"}, + {GL_STENCIL_BITS, "GL_STENCIL_BITS"}, + {GL_TEXTURE_BINDING_2D, "GL_TEXTURE_BINDING_2D"}, + {GL_TEXTURE_BINDING_CUBE_MAP, "GL_TEXTURE_BINDING_CUBE_MAP"}, + {GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT"}, + {GL_UNPACK_FLIP_Y_CHROMIUM, "GL_UNPACK_FLIP_Y_CHROMIUM"}, + {GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, + "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM"}, + {GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, + "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM"}, + {GL_VERTEX_ARRAY_BINDING_OES, "GL_VERTEX_ARRAY_BINDING_OES"}, + {GL_VIEWPORT, "GL_VIEWPORT"}, + {GL_BLEND_COLOR, "GL_BLEND_COLOR"}, + {GL_BLEND_EQUATION_RGB, "GL_BLEND_EQUATION_RGB"}, + {GL_BLEND_EQUATION_ALPHA, "GL_BLEND_EQUATION_ALPHA"}, + {GL_BLEND_SRC_RGB, "GL_BLEND_SRC_RGB"}, + {GL_BLEND_DST_RGB, "GL_BLEND_DST_RGB"}, + {GL_BLEND_SRC_ALPHA, "GL_BLEND_SRC_ALPHA"}, + {GL_BLEND_DST_ALPHA, "GL_BLEND_DST_ALPHA"}, + {GL_COLOR_CLEAR_VALUE, "GL_COLOR_CLEAR_VALUE"}, + {GL_DEPTH_CLEAR_VALUE, "GL_DEPTH_CLEAR_VALUE"}, + {GL_STENCIL_CLEAR_VALUE, "GL_STENCIL_CLEAR_VALUE"}, + {GL_COLOR_WRITEMASK, "GL_COLOR_WRITEMASK"}, + {GL_CULL_FACE_MODE, "GL_CULL_FACE_MODE"}, + {GL_DEPTH_FUNC, "GL_DEPTH_FUNC"}, + {GL_DEPTH_WRITEMASK, "GL_DEPTH_WRITEMASK"}, + {GL_DEPTH_RANGE, "GL_DEPTH_RANGE"}, + {GL_FRONT_FACE, "GL_FRONT_FACE"}, + {GL_GENERATE_MIPMAP_HINT, "GL_GENERATE_MIPMAP_HINT"}, + {GL_LINE_WIDTH, "GL_LINE_WIDTH"}, + {GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT"}, + {GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT"}, + {GL_POLYGON_OFFSET_FACTOR, "GL_POLYGON_OFFSET_FACTOR"}, + {GL_POLYGON_OFFSET_UNITS, "GL_POLYGON_OFFSET_UNITS"}, + {GL_SAMPLE_COVERAGE_VALUE, "GL_SAMPLE_COVERAGE_VALUE"}, + {GL_SAMPLE_COVERAGE_INVERT, "GL_SAMPLE_COVERAGE_INVERT"}, + {GL_SCISSOR_BOX, "GL_SCISSOR_BOX"}, + {GL_STENCIL_FUNC, "GL_STENCIL_FUNC"}, + {GL_STENCIL_REF, "GL_STENCIL_REF"}, + {GL_STENCIL_VALUE_MASK, "GL_STENCIL_VALUE_MASK"}, + {GL_STENCIL_BACK_FUNC, "GL_STENCIL_BACK_FUNC"}, + {GL_STENCIL_BACK_REF, "GL_STENCIL_BACK_REF"}, + {GL_STENCIL_BACK_VALUE_MASK, "GL_STENCIL_BACK_VALUE_MASK"}, + {GL_STENCIL_WRITEMASK, "GL_STENCIL_WRITEMASK"}, + {GL_STENCIL_BACK_WRITEMASK, "GL_STENCIL_BACK_WRITEMASK"}, + {GL_STENCIL_FAIL, "GL_STENCIL_FAIL"}, + {GL_STENCIL_PASS_DEPTH_FAIL, "GL_STENCIL_PASS_DEPTH_FAIL"}, + {GL_STENCIL_PASS_DEPTH_PASS, "GL_STENCIL_PASS_DEPTH_PASS"}, + {GL_STENCIL_BACK_FAIL, "GL_STENCIL_BACK_FAIL"}, + {GL_STENCIL_BACK_PASS_DEPTH_FAIL, "GL_STENCIL_BACK_PASS_DEPTH_FAIL"}, + {GL_STENCIL_BACK_PASS_DEPTH_PASS, "GL_STENCIL_BACK_PASS_DEPTH_PASS"}, + {GL_VIEWPORT, "GL_VIEWPORT"}, + {GL_BLEND, "GL_BLEND"}, + {GL_CULL_FACE, "GL_CULL_FACE"}, + {GL_DEPTH_TEST, "GL_DEPTH_TEST"}, + {GL_DITHER, "GL_DITHER"}, + {GL_POLYGON_OFFSET_FILL, "GL_POLYGON_OFFSET_FILL"}, + {GL_SAMPLE_ALPHA_TO_COVERAGE, "GL_SAMPLE_ALPHA_TO_COVERAGE"}, + {GL_SAMPLE_COVERAGE, "GL_SAMPLE_COVERAGE"}, + {GL_SCISSOR_TEST, "GL_SCISSOR_TEST"}, + {GL_STENCIL_TEST, "GL_STENCIL_TEST"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringGetMaxIndexType(uint32 value) { static const EnumToString string_table[] = { - { GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE" }, - { GL_UNSIGNED_SHORT, "GL_UNSIGNED_SHORT" }, - { GL_UNSIGNED_INT, "GL_UNSIGNED_INT" }, - }; + {GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE"}, + {GL_UNSIGNED_SHORT, "GL_UNSIGNED_SHORT"}, + {GL_UNSIGNED_INT, "GL_UNSIGNED_INT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringGetTexParamTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_TEXTURE_2D, "GL_TEXTURE_2D" }, - { GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP" }, - }; + {GL_TEXTURE_2D, "GL_TEXTURE_2D"}, + {GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringHintMode(uint32 value) { - static const EnumToString string_table[] = { - { GL_FASTEST, "GL_FASTEST" }, - { GL_NICEST, "GL_NICEST" }, - { GL_DONT_CARE, "GL_DONT_CARE" }, - }; + static const EnumToString string_table[] = {{GL_FASTEST, "GL_FASTEST"}, + {GL_NICEST, "GL_NICEST"}, + {GL_DONT_CARE, "GL_DONT_CARE"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringHintTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_GENERATE_MIPMAP_HINT, "GL_GENERATE_MIPMAP_HINT" }, - }; + {GL_GENERATE_MIPMAP_HINT, "GL_GENERATE_MIPMAP_HINT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringIndexType(uint32 value) { static const EnumToString string_table[] = { - { GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE" }, - { GL_UNSIGNED_SHORT, "GL_UNSIGNED_SHORT" }, - }; + {GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE"}, + {GL_UNSIGNED_SHORT, "GL_UNSIGNED_SHORT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringPixelStore(uint32 value) { static const EnumToString string_table[] = { - { GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT" }, - { GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT" }, - { GL_UNPACK_FLIP_Y_CHROMIUM, "GL_UNPACK_FLIP_Y_CHROMIUM" }, - { GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, - "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM" }, - { GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, - "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM" }, - }; + {GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT"}, + {GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT"}, + {GL_UNPACK_FLIP_Y_CHROMIUM, "GL_UNPACK_FLIP_Y_CHROMIUM"}, + {GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, + "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM"}, + {GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, + "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringPixelType(uint32 value) { static const EnumToString string_table[] = { - { GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE" }, - { GL_UNSIGNED_SHORT_5_6_5, "GL_UNSIGNED_SHORT_5_6_5" }, - { GL_UNSIGNED_SHORT_4_4_4_4, "GL_UNSIGNED_SHORT_4_4_4_4" }, - { GL_UNSIGNED_SHORT_5_5_5_1, "GL_UNSIGNED_SHORT_5_5_5_1" }, - }; + {GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE"}, + {GL_UNSIGNED_SHORT_5_6_5, "GL_UNSIGNED_SHORT_5_6_5"}, + {GL_UNSIGNED_SHORT_4_4_4_4, "GL_UNSIGNED_SHORT_4_4_4_4"}, + {GL_UNSIGNED_SHORT_5_5_5_1, "GL_UNSIGNED_SHORT_5_5_5_1"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringProgramParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_DELETE_STATUS, "GL_DELETE_STATUS" }, - { GL_LINK_STATUS, "GL_LINK_STATUS" }, - { GL_VALIDATE_STATUS, "GL_VALIDATE_STATUS" }, - { GL_INFO_LOG_LENGTH, "GL_INFO_LOG_LENGTH" }, - { GL_ATTACHED_SHADERS, "GL_ATTACHED_SHADERS" }, - { GL_ACTIVE_ATTRIBUTES, "GL_ACTIVE_ATTRIBUTES" }, - { GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH" }, - { GL_ACTIVE_UNIFORMS, "GL_ACTIVE_UNIFORMS" }, - { GL_ACTIVE_UNIFORM_MAX_LENGTH, "GL_ACTIVE_UNIFORM_MAX_LENGTH" }, - }; + {GL_DELETE_STATUS, "GL_DELETE_STATUS"}, + {GL_LINK_STATUS, "GL_LINK_STATUS"}, + {GL_VALIDATE_STATUS, "GL_VALIDATE_STATUS"}, + {GL_INFO_LOG_LENGTH, "GL_INFO_LOG_LENGTH"}, + {GL_ATTACHED_SHADERS, "GL_ATTACHED_SHADERS"}, + {GL_ACTIVE_ATTRIBUTES, "GL_ACTIVE_ATTRIBUTES"}, + {GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"}, + {GL_ACTIVE_UNIFORMS, "GL_ACTIVE_UNIFORMS"}, + {GL_ACTIVE_UNIFORM_MAX_LENGTH, "GL_ACTIVE_UNIFORM_MAX_LENGTH"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringQueryObjectParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_QUERY_RESULT_EXT, "GL_QUERY_RESULT_EXT" }, - { GL_QUERY_RESULT_AVAILABLE_EXT, "GL_QUERY_RESULT_AVAILABLE_EXT" }, - }; + {GL_QUERY_RESULT_EXT, "GL_QUERY_RESULT_EXT"}, + {GL_QUERY_RESULT_AVAILABLE_EXT, "GL_QUERY_RESULT_AVAILABLE_EXT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringQueryParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_CURRENT_QUERY_EXT, "GL_CURRENT_QUERY_EXT" }, - }; + {GL_CURRENT_QUERY_EXT, "GL_CURRENT_QUERY_EXT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringQueryTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_ANY_SAMPLES_PASSED_EXT, "GL_ANY_SAMPLES_PASSED_EXT" }, - { GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, - "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT" }, - { GL_COMMANDS_ISSUED_CHROMIUM, "GL_COMMANDS_ISSUED_CHROMIUM" }, - { GL_LATENCY_QUERY_CHROMIUM, "GL_LATENCY_QUERY_CHROMIUM" }, - { GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM, - "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM" }, - { GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, - "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM" }, - }; + {GL_ANY_SAMPLES_PASSED_EXT, "GL_ANY_SAMPLES_PASSED_EXT"}, + {GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, + "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT"}, + {GL_COMMANDS_ISSUED_CHROMIUM, "GL_COMMANDS_ISSUED_CHROMIUM"}, + {GL_LATENCY_QUERY_CHROMIUM, "GL_LATENCY_QUERY_CHROMIUM"}, + {GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM, + "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM"}, + {GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, + "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringReadPixelFormat(uint32 value) { static const EnumToString string_table[] = { - { GL_ALPHA, "GL_ALPHA" }, - { GL_RGB, "GL_RGB" }, - { GL_RGBA, "GL_RGBA" }, - }; + {GL_ALPHA, "GL_ALPHA"}, {GL_RGB, "GL_RGB"}, {GL_RGBA, "GL_RGBA"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringReadPixelType(uint32 value) { static const EnumToString string_table[] = { - { GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE" }, - { GL_UNSIGNED_SHORT_5_6_5, "GL_UNSIGNED_SHORT_5_6_5" }, - { GL_UNSIGNED_SHORT_4_4_4_4, "GL_UNSIGNED_SHORT_4_4_4_4" }, - { GL_UNSIGNED_SHORT_5_5_5_1, "GL_UNSIGNED_SHORT_5_5_5_1" }, - }; + {GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE"}, + {GL_UNSIGNED_SHORT_5_6_5, "GL_UNSIGNED_SHORT_5_6_5"}, + {GL_UNSIGNED_SHORT_4_4_4_4, "GL_UNSIGNED_SHORT_4_4_4_4"}, + {GL_UNSIGNED_SHORT_5_5_5_1, "GL_UNSIGNED_SHORT_5_5_5_1"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringRenderBufferFormat(uint32 value) { static const EnumToString string_table[] = { - { GL_RGBA4, "GL_RGBA4" }, - { GL_RGB565, "GL_RGB565" }, - { GL_RGB5_A1, "GL_RGB5_A1" }, - { GL_DEPTH_COMPONENT16, "GL_DEPTH_COMPONENT16" }, - { GL_STENCIL_INDEX8, "GL_STENCIL_INDEX8" }, - }; + {GL_RGBA4, "GL_RGBA4"}, + {GL_RGB565, "GL_RGB565"}, + {GL_RGB5_A1, "GL_RGB5_A1"}, + {GL_DEPTH_COMPONENT16, "GL_DEPTH_COMPONENT16"}, + {GL_STENCIL_INDEX8, "GL_STENCIL_INDEX8"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringRenderBufferParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_RENDERBUFFER_RED_SIZE, "GL_RENDERBUFFER_RED_SIZE" }, - { GL_RENDERBUFFER_GREEN_SIZE, "GL_RENDERBUFFER_GREEN_SIZE" }, - { GL_RENDERBUFFER_BLUE_SIZE, "GL_RENDERBUFFER_BLUE_SIZE" }, - { GL_RENDERBUFFER_ALPHA_SIZE, "GL_RENDERBUFFER_ALPHA_SIZE" }, - { GL_RENDERBUFFER_DEPTH_SIZE, "GL_RENDERBUFFER_DEPTH_SIZE" }, - { GL_RENDERBUFFER_STENCIL_SIZE, "GL_RENDERBUFFER_STENCIL_SIZE" }, - { GL_RENDERBUFFER_WIDTH, "GL_RENDERBUFFER_WIDTH" }, - { GL_RENDERBUFFER_HEIGHT, "GL_RENDERBUFFER_HEIGHT" }, - { GL_RENDERBUFFER_INTERNAL_FORMAT, "GL_RENDERBUFFER_INTERNAL_FORMAT" }, - }; + {GL_RENDERBUFFER_RED_SIZE, "GL_RENDERBUFFER_RED_SIZE"}, + {GL_RENDERBUFFER_GREEN_SIZE, "GL_RENDERBUFFER_GREEN_SIZE"}, + {GL_RENDERBUFFER_BLUE_SIZE, "GL_RENDERBUFFER_BLUE_SIZE"}, + {GL_RENDERBUFFER_ALPHA_SIZE, "GL_RENDERBUFFER_ALPHA_SIZE"}, + {GL_RENDERBUFFER_DEPTH_SIZE, "GL_RENDERBUFFER_DEPTH_SIZE"}, + {GL_RENDERBUFFER_STENCIL_SIZE, "GL_RENDERBUFFER_STENCIL_SIZE"}, + {GL_RENDERBUFFER_WIDTH, "GL_RENDERBUFFER_WIDTH"}, + {GL_RENDERBUFFER_HEIGHT, "GL_RENDERBUFFER_HEIGHT"}, + {GL_RENDERBUFFER_INTERNAL_FORMAT, "GL_RENDERBUFFER_INTERNAL_FORMAT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringRenderBufferTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_RENDERBUFFER, "GL_RENDERBUFFER" }, - }; + {GL_RENDERBUFFER, "GL_RENDERBUFFER"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringResetStatus(uint32 value) { static const EnumToString string_table[] = { - { GL_GUILTY_CONTEXT_RESET_ARB, "GL_GUILTY_CONTEXT_RESET_ARB" }, - { GL_INNOCENT_CONTEXT_RESET_ARB, "GL_INNOCENT_CONTEXT_RESET_ARB" }, - { GL_UNKNOWN_CONTEXT_RESET_ARB, "GL_UNKNOWN_CONTEXT_RESET_ARB" }, - }; + {GL_GUILTY_CONTEXT_RESET_ARB, "GL_GUILTY_CONTEXT_RESET_ARB"}, + {GL_INNOCENT_CONTEXT_RESET_ARB, "GL_INNOCENT_CONTEXT_RESET_ARB"}, + {GL_UNKNOWN_CONTEXT_RESET_ARB, "GL_UNKNOWN_CONTEXT_RESET_ARB"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringShaderBinaryFormat(uint32 value) { - return GLES2Util::GetQualifiedEnumString( - NULL, 0, value); + return GLES2Util::GetQualifiedEnumString(NULL, 0, value); } std::string GLES2Util::GetStringShaderParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_SHADER_TYPE, "GL_SHADER_TYPE" }, - { GL_DELETE_STATUS, "GL_DELETE_STATUS" }, - { GL_COMPILE_STATUS, "GL_COMPILE_STATUS" }, - { GL_INFO_LOG_LENGTH, "GL_INFO_LOG_LENGTH" }, - { GL_SHADER_SOURCE_LENGTH, "GL_SHADER_SOURCE_LENGTH" }, - { GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, - "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE" }, - }; + {GL_SHADER_TYPE, "GL_SHADER_TYPE"}, + {GL_DELETE_STATUS, "GL_DELETE_STATUS"}, + {GL_COMPILE_STATUS, "GL_COMPILE_STATUS"}, + {GL_INFO_LOG_LENGTH, "GL_INFO_LOG_LENGTH"}, + {GL_SHADER_SOURCE_LENGTH, "GL_SHADER_SOURCE_LENGTH"}, + {GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, + "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringShaderPrecision(uint32 value) { static const EnumToString string_table[] = { - { GL_LOW_FLOAT, "GL_LOW_FLOAT" }, - { GL_MEDIUM_FLOAT, "GL_MEDIUM_FLOAT" }, - { GL_HIGH_FLOAT, "GL_HIGH_FLOAT" }, - { GL_LOW_INT, "GL_LOW_INT" }, - { GL_MEDIUM_INT, "GL_MEDIUM_INT" }, - { GL_HIGH_INT, "GL_HIGH_INT" }, - }; + {GL_LOW_FLOAT, "GL_LOW_FLOAT"}, + {GL_MEDIUM_FLOAT, "GL_MEDIUM_FLOAT"}, + {GL_HIGH_FLOAT, "GL_HIGH_FLOAT"}, + {GL_LOW_INT, "GL_LOW_INT"}, + {GL_MEDIUM_INT, "GL_MEDIUM_INT"}, + {GL_HIGH_INT, "GL_HIGH_INT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringShaderType(uint32 value) { static const EnumToString string_table[] = { - { GL_VERTEX_SHADER, "GL_VERTEX_SHADER" }, - { GL_FRAGMENT_SHADER, "GL_FRAGMENT_SHADER" }, - }; + {GL_VERTEX_SHADER, "GL_VERTEX_SHADER"}, + {GL_FRAGMENT_SHADER, "GL_FRAGMENT_SHADER"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringSrcBlendFactor(uint32 value) { static const EnumToString string_table[] = { - { GL_ZERO, "GL_ZERO" }, - { GL_ONE, "GL_ONE" }, - { GL_SRC_COLOR, "GL_SRC_COLOR" }, - { GL_ONE_MINUS_SRC_COLOR, "GL_ONE_MINUS_SRC_COLOR" }, - { GL_DST_COLOR, "GL_DST_COLOR" }, - { GL_ONE_MINUS_DST_COLOR, "GL_ONE_MINUS_DST_COLOR" }, - { GL_SRC_ALPHA, "GL_SRC_ALPHA" }, - { GL_ONE_MINUS_SRC_ALPHA, "GL_ONE_MINUS_SRC_ALPHA" }, - { GL_DST_ALPHA, "GL_DST_ALPHA" }, - { GL_ONE_MINUS_DST_ALPHA, "GL_ONE_MINUS_DST_ALPHA" }, - { GL_CONSTANT_COLOR, "GL_CONSTANT_COLOR" }, - { GL_ONE_MINUS_CONSTANT_COLOR, "GL_ONE_MINUS_CONSTANT_COLOR" }, - { GL_CONSTANT_ALPHA, "GL_CONSTANT_ALPHA" }, - { GL_ONE_MINUS_CONSTANT_ALPHA, "GL_ONE_MINUS_CONSTANT_ALPHA" }, - { GL_SRC_ALPHA_SATURATE, "GL_SRC_ALPHA_SATURATE" }, - }; + {GL_ZERO, "GL_ZERO"}, + {GL_ONE, "GL_ONE"}, + {GL_SRC_COLOR, "GL_SRC_COLOR"}, + {GL_ONE_MINUS_SRC_COLOR, "GL_ONE_MINUS_SRC_COLOR"}, + {GL_DST_COLOR, "GL_DST_COLOR"}, + {GL_ONE_MINUS_DST_COLOR, "GL_ONE_MINUS_DST_COLOR"}, + {GL_SRC_ALPHA, "GL_SRC_ALPHA"}, + {GL_ONE_MINUS_SRC_ALPHA, "GL_ONE_MINUS_SRC_ALPHA"}, + {GL_DST_ALPHA, "GL_DST_ALPHA"}, + {GL_ONE_MINUS_DST_ALPHA, "GL_ONE_MINUS_DST_ALPHA"}, + {GL_CONSTANT_COLOR, "GL_CONSTANT_COLOR"}, + {GL_ONE_MINUS_CONSTANT_COLOR, "GL_ONE_MINUS_CONSTANT_COLOR"}, + {GL_CONSTANT_ALPHA, "GL_CONSTANT_ALPHA"}, + {GL_ONE_MINUS_CONSTANT_ALPHA, "GL_ONE_MINUS_CONSTANT_ALPHA"}, + {GL_SRC_ALPHA_SATURATE, "GL_SRC_ALPHA_SATURATE"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringStencilOp(uint32 value) { - static const EnumToString string_table[] = { - { GL_KEEP, "GL_KEEP" }, - { GL_ZERO, "GL_ZERO" }, - { GL_REPLACE, "GL_REPLACE" }, - { GL_INCR, "GL_INCR" }, - { GL_INCR_WRAP, "GL_INCR_WRAP" }, - { GL_DECR, "GL_DECR" }, - { GL_DECR_WRAP, "GL_DECR_WRAP" }, - { GL_INVERT, "GL_INVERT" }, - }; + static const EnumToString string_table[] = {{GL_KEEP, "GL_KEEP"}, + {GL_ZERO, "GL_ZERO"}, + {GL_REPLACE, "GL_REPLACE"}, + {GL_INCR, "GL_INCR"}, + {GL_INCR_WRAP, "GL_INCR_WRAP"}, + {GL_DECR, "GL_DECR"}, + {GL_DECR_WRAP, "GL_DECR_WRAP"}, + {GL_INVERT, "GL_INVERT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringStringType(uint32 value) { static const EnumToString string_table[] = { - { GL_VENDOR, "GL_VENDOR" }, - { GL_RENDERER, "GL_RENDERER" }, - { GL_VERSION, "GL_VERSION" }, - { GL_SHADING_LANGUAGE_VERSION, "GL_SHADING_LANGUAGE_VERSION" }, - { GL_EXTENSIONS, "GL_EXTENSIONS" }, - }; + {GL_VENDOR, "GL_VENDOR"}, + {GL_RENDERER, "GL_RENDERER"}, + {GL_VERSION, "GL_VERSION"}, + {GL_SHADING_LANGUAGE_VERSION, "GL_SHADING_LANGUAGE_VERSION"}, + {GL_EXTENSIONS, "GL_EXTENSIONS"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureBindTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_TEXTURE_2D, "GL_TEXTURE_2D" }, - { GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP" }, - }; + {GL_TEXTURE_2D, "GL_TEXTURE_2D"}, + {GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureFormat(uint32 value) { static const EnumToString string_table[] = { - { GL_ALPHA, "GL_ALPHA" }, - { GL_LUMINANCE, "GL_LUMINANCE" }, - { GL_LUMINANCE_ALPHA, "GL_LUMINANCE_ALPHA" }, - { GL_RGB, "GL_RGB" }, - { GL_RGBA, "GL_RGBA" }, - }; + {GL_ALPHA, "GL_ALPHA"}, + {GL_LUMINANCE, "GL_LUMINANCE"}, + {GL_LUMINANCE_ALPHA, "GL_LUMINANCE_ALPHA"}, + {GL_RGB, "GL_RGB"}, + {GL_RGBA, "GL_RGBA"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureInternalFormat(uint32 value) { static const EnumToString string_table[] = { - { GL_ALPHA, "GL_ALPHA" }, - { GL_LUMINANCE, "GL_LUMINANCE" }, - { GL_LUMINANCE_ALPHA, "GL_LUMINANCE_ALPHA" }, - { GL_RGB, "GL_RGB" }, - { GL_RGBA, "GL_RGBA" }, - }; + {GL_ALPHA, "GL_ALPHA"}, + {GL_LUMINANCE, "GL_LUMINANCE"}, + {GL_LUMINANCE_ALPHA, "GL_LUMINANCE_ALPHA"}, + {GL_RGB, "GL_RGB"}, + {GL_RGBA, "GL_RGBA"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureInternalFormatStorage(uint32 value) { static const EnumToString string_table[] = { - { GL_RGB565, "GL_RGB565" }, - { GL_RGBA4, "GL_RGBA4" }, - { GL_RGB5_A1, "GL_RGB5_A1" }, - { GL_ALPHA8_EXT, "GL_ALPHA8_EXT" }, - { GL_LUMINANCE8_EXT, "GL_LUMINANCE8_EXT" }, - { GL_LUMINANCE8_ALPHA8_EXT, "GL_LUMINANCE8_ALPHA8_EXT" }, - { GL_RGB8_OES, "GL_RGB8_OES" }, - { GL_RGBA8_OES, "GL_RGBA8_OES" }, - }; + {GL_RGB565, "GL_RGB565"}, + {GL_RGBA4, "GL_RGBA4"}, + {GL_RGB5_A1, "GL_RGB5_A1"}, + {GL_ALPHA8_EXT, "GL_ALPHA8_EXT"}, + {GL_LUMINANCE8_EXT, "GL_LUMINANCE8_EXT"}, + {GL_LUMINANCE8_ALPHA8_EXT, "GL_LUMINANCE8_ALPHA8_EXT"}, + {GL_RGB8_OES, "GL_RGB8_OES"}, + {GL_RGBA8_OES, "GL_RGBA8_OES"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureMagFilterMode(uint32 value) { - static const EnumToString string_table[] = { - { GL_NEAREST, "GL_NEAREST" }, - { GL_LINEAR, "GL_LINEAR" }, - }; + static const EnumToString string_table[] = {{GL_NEAREST, "GL_NEAREST"}, + {GL_LINEAR, "GL_LINEAR"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureMinFilterMode(uint32 value) { static const EnumToString string_table[] = { - { GL_NEAREST, "GL_NEAREST" }, - { GL_LINEAR, "GL_LINEAR" }, - { GL_NEAREST_MIPMAP_NEAREST, "GL_NEAREST_MIPMAP_NEAREST" }, - { GL_LINEAR_MIPMAP_NEAREST, "GL_LINEAR_MIPMAP_NEAREST" }, - { GL_NEAREST_MIPMAP_LINEAR, "GL_NEAREST_MIPMAP_LINEAR" }, - { GL_LINEAR_MIPMAP_LINEAR, "GL_LINEAR_MIPMAP_LINEAR" }, - }; + {GL_NEAREST, "GL_NEAREST"}, + {GL_LINEAR, "GL_LINEAR"}, + {GL_NEAREST_MIPMAP_NEAREST, "GL_NEAREST_MIPMAP_NEAREST"}, + {GL_LINEAR_MIPMAP_NEAREST, "GL_LINEAR_MIPMAP_NEAREST"}, + {GL_NEAREST_MIPMAP_LINEAR, "GL_NEAREST_MIPMAP_LINEAR"}, + {GL_LINEAR_MIPMAP_LINEAR, "GL_LINEAR_MIPMAP_LINEAR"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureParameter(uint32 value) { static const EnumToString string_table[] = { - { GL_TEXTURE_MAG_FILTER, "GL_TEXTURE_MAG_FILTER" }, - { GL_TEXTURE_MIN_FILTER, "GL_TEXTURE_MIN_FILTER" }, - { GL_TEXTURE_POOL_CHROMIUM, "GL_TEXTURE_POOL_CHROMIUM" }, - { GL_TEXTURE_WRAP_S, "GL_TEXTURE_WRAP_S" }, - { GL_TEXTURE_WRAP_T, "GL_TEXTURE_WRAP_T" }, - }; + {GL_TEXTURE_MAG_FILTER, "GL_TEXTURE_MAG_FILTER"}, + {GL_TEXTURE_MIN_FILTER, "GL_TEXTURE_MIN_FILTER"}, + {GL_TEXTURE_POOL_CHROMIUM, "GL_TEXTURE_POOL_CHROMIUM"}, + {GL_TEXTURE_WRAP_S, "GL_TEXTURE_WRAP_S"}, + {GL_TEXTURE_WRAP_T, "GL_TEXTURE_WRAP_T"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTexturePool(uint32 value) { static const EnumToString string_table[] = { - { GL_TEXTURE_POOL_MANAGED_CHROMIUM, "GL_TEXTURE_POOL_MANAGED_CHROMIUM" }, - { GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, - "GL_TEXTURE_POOL_UNMANAGED_CHROMIUM" }, - }; + {GL_TEXTURE_POOL_MANAGED_CHROMIUM, "GL_TEXTURE_POOL_MANAGED_CHROMIUM"}, + {GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, + "GL_TEXTURE_POOL_UNMANAGED_CHROMIUM"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureTarget(uint32 value) { static const EnumToString string_table[] = { - { GL_TEXTURE_2D, "GL_TEXTURE_2D" }, - { GL_TEXTURE_CUBE_MAP_POSITIVE_X, "GL_TEXTURE_CUBE_MAP_POSITIVE_X" }, - { GL_TEXTURE_CUBE_MAP_NEGATIVE_X, "GL_TEXTURE_CUBE_MAP_NEGATIVE_X" }, - { GL_TEXTURE_CUBE_MAP_POSITIVE_Y, "GL_TEXTURE_CUBE_MAP_POSITIVE_Y" }, - { GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" }, - { GL_TEXTURE_CUBE_MAP_POSITIVE_Z, "GL_TEXTURE_CUBE_MAP_POSITIVE_Z" }, - { GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" }, - }; + {GL_TEXTURE_2D, "GL_TEXTURE_2D"}, + {GL_TEXTURE_CUBE_MAP_POSITIVE_X, "GL_TEXTURE_CUBE_MAP_POSITIVE_X"}, + {GL_TEXTURE_CUBE_MAP_NEGATIVE_X, "GL_TEXTURE_CUBE_MAP_NEGATIVE_X"}, + {GL_TEXTURE_CUBE_MAP_POSITIVE_Y, "GL_TEXTURE_CUBE_MAP_POSITIVE_Y"}, + {GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"}, + {GL_TEXTURE_CUBE_MAP_POSITIVE_Z, "GL_TEXTURE_CUBE_MAP_POSITIVE_Z"}, + {GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureUsage(uint32 value) { static const EnumToString string_table[] = { - { GL_NONE, "GL_NONE" }, - { GL_FRAMEBUFFER_ATTACHMENT_ANGLE, "GL_FRAMEBUFFER_ATTACHMENT_ANGLE" }, - }; + {GL_NONE, "GL_NONE"}, + {GL_FRAMEBUFFER_ATTACHMENT_ANGLE, "GL_FRAMEBUFFER_ATTACHMENT_ANGLE"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringTextureWrapMode(uint32 value) { static const EnumToString string_table[] = { - { GL_CLAMP_TO_EDGE, "GL_CLAMP_TO_EDGE" }, - { GL_MIRRORED_REPEAT, "GL_MIRRORED_REPEAT" }, - { GL_REPEAT, "GL_REPEAT" }, - }; + {GL_CLAMP_TO_EDGE, "GL_CLAMP_TO_EDGE"}, + {GL_MIRRORED_REPEAT, "GL_MIRRORED_REPEAT"}, + {GL_REPEAT, "GL_REPEAT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringVertexAttribType(uint32 value) { static const EnumToString string_table[] = { - { GL_BYTE, "GL_BYTE" }, - { GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE" }, - { GL_SHORT, "GL_SHORT" }, - { GL_UNSIGNED_SHORT, "GL_UNSIGNED_SHORT" }, - { GL_FLOAT, "GL_FLOAT" }, - }; + {GL_BYTE, "GL_BYTE"}, + {GL_UNSIGNED_BYTE, "GL_UNSIGNED_BYTE"}, + {GL_SHORT, "GL_SHORT"}, + {GL_UNSIGNED_SHORT, "GL_UNSIGNED_SHORT"}, + {GL_FLOAT, "GL_FLOAT"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringVertexAttribute(uint32 value) { static const EnumToString string_table[] = { - { GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED" }, - { GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, - "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING" }, - { GL_VERTEX_ATTRIB_ARRAY_ENABLED, "GL_VERTEX_ATTRIB_ARRAY_ENABLED" }, - { GL_VERTEX_ATTRIB_ARRAY_SIZE, "GL_VERTEX_ATTRIB_ARRAY_SIZE" }, - { GL_VERTEX_ATTRIB_ARRAY_STRIDE, "GL_VERTEX_ATTRIB_ARRAY_STRIDE" }, - { GL_VERTEX_ATTRIB_ARRAY_TYPE, "GL_VERTEX_ATTRIB_ARRAY_TYPE" }, - { GL_CURRENT_VERTEX_ATTRIB, "GL_CURRENT_VERTEX_ATTRIB" }, - }; + {GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"}, + {GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, + "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"}, + {GL_VERTEX_ATTRIB_ARRAY_ENABLED, "GL_VERTEX_ATTRIB_ARRAY_ENABLED"}, + {GL_VERTEX_ATTRIB_ARRAY_SIZE, "GL_VERTEX_ATTRIB_ARRAY_SIZE"}, + {GL_VERTEX_ATTRIB_ARRAY_STRIDE, "GL_VERTEX_ATTRIB_ARRAY_STRIDE"}, + {GL_VERTEX_ATTRIB_ARRAY_TYPE, "GL_VERTEX_ATTRIB_ARRAY_TYPE"}, + {GL_CURRENT_VERTEX_ATTRIB, "GL_CURRENT_VERTEX_ATTRIB"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } std::string GLES2Util::GetStringVertexPointer(uint32 value) { static const EnumToString string_table[] = { - { GL_VERTEX_ATTRIB_ARRAY_POINTER, "GL_VERTEX_ATTRIB_ARRAY_POINTER" }, - }; + {GL_VERTEX_ATTRIB_ARRAY_POINTER, "GL_VERTEX_ATTRIB_ARRAY_POINTER"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_IMPLEMENTATION_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/context_state_autogen.h b/gpu/command_buffer/service/context_state_autogen.h index 60e29e7..9999a76 100644 --- a/gpu/command_buffer/service/context_state_autogen.h +++ b/gpu/command_buffer/service/context_state_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by context_state.h @@ -82,4 +84,3 @@ GLsizei viewport_width; GLsizei viewport_height; #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/context_state_impl_autogen.h b/gpu/command_buffer/service/context_state_impl_autogen.h index debd8d4..7194808 100644 --- a/gpu/command_buffer/service/context_state_impl_autogen.h +++ b/gpu/command_buffer/service/context_state_impl_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by context_state.cc @@ -19,8 +21,7 @@ ContextState::EnableFlags::EnableFlags() sample_alpha_to_coverage(false), sample_coverage(false), scissor_test(false), - stencil_test(false) { -} + stencil_test(false) {} void ContextState::Initialize() { blend_color_red = 0.0f; @@ -88,8 +89,8 @@ void ContextState::InitCapabilities() const { EnableDisable(GL_DEPTH_TEST, enable_flags.depth_test); EnableDisable(GL_DITHER, enable_flags.dither); EnableDisable(GL_POLYGON_OFFSET_FILL, enable_flags.polygon_offset_fill); - EnableDisable( - GL_SAMPLE_ALPHA_TO_COVERAGE, enable_flags.sample_alpha_to_coverage); + EnableDisable(GL_SAMPLE_ALPHA_TO_COVERAGE, + enable_flags.sample_alpha_to_coverage); EnableDisable(GL_SAMPLE_COVERAGE, enable_flags.sample_coverage); EnableDisable(GL_SCISSOR_TEST, enable_flags.scissor_test); EnableDisable(GL_STENCIL_TEST, enable_flags.stencil_test); @@ -114,8 +115,8 @@ void ContextState::InitState() const { glFrontFace(front_face); glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); if (feature_info_->feature_flags().oes_standard_derivatives) - glHint( - GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, hint_fragment_shader_derivative); + glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, + hint_fragment_shader_derivative); glLineWidth(line_width); glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); @@ -128,12 +129,14 @@ void ContextState::InitState() const { GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); glStencilMaskSeparate(GL_FRONT, stencil_front_writemask); glStencilMaskSeparate(GL_BACK, stencil_back_writemask); - glStencilOpSeparate( - GL_FRONT, stencil_front_fail_op, stencil_front_z_fail_op, - stencil_front_z_pass_op); - glStencilOpSeparate( - GL_BACK, stencil_back_fail_op, stencil_back_z_fail_op, - stencil_back_z_pass_op); + glStencilOpSeparate(GL_FRONT, + stencil_front_fail_op, + stencil_front_z_fail_op, + stencil_front_z_pass_op); + glStencilOpSeparate(GL_BACK, + stencil_back_fail_op, + stencil_back_z_fail_op, + stencil_back_z_pass_op); glViewport(viewport_x, viewport_y, viewport_width, viewport_height); } bool ContextState::GetEnabled(GLenum cap) const { @@ -162,8 +165,9 @@ bool ContextState::GetEnabled(GLenum cap) const { } } -bool ContextState::GetStateAsGLint( - GLenum pname, GLint* params, GLsizei* num_written) const { +bool ContextState::GetStateAsGLint(GLenum pname, + GLint* params, + GLsizei* num_written) const { switch (pname) { case GL_BLEND_COLOR: *num_written = 4; @@ -486,8 +490,9 @@ bool ContextState::GetStateAsGLint( } } -bool ContextState::GetStateAsGLfloat( - GLenum pname, GLfloat* params, GLsizei* num_written) const { +bool ContextState::GetStateAsGLfloat(GLenum pname, + GLfloat* params, + GLsizei* num_written) const { switch (pname) { case GL_BLEND_COLOR: *num_written = 4; @@ -784,8 +789,7 @@ bool ContextState::GetStateAsGLfloat( case GL_SAMPLE_ALPHA_TO_COVERAGE: *num_written = 1; if (params) { - params[0] = - static_cast<GLfloat>(enable_flags.sample_alpha_to_coverage); + params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_coverage); } return true; case GL_SAMPLE_COVERAGE: @@ -811,4 +815,3 @@ bool ContextState::GetStateAsGLfloat( } } #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h index f950b12..225b651 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by gles2_cmd_decoder.cc @@ -11,14 +13,16 @@ #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ error::Error GLES2DecoderImpl::HandleActiveTexture( - uint32 immediate_data_size, const gles2::cmds::ActiveTexture& c) { + uint32 immediate_data_size, + const gles2::cmds::ActiveTexture& c) { GLenum texture = static_cast<GLenum>(c.texture); DoActiveTexture(texture); return error::kNoError; } error::Error GLES2DecoderImpl::HandleAttachShader( - uint32 immediate_data_size, const gles2::cmds::AttachShader& c) { + uint32 immediate_data_size, + const gles2::cmds::AttachShader& c) { GLuint program = c.program; GLuint shader = c.shader; DoAttachShader(program, shader); @@ -26,7 +30,8 @@ error::Error GLES2DecoderImpl::HandleAttachShader( } error::Error GLES2DecoderImpl::HandleBindBuffer( - uint32 immediate_data_size, const gles2::cmds::BindBuffer& c) { + uint32 immediate_data_size, + const gles2::cmds::BindBuffer& c) { GLenum target = static_cast<GLenum>(c.target); GLuint buffer = c.buffer; if (!validators_->buffer_target.IsValid(target)) { @@ -38,7 +43,8 @@ error::Error GLES2DecoderImpl::HandleBindBuffer( } error::Error GLES2DecoderImpl::HandleBindFramebuffer( - uint32 immediate_data_size, const gles2::cmds::BindFramebuffer& c) { + uint32 immediate_data_size, + const gles2::cmds::BindFramebuffer& c) { GLenum target = static_cast<GLenum>(c.target); GLuint framebuffer = c.framebuffer; if (!validators_->frame_buffer_target.IsValid(target)) { @@ -50,7 +56,8 @@ error::Error GLES2DecoderImpl::HandleBindFramebuffer( } error::Error GLES2DecoderImpl::HandleBindRenderbuffer( - uint32 immediate_data_size, const gles2::cmds::BindRenderbuffer& c) { + uint32 immediate_data_size, + const gles2::cmds::BindRenderbuffer& c) { GLenum target = static_cast<GLenum>(c.target); GLuint renderbuffer = c.renderbuffer; if (!validators_->render_buffer_target.IsValid(target)) { @@ -62,7 +69,8 @@ error::Error GLES2DecoderImpl::HandleBindRenderbuffer( } error::Error GLES2DecoderImpl::HandleBindTexture( - uint32 immediate_data_size, const gles2::cmds::BindTexture& c) { + uint32 immediate_data_size, + const gles2::cmds::BindTexture& c) { GLenum target = static_cast<GLenum>(c.target); GLuint texture = c.texture; if (!validators_->texture_bind_target.IsValid(target)) { @@ -74,15 +82,14 @@ error::Error GLES2DecoderImpl::HandleBindTexture( } error::Error GLES2DecoderImpl::HandleBlendColor( - uint32 immediate_data_size, const gles2::cmds::BlendColor& c) { + uint32 immediate_data_size, + const gles2::cmds::BlendColor& c) { GLclampf red = static_cast<GLclampf>(c.red); GLclampf green = static_cast<GLclampf>(c.green); GLclampf blue = static_cast<GLclampf>(c.blue); GLclampf alpha = static_cast<GLclampf>(c.alpha); - if (state_.blend_color_red != red || - state_.blend_color_green != green || - state_.blend_color_blue != blue || - state_.blend_color_alpha != alpha) { + if (state_.blend_color_red != red || state_.blend_color_green != green || + state_.blend_color_blue != blue || state_.blend_color_alpha != alpha) { state_.blend_color_red = red; state_.blend_color_green = green; state_.blend_color_blue = blue; @@ -93,7 +100,8 @@ error::Error GLES2DecoderImpl::HandleBlendColor( } error::Error GLES2DecoderImpl::HandleBlendEquation( - uint32 immediate_data_size, const gles2::cmds::BlendEquation& c) { + uint32 immediate_data_size, + const gles2::cmds::BlendEquation& c) { GLenum mode = static_cast<GLenum>(c.mode); if (!validators_->equation.IsValid(mode)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlendEquation", mode, "mode"); @@ -109,17 +117,18 @@ error::Error GLES2DecoderImpl::HandleBlendEquation( } error::Error GLES2DecoderImpl::HandleBlendEquationSeparate( - uint32 immediate_data_size, const gles2::cmds::BlendEquationSeparate& c) { + uint32 immediate_data_size, + const gles2::cmds::BlendEquationSeparate& c) { GLenum modeRGB = static_cast<GLenum>(c.modeRGB); GLenum modeAlpha = static_cast<GLenum>(c.modeAlpha); if (!validators_->equation.IsValid(modeRGB)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlendEquationSeparate", modeRGB, - "modeRGB"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glBlendEquationSeparate", modeRGB, "modeRGB"); return error::kNoError; } if (!validators_->equation.IsValid(modeAlpha)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlendEquationSeparate", modeAlpha, - "modeAlpha"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glBlendEquationSeparate", modeAlpha, "modeAlpha"); return error::kNoError; } if (state_.blend_equation_rgb != modeRGB || @@ -132,7 +141,8 @@ error::Error GLES2DecoderImpl::HandleBlendEquationSeparate( } error::Error GLES2DecoderImpl::HandleBlendFunc( - uint32 immediate_data_size, const gles2::cmds::BlendFunc& c) { + uint32 immediate_data_size, + const gles2::cmds::BlendFunc& c) { GLenum sfactor = static_cast<GLenum>(c.sfactor); GLenum dfactor = static_cast<GLenum>(c.dfactor); if (!validators_->src_blend_factor.IsValid(sfactor)) { @@ -143,8 +153,7 @@ error::Error GLES2DecoderImpl::HandleBlendFunc( LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlendFunc", dfactor, "dfactor"); return error::kNoError; } - if (state_.blend_source_rgb != sfactor || - state_.blend_dest_rgb != dfactor || + if (state_.blend_source_rgb != sfactor || state_.blend_dest_rgb != dfactor || state_.blend_source_alpha != sfactor || state_.blend_dest_alpha != dfactor) { state_.blend_source_rgb = sfactor; @@ -157,7 +166,8 @@ error::Error GLES2DecoderImpl::HandleBlendFunc( } error::Error GLES2DecoderImpl::HandleBlendFuncSeparate( - uint32 immediate_data_size, const gles2::cmds::BlendFuncSeparate& c) { + uint32 immediate_data_size, + const gles2::cmds::BlendFuncSeparate& c) { GLenum srcRGB = static_cast<GLenum>(c.srcRGB); GLenum dstRGB = static_cast<GLenum>(c.dstRGB); GLenum srcAlpha = static_cast<GLenum>(c.srcAlpha); @@ -171,17 +181,16 @@ error::Error GLES2DecoderImpl::HandleBlendFuncSeparate( return error::kNoError; } if (!validators_->src_blend_factor.IsValid(srcAlpha)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlendFuncSeparate", srcAlpha, - "srcAlpha"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glBlendFuncSeparate", srcAlpha, "srcAlpha"); return error::kNoError; } if (!validators_->dst_blend_factor.IsValid(dstAlpha)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlendFuncSeparate", dstAlpha, - "dstAlpha"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glBlendFuncSeparate", dstAlpha, "dstAlpha"); return error::kNoError; } - if (state_.blend_source_rgb != srcRGB || - state_.blend_dest_rgb != dstRGB || + if (state_.blend_source_rgb != srcRGB || state_.blend_dest_rgb != dstRGB || state_.blend_source_alpha != srcAlpha || state_.blend_dest_alpha != dstAlpha) { state_.blend_source_rgb = srcRGB; @@ -194,7 +203,8 @@ error::Error GLES2DecoderImpl::HandleBlendFuncSeparate( } error::Error GLES2DecoderImpl::HandleBufferSubData( - uint32 immediate_data_size, const gles2::cmds::BufferSubData& c) { + uint32 immediate_data_size, + const gles2::cmds::BufferSubData& c) { GLenum target = static_cast<GLenum>(c.target); GLintptr offset = static_cast<GLintptr>(c.offset); GLsizeiptr size = static_cast<GLsizeiptr>(c.size); @@ -217,7 +227,8 @@ error::Error GLES2DecoderImpl::HandleBufferSubData( } error::Error GLES2DecoderImpl::HandleCheckFramebufferStatus( - uint32 immediate_data_size, const gles2::cmds::CheckFramebufferStatus& c) { + uint32 immediate_data_size, + const gles2::cmds::CheckFramebufferStatus& c) { GLenum target = static_cast<GLenum>(c.target); typedef cmds::CheckFramebufferStatus::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -226,16 +237,16 @@ error::Error GLES2DecoderImpl::HandleCheckFramebufferStatus( return error::kOutOfBounds; } if (!validators_->frame_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glCheckFramebufferStatus", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glCheckFramebufferStatus", target, "target"); return error::kNoError; } *result_dst = DoCheckFramebufferStatus(target); return error::kNoError; } -error::Error GLES2DecoderImpl::HandleClear( - uint32 immediate_data_size, const gles2::cmds::Clear& c) { +error::Error GLES2DecoderImpl::HandleClear(uint32 immediate_data_size, + const gles2::cmds::Clear& c) { error::Error error; error = WillAccessBoundFramebufferForDraw(); if (error != error::kNoError) @@ -246,15 +257,14 @@ error::Error GLES2DecoderImpl::HandleClear( } error::Error GLES2DecoderImpl::HandleClearColor( - uint32 immediate_data_size, const gles2::cmds::ClearColor& c) { + uint32 immediate_data_size, + const gles2::cmds::ClearColor& c) { GLclampf red = static_cast<GLclampf>(c.red); GLclampf green = static_cast<GLclampf>(c.green); GLclampf blue = static_cast<GLclampf>(c.blue); GLclampf alpha = static_cast<GLclampf>(c.alpha); - if (state_.color_clear_red != red || - state_.color_clear_green != green || - state_.color_clear_blue != blue || - state_.color_clear_alpha != alpha) { + if (state_.color_clear_red != red || state_.color_clear_green != green || + state_.color_clear_blue != blue || state_.color_clear_alpha != alpha) { state_.color_clear_red = red; state_.color_clear_green = green; state_.color_clear_blue = blue; @@ -265,7 +275,8 @@ error::Error GLES2DecoderImpl::HandleClearColor( } error::Error GLES2DecoderImpl::HandleClearDepthf( - uint32 immediate_data_size, const gles2::cmds::ClearDepthf& c) { + uint32 immediate_data_size, + const gles2::cmds::ClearDepthf& c) { GLclampf depth = static_cast<GLclampf>(c.depth); if (state_.depth_clear != depth) { state_.depth_clear = depth; @@ -275,7 +286,8 @@ error::Error GLES2DecoderImpl::HandleClearDepthf( } error::Error GLES2DecoderImpl::HandleClearStencil( - uint32 immediate_data_size, const gles2::cmds::ClearStencil& c) { + uint32 immediate_data_size, + const gles2::cmds::ClearStencil& c) { GLint s = static_cast<GLint>(c.s); if (state_.stencil_clear != s) { state_.stencil_clear = s; @@ -285,15 +297,14 @@ error::Error GLES2DecoderImpl::HandleClearStencil( } error::Error GLES2DecoderImpl::HandleColorMask( - uint32 immediate_data_size, const gles2::cmds::ColorMask& c) { + uint32 immediate_data_size, + const gles2::cmds::ColorMask& c) { GLboolean red = static_cast<GLboolean>(c.red); GLboolean green = static_cast<GLboolean>(c.green); GLboolean blue = static_cast<GLboolean>(c.blue); GLboolean alpha = static_cast<GLboolean>(c.alpha); - if (state_.color_mask_red != red || - state_.color_mask_green != green || - state_.color_mask_blue != blue || - state_.color_mask_alpha != alpha) { + if (state_.color_mask_red != red || state_.color_mask_green != green || + state_.color_mask_blue != blue || state_.color_mask_alpha != alpha) { state_.color_mask_red = red; state_.color_mask_green = green; state_.color_mask_blue = blue; @@ -304,7 +315,8 @@ error::Error GLES2DecoderImpl::HandleColorMask( } error::Error GLES2DecoderImpl::HandleCompileShader( - uint32 immediate_data_size, const gles2::cmds::CompileShader& c) { + uint32 immediate_data_size, + const gles2::cmds::CompileShader& c) { GLuint shader = c.shader; DoCompileShader(shader); return error::kNoError; @@ -325,8 +337,8 @@ error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2D( const void* data = GetSharedMemoryAs<const void*>( c.data_shm_id, c.data_shm_offset, data_size); if (!validators_->texture_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glCompressedTexSubImage2D", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glCompressedTexSubImage2D", target, "target"); return error::kNoError; } if (width < 0) { @@ -340,8 +352,8 @@ error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2D( return error::kNoError; } if (!validators_->compressed_texture_format.IsValid(format)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glCompressedTexSubImage2D", format, - "format"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glCompressedTexSubImage2D", format, "format"); return error::kNoError; } if (imageSize < 0) { @@ -358,7 +370,8 @@ error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2D( } error::Error GLES2DecoderImpl::HandleCopyTexImage2D( - uint32 immediate_data_size, const gles2::cmds::CopyTexImage2D& c) { + uint32 immediate_data_size, + const gles2::cmds::CopyTexImage2D& c) { error::Error error; error = WillAccessBoundFramebufferForRead(); if (error != error::kNoError) @@ -376,8 +389,8 @@ error::Error GLES2DecoderImpl::HandleCopyTexImage2D( return error::kNoError; } if (!validators_->texture_internal_format.IsValid(internalformat)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyTexImage2D", internalformat, - "internalformat"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glCopyTexImage2D", internalformat, "internalformat"); return error::kNoError; } if (width < 0) { @@ -398,7 +411,8 @@ error::Error GLES2DecoderImpl::HandleCopyTexImage2D( } error::Error GLES2DecoderImpl::HandleCopyTexSubImage2D( - uint32 immediate_data_size, const gles2::cmds::CopyTexSubImage2D& c) { + uint32 immediate_data_size, + const gles2::cmds::CopyTexSubImage2D& c) { error::Error error; error = WillAccessBoundFramebufferForRead(); if (error != error::kNoError) @@ -428,7 +442,8 @@ error::Error GLES2DecoderImpl::HandleCopyTexSubImage2D( } error::Error GLES2DecoderImpl::HandleCreateProgram( - uint32 immediate_data_size, const gles2::cmds::CreateProgram& c) { + uint32 immediate_data_size, + const gles2::cmds::CreateProgram& c) { uint32 client_id = c.client_id; if (!CreateProgramHelper(client_id)) { return error::kInvalidArguments; @@ -437,7 +452,8 @@ error::Error GLES2DecoderImpl::HandleCreateProgram( } error::Error GLES2DecoderImpl::HandleCreateShader( - uint32 immediate_data_size, const gles2::cmds::CreateShader& c) { + uint32 immediate_data_size, + const gles2::cmds::CreateShader& c) { GLenum type = static_cast<GLenum>(c.type); if (!validators_->shader_type.IsValid(type)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glCreateShader", type, "type"); @@ -450,8 +466,8 @@ error::Error GLES2DecoderImpl::HandleCreateShader( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleCullFace( - uint32 immediate_data_size, const gles2::cmds::CullFace& c) { +error::Error GLES2DecoderImpl::HandleCullFace(uint32 immediate_data_size, + const gles2::cmds::CullFace& c) { GLenum mode = static_cast<GLenum>(c.mode); if (!validators_->face_type.IsValid(mode)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glCullFace", mode, "mode"); @@ -465,7 +481,8 @@ error::Error GLES2DecoderImpl::HandleCullFace( } error::Error GLES2DecoderImpl::HandleDeleteBuffers( - uint32 immediate_data_size, const gles2::cmds::DeleteBuffers& c) { + uint32 immediate_data_size, + const gles2::cmds::DeleteBuffers& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -481,14 +498,15 @@ error::Error GLES2DecoderImpl::HandleDeleteBuffers( } error::Error GLES2DecoderImpl::HandleDeleteBuffersImmediate( - uint32 immediate_data_size, const gles2::cmds::DeleteBuffersImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::DeleteBuffersImmediate& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - const GLuint* buffers = GetImmediateDataAs<const GLuint*>( - c, data_size, immediate_data_size); + const GLuint* buffers = + GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); if (buffers == NULL) { return error::kOutOfBounds; } @@ -497,7 +515,8 @@ error::Error GLES2DecoderImpl::HandleDeleteBuffersImmediate( } error::Error GLES2DecoderImpl::HandleDeleteFramebuffers( - uint32 immediate_data_size, const gles2::cmds::DeleteFramebuffers& c) { + uint32 immediate_data_size, + const gles2::cmds::DeleteFramebuffers& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -520,8 +539,8 @@ error::Error GLES2DecoderImpl::HandleDeleteFramebuffersImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - const GLuint* framebuffers = GetImmediateDataAs<const GLuint*>( - c, data_size, immediate_data_size); + const GLuint* framebuffers = + GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); if (framebuffers == NULL) { return error::kOutOfBounds; } @@ -530,7 +549,8 @@ error::Error GLES2DecoderImpl::HandleDeleteFramebuffersImmediate( } error::Error GLES2DecoderImpl::HandleDeleteRenderbuffers( - uint32 immediate_data_size, const gles2::cmds::DeleteRenderbuffers& c) { + uint32 immediate_data_size, + const gles2::cmds::DeleteRenderbuffers& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -553,8 +573,8 @@ error::Error GLES2DecoderImpl::HandleDeleteRenderbuffersImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - const GLuint* renderbuffers = GetImmediateDataAs<const GLuint*>( - c, data_size, immediate_data_size); + const GLuint* renderbuffers = + GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); if (renderbuffers == NULL) { return error::kOutOfBounds; } @@ -563,7 +583,8 @@ error::Error GLES2DecoderImpl::HandleDeleteRenderbuffersImmediate( } error::Error GLES2DecoderImpl::HandleDeleteTextures( - uint32 immediate_data_size, const gles2::cmds::DeleteTextures& c) { + uint32 immediate_data_size, + const gles2::cmds::DeleteTextures& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -586,8 +607,8 @@ error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - const GLuint* textures = GetImmediateDataAs<const GLuint*>( - c, data_size, immediate_data_size); + const GLuint* textures = + GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); if (textures == NULL) { return error::kOutOfBounds; } @@ -596,7 +617,8 @@ error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate( } error::Error GLES2DecoderImpl::HandleDepthFunc( - uint32 immediate_data_size, const gles2::cmds::DepthFunc& c) { + uint32 immediate_data_size, + const gles2::cmds::DepthFunc& c) { GLenum func = static_cast<GLenum>(c.func); if (!validators_->cmp_function.IsValid(func)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glDepthFunc", func, "func"); @@ -610,7 +632,8 @@ error::Error GLES2DecoderImpl::HandleDepthFunc( } error::Error GLES2DecoderImpl::HandleDepthMask( - uint32 immediate_data_size, const gles2::cmds::DepthMask& c) { + uint32 immediate_data_size, + const gles2::cmds::DepthMask& c) { GLboolean flag = static_cast<GLboolean>(c.flag); if (state_.depth_mask != flag) { state_.depth_mask = flag; @@ -620,7 +643,8 @@ error::Error GLES2DecoderImpl::HandleDepthMask( } error::Error GLES2DecoderImpl::HandleDepthRangef( - uint32 immediate_data_size, const gles2::cmds::DepthRangef& c) { + uint32 immediate_data_size, + const gles2::cmds::DepthRangef& c) { GLclampf zNear = static_cast<GLclampf>(c.zNear); GLclampf zFar = static_cast<GLclampf>(c.zFar); DoDepthRangef(zNear, zFar); @@ -628,15 +652,16 @@ error::Error GLES2DecoderImpl::HandleDepthRangef( } error::Error GLES2DecoderImpl::HandleDetachShader( - uint32 immediate_data_size, const gles2::cmds::DetachShader& c) { + uint32 immediate_data_size, + const gles2::cmds::DetachShader& c) { GLuint program = c.program; GLuint shader = c.shader; DoDetachShader(program, shader); return error::kNoError; } -error::Error GLES2DecoderImpl::HandleDisable( - uint32 immediate_data_size, const gles2::cmds::Disable& c) { +error::Error GLES2DecoderImpl::HandleDisable(uint32 immediate_data_size, + const gles2::cmds::Disable& c) { GLenum cap = static_cast<GLenum>(c.cap); if (!validators_->capability.IsValid(cap)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glDisable", cap, "cap"); @@ -654,8 +679,8 @@ error::Error GLES2DecoderImpl::HandleDisableVertexAttribArray( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleEnable( - uint32 immediate_data_size, const gles2::cmds::Enable& c) { +error::Error GLES2DecoderImpl::HandleEnable(uint32 immediate_data_size, + const gles2::cmds::Enable& c) { GLenum cap = static_cast<GLenum>(c.cap); if (!validators_->capability.IsValid(cap)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glEnable", cap, "cap"); @@ -673,8 +698,8 @@ error::Error GLES2DecoderImpl::HandleEnableVertexAttribArray( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleFinish( - uint32 immediate_data_size, const gles2::cmds::Finish& c) { +error::Error GLES2DecoderImpl::HandleFinish(uint32 immediate_data_size, + const gles2::cmds::Finish& c) { error::Error error; error = WillAccessBoundFramebufferForRead(); if (error != error::kNoError) @@ -683,8 +708,8 @@ error::Error GLES2DecoderImpl::HandleFinish( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleFlush( - uint32 immediate_data_size, const gles2::cmds::Flush& c) { +error::Error GLES2DecoderImpl::HandleFlush(uint32 immediate_data_size, + const gles2::cmds::Flush& c) { DoFlush(); return error::kNoError; } @@ -697,17 +722,19 @@ error::Error GLES2DecoderImpl::HandleFramebufferRenderbuffer( GLenum renderbuffertarget = static_cast<GLenum>(c.renderbuffertarget); GLuint renderbuffer = c.renderbuffer; if (!validators_->frame_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glFramebufferRenderbuffer", target, "target"); return error::kNoError; } if (!validators_->attachment.IsValid(attachment)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", attachment, - "attachment"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glFramebufferRenderbuffer", attachment, "attachment"); return error::kNoError; } if (!validators_->render_buffer_target.IsValid(renderbuffertarget)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", renderbuffertarget, "renderbuffertarget"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferRenderbuffer", + renderbuffertarget, + "renderbuffertarget"); // NOLINT return error::kNoError; } DoFramebufferRenderbuffer( @@ -716,25 +743,25 @@ error::Error GLES2DecoderImpl::HandleFramebufferRenderbuffer( } error::Error GLES2DecoderImpl::HandleFramebufferTexture2D( - uint32 immediate_data_size, const gles2::cmds::FramebufferTexture2D& c) { + uint32 immediate_data_size, + const gles2::cmds::FramebufferTexture2D& c) { GLenum target = static_cast<GLenum>(c.target); GLenum attachment = static_cast<GLenum>(c.attachment); GLenum textarget = static_cast<GLenum>(c.textarget); GLuint texture = c.texture; GLint level = static_cast<GLint>(c.level); if (!validators_->frame_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", target, "target"); return error::kNoError; } if (!validators_->attachment.IsValid(attachment)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", attachment, - "attachment"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glFramebufferTexture2D", attachment, "attachment"); return error::kNoError; } if (!validators_->texture_target.IsValid(textarget)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2D", textarget, - "textarget"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glFramebufferTexture2D", textarget, "textarget"); return error::kNoError; } if (!validators_->zero_only.IsValid(level)) { @@ -747,7 +774,8 @@ error::Error GLES2DecoderImpl::HandleFramebufferTexture2D( } error::Error GLES2DecoderImpl::HandleFrontFace( - uint32 immediate_data_size, const gles2::cmds::FrontFace& c) { + uint32 immediate_data_size, + const gles2::cmds::FrontFace& c) { GLenum mode = static_cast<GLenum>(c.mode); if (!validators_->face_mode.IsValid(mode)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glFrontFace", mode, "mode"); @@ -761,7 +789,8 @@ error::Error GLES2DecoderImpl::HandleFrontFace( } error::Error GLES2DecoderImpl::HandleGenBuffers( - uint32 immediate_data_size, const gles2::cmds::GenBuffers& c) { + uint32 immediate_data_size, + const gles2::cmds::GenBuffers& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -779,14 +808,15 @@ error::Error GLES2DecoderImpl::HandleGenBuffers( } error::Error GLES2DecoderImpl::HandleGenBuffersImmediate( - uint32 immediate_data_size, const gles2::cmds::GenBuffersImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::GenBuffersImmediate& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - GLuint* buffers = GetImmediateDataAs<GLuint*>( - c, data_size, immediate_data_size); + GLuint* buffers = + GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size); if (buffers == NULL) { return error::kOutOfBounds; } @@ -797,7 +827,8 @@ error::Error GLES2DecoderImpl::HandleGenBuffersImmediate( } error::Error GLES2DecoderImpl::HandleGenerateMipmap( - uint32 immediate_data_size, const gles2::cmds::GenerateMipmap& c) { + uint32 immediate_data_size, + const gles2::cmds::GenerateMipmap& c) { GLenum target = static_cast<GLenum>(c.target); if (!validators_->texture_bind_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glGenerateMipmap", target, "target"); @@ -808,7 +839,8 @@ error::Error GLES2DecoderImpl::HandleGenerateMipmap( } error::Error GLES2DecoderImpl::HandleGenFramebuffers( - uint32 immediate_data_size, const gles2::cmds::GenFramebuffers& c) { + uint32 immediate_data_size, + const gles2::cmds::GenFramebuffers& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -833,8 +865,8 @@ error::Error GLES2DecoderImpl::HandleGenFramebuffersImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - GLuint* framebuffers = GetImmediateDataAs<GLuint*>( - c, data_size, immediate_data_size); + GLuint* framebuffers = + GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size); if (framebuffers == NULL) { return error::kOutOfBounds; } @@ -845,7 +877,8 @@ error::Error GLES2DecoderImpl::HandleGenFramebuffersImmediate( } error::Error GLES2DecoderImpl::HandleGenRenderbuffers( - uint32 immediate_data_size, const gles2::cmds::GenRenderbuffers& c) { + uint32 immediate_data_size, + const gles2::cmds::GenRenderbuffers& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -870,8 +903,8 @@ error::Error GLES2DecoderImpl::HandleGenRenderbuffersImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - GLuint* renderbuffers = GetImmediateDataAs<GLuint*>( - c, data_size, immediate_data_size); + GLuint* renderbuffers = + GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size); if (renderbuffers == NULL) { return error::kOutOfBounds; } @@ -882,7 +915,8 @@ error::Error GLES2DecoderImpl::HandleGenRenderbuffersImmediate( } error::Error GLES2DecoderImpl::HandleGenTextures( - uint32 immediate_data_size, const gles2::cmds::GenTextures& c) { + uint32 immediate_data_size, + const gles2::cmds::GenTextures& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -900,14 +934,15 @@ error::Error GLES2DecoderImpl::HandleGenTextures( } error::Error GLES2DecoderImpl::HandleGenTexturesImmediate( - uint32 immediate_data_size, const gles2::cmds::GenTexturesImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::GenTexturesImmediate& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - GLuint* textures = GetImmediateDataAs<GLuint*>( - c, data_size, immediate_data_size); + GLuint* textures = + GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size); if (textures == NULL) { return error::kOutOfBounds; } @@ -918,7 +953,8 @@ error::Error GLES2DecoderImpl::HandleGenTexturesImmediate( } error::Error GLES2DecoderImpl::HandleGetBooleanv( - uint32 immediate_data_size, const gles2::cmds::GetBooleanv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetBooleanv& c) { GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetBooleanv::Result Result; GLsizei num_values = 0; @@ -949,7 +985,8 @@ error::Error GLES2DecoderImpl::HandleGetBooleanv( } error::Error GLES2DecoderImpl::HandleGetBufferParameteriv( - uint32 immediate_data_size, const gles2::cmds::GetBufferParameteriv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetBufferParameteriv& c) { GLenum target = static_cast<GLenum>(c.target); GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetBufferParameteriv::Result Result; @@ -959,8 +996,7 @@ error::Error GLES2DecoderImpl::HandleGetBufferParameteriv( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); GLint* params = result ? result->GetData() : NULL; if (!validators_->buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetBufferParameteriv", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetBufferParameteriv", target, "target"); return error::kNoError; } if (!validators_->buffer_parameter.IsValid(pname)) { @@ -978,8 +1014,8 @@ error::Error GLES2DecoderImpl::HandleGetBufferParameteriv( result->SetNumResults(num_values); return error::kNoError; } -error::Error GLES2DecoderImpl::HandleGetError( - uint32 immediate_data_size, const gles2::cmds::GetError& c) { +error::Error GLES2DecoderImpl::HandleGetError(uint32 immediate_data_size, + const gles2::cmds::GetError& c) { typedef cmds::GetError::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); @@ -991,7 +1027,8 @@ error::Error GLES2DecoderImpl::HandleGetError( } error::Error GLES2DecoderImpl::HandleGetFloatv( - uint32 immediate_data_size, const gles2::cmds::GetFloatv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetFloatv& c) { GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetFloatv::Result Result; GLsizei num_values = 0; @@ -1034,15 +1071,19 @@ error::Error GLES2DecoderImpl::HandleGetFramebufferAttachmentParameteriv( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); GLint* params = result ? result->GetData() : NULL; if (!validators_->frame_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", target, "target"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glGetFramebufferAttachmentParameteriv", target, "target"); // NOLINT return error::kNoError; } if (!validators_->attachment.IsValid(attachment)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", attachment, "attachment"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", + attachment, + "attachment"); // NOLINT return error::kNoError; } if (!validators_->frame_buffer_parameter.IsValid(pname)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetFramebufferAttachmentParameteriv", pname, "pname"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glGetFramebufferAttachmentParameteriv", pname, "pname"); // NOLINT return error::kNoError; } if (params == NULL) { @@ -1064,7 +1105,8 @@ error::Error GLES2DecoderImpl::HandleGetFramebufferAttachmentParameteriv( } error::Error GLES2DecoderImpl::HandleGetIntegerv( - uint32 immediate_data_size, const gles2::cmds::GetIntegerv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetIntegerv& c) { GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetIntegerv::Result Result; GLsizei num_values = 0; @@ -1095,7 +1137,8 @@ error::Error GLES2DecoderImpl::HandleGetIntegerv( } error::Error GLES2DecoderImpl::HandleGetProgramiv( - uint32 immediate_data_size, const gles2::cmds::GetProgramiv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetProgramiv& c) { GLuint program = c.program; GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetProgramiv::Result Result; @@ -1138,13 +1181,13 @@ error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv( c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); GLint* params = result ? result->GetData() : NULL; if (!validators_->render_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetRenderbufferParameteriv", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glGetRenderbufferParameteriv", target, "target"); return error::kNoError; } if (!validators_->render_buffer_parameter.IsValid(pname)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetRenderbufferParameteriv", pname, - "pname"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glGetRenderbufferParameteriv", pname, "pname"); return error::kNoError; } if (params == NULL) { @@ -1166,7 +1209,8 @@ error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv( } error::Error GLES2DecoderImpl::HandleGetShaderiv( - uint32 immediate_data_size, const gles2::cmds::GetShaderiv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetShaderiv& c) { GLuint shader = c.shader; GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetShaderiv::Result Result; @@ -1198,7 +1242,8 @@ error::Error GLES2DecoderImpl::HandleGetShaderiv( } error::Error GLES2DecoderImpl::HandleGetTexParameterfv( - uint32 immediate_data_size, const gles2::cmds::GetTexParameterfv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetTexParameterfv& c) { GLenum target = static_cast<GLenum>(c.target); GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetTexParameterfv::Result Result; @@ -1234,7 +1279,8 @@ error::Error GLES2DecoderImpl::HandleGetTexParameterfv( } error::Error GLES2DecoderImpl::HandleGetTexParameteriv( - uint32 immediate_data_size, const gles2::cmds::GetTexParameteriv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetTexParameteriv& c) { GLenum target = static_cast<GLenum>(c.target); GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetTexParameteriv::Result Result; @@ -1270,7 +1316,8 @@ error::Error GLES2DecoderImpl::HandleGetTexParameteriv( } error::Error GLES2DecoderImpl::HandleGetVertexAttribfv( - uint32 immediate_data_size, const gles2::cmds::GetVertexAttribfv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetVertexAttribfv& c) { GLuint index = static_cast<GLuint>(c.index); GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetVertexAttribfv::Result Result; @@ -1302,7 +1349,8 @@ error::Error GLES2DecoderImpl::HandleGetVertexAttribfv( } error::Error GLES2DecoderImpl::HandleGetVertexAttribiv( - uint32 immediate_data_size, const gles2::cmds::GetVertexAttribiv& c) { + uint32 immediate_data_size, + const gles2::cmds::GetVertexAttribiv& c) { GLuint index = static_cast<GLuint>(c.index); GLenum pname = static_cast<GLenum>(c.pname); typedef cmds::GetVertexAttribiv::Result Result; @@ -1333,8 +1381,8 @@ error::Error GLES2DecoderImpl::HandleGetVertexAttribiv( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleHint( - uint32 immediate_data_size, const gles2::cmds::Hint& c) { +error::Error GLES2DecoderImpl::HandleHint(uint32 immediate_data_size, + const gles2::cmds::Hint& c) { GLenum target = static_cast<GLenum>(c.target); GLenum mode = static_cast<GLenum>(c.mode); if (!validators_->hint_target.IsValid(target)) { @@ -1364,8 +1412,8 @@ error::Error GLES2DecoderImpl::HandleHint( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleIsBuffer( - uint32 immediate_data_size, const gles2::cmds::IsBuffer& c) { +error::Error GLES2DecoderImpl::HandleIsBuffer(uint32 immediate_data_size, + const gles2::cmds::IsBuffer& c) { GLuint buffer = c.buffer; typedef cmds::IsBuffer::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -1378,7 +1426,8 @@ error::Error GLES2DecoderImpl::HandleIsBuffer( } error::Error GLES2DecoderImpl::HandleIsEnabled( - uint32 immediate_data_size, const gles2::cmds::IsEnabled& c) { + uint32 immediate_data_size, + const gles2::cmds::IsEnabled& c) { GLenum cap = static_cast<GLenum>(c.cap); typedef cmds::IsEnabled::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -1395,7 +1444,8 @@ error::Error GLES2DecoderImpl::HandleIsEnabled( } error::Error GLES2DecoderImpl::HandleIsFramebuffer( - uint32 immediate_data_size, const gles2::cmds::IsFramebuffer& c) { + uint32 immediate_data_size, + const gles2::cmds::IsFramebuffer& c) { GLuint framebuffer = c.framebuffer; typedef cmds::IsFramebuffer::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -1408,7 +1458,8 @@ error::Error GLES2DecoderImpl::HandleIsFramebuffer( } error::Error GLES2DecoderImpl::HandleIsProgram( - uint32 immediate_data_size, const gles2::cmds::IsProgram& c) { + uint32 immediate_data_size, + const gles2::cmds::IsProgram& c) { GLuint program = c.program; typedef cmds::IsProgram::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -1421,7 +1472,8 @@ error::Error GLES2DecoderImpl::HandleIsProgram( } error::Error GLES2DecoderImpl::HandleIsRenderbuffer( - uint32 immediate_data_size, const gles2::cmds::IsRenderbuffer& c) { + uint32 immediate_data_size, + const gles2::cmds::IsRenderbuffer& c) { GLuint renderbuffer = c.renderbuffer; typedef cmds::IsRenderbuffer::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -1433,8 +1485,8 @@ error::Error GLES2DecoderImpl::HandleIsRenderbuffer( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleIsShader( - uint32 immediate_data_size, const gles2::cmds::IsShader& c) { +error::Error GLES2DecoderImpl::HandleIsShader(uint32 immediate_data_size, + const gles2::cmds::IsShader& c) { GLuint shader = c.shader; typedef cmds::IsShader::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -1447,7 +1499,8 @@ error::Error GLES2DecoderImpl::HandleIsShader( } error::Error GLES2DecoderImpl::HandleIsTexture( - uint32 immediate_data_size, const gles2::cmds::IsTexture& c) { + uint32 immediate_data_size, + const gles2::cmds::IsTexture& c) { GLuint texture = c.texture; typedef cmds::IsTexture::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -1460,7 +1513,8 @@ error::Error GLES2DecoderImpl::HandleIsTexture( } error::Error GLES2DecoderImpl::HandleLineWidth( - uint32 immediate_data_size, const gles2::cmds::LineWidth& c) { + uint32 immediate_data_size, + const gles2::cmds::LineWidth& c) { GLfloat width = static_cast<GLfloat>(c.width); if (width <= 0.0f) { LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range"); @@ -1474,14 +1528,16 @@ error::Error GLES2DecoderImpl::HandleLineWidth( } error::Error GLES2DecoderImpl::HandleLinkProgram( - uint32 immediate_data_size, const gles2::cmds::LinkProgram& c) { + uint32 immediate_data_size, + const gles2::cmds::LinkProgram& c) { GLuint program = c.program; DoLinkProgram(program); return error::kNoError; } error::Error GLES2DecoderImpl::HandlePolygonOffset( - uint32 immediate_data_size, const gles2::cmds::PolygonOffset& c) { + uint32 immediate_data_size, + const gles2::cmds::PolygonOffset& c) { GLfloat factor = static_cast<GLfloat>(c.factor); GLfloat units = static_cast<GLfloat>(c.units); if (state_.polygon_offset_factor != factor || @@ -1494,13 +1550,15 @@ error::Error GLES2DecoderImpl::HandlePolygonOffset( } error::Error GLES2DecoderImpl::HandleReleaseShaderCompiler( - uint32 immediate_data_size, const gles2::cmds::ReleaseShaderCompiler& c) { + uint32 immediate_data_size, + const gles2::cmds::ReleaseShaderCompiler& c) { DoReleaseShaderCompiler(); return error::kNoError; } error::Error GLES2DecoderImpl::HandleRenderbufferStorage( - uint32 immediate_data_size, const gles2::cmds::RenderbufferStorage& c) { + uint32 immediate_data_size, + const gles2::cmds::RenderbufferStorage& c) { GLenum target = static_cast<GLenum>(c.target); GLenum internalformat = static_cast<GLenum>(c.internalformat); GLsizei width = static_cast<GLsizei>(c.width); @@ -1510,8 +1568,8 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorage( return error::kNoError; } if (!validators_->render_buffer_format.IsValid(internalformat)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorage", internalformat, - "internalformat"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glRenderbufferStorage", internalformat, "internalformat"); return error::kNoError; } if (width < 0) { @@ -1519,8 +1577,7 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorage( return error::kNoError; } if (height < 0) { - LOCAL_SET_GL_ERROR( - GL_INVALID_VALUE, "glRenderbufferStorage", "height < 0"); + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glRenderbufferStorage", "height < 0"); return error::kNoError; } DoRenderbufferStorage(target, internalformat, width, height); @@ -1528,15 +1585,16 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorage( } error::Error GLES2DecoderImpl::HandleSampleCoverage( - uint32 immediate_data_size, const gles2::cmds::SampleCoverage& c) { + uint32 immediate_data_size, + const gles2::cmds::SampleCoverage& c) { GLclampf value = static_cast<GLclampf>(c.value); GLboolean invert = static_cast<GLboolean>(c.invert); DoSampleCoverage(value, invert); return error::kNoError; } -error::Error GLES2DecoderImpl::HandleScissor( - uint32 immediate_data_size, const gles2::cmds::Scissor& c) { +error::Error GLES2DecoderImpl::HandleScissor(uint32 immediate_data_size, + const gles2::cmds::Scissor& c) { GLint x = static_cast<GLint>(c.x); GLint y = static_cast<GLint>(c.y); GLsizei width = static_cast<GLsizei>(c.width); @@ -1549,10 +1607,8 @@ error::Error GLES2DecoderImpl::HandleScissor( LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glScissor", "height < 0"); return error::kNoError; } - if (state_.scissor_x != x || - state_.scissor_y != y || - state_.scissor_width != width || - state_.scissor_height != height) { + if (state_.scissor_x != x || state_.scissor_y != y || + state_.scissor_width != width || state_.scissor_height != height) { state_.scissor_x = x; state_.scissor_y = y; state_.scissor_width = width; @@ -1563,7 +1619,8 @@ error::Error GLES2DecoderImpl::HandleScissor( } error::Error GLES2DecoderImpl::HandleStencilFunc( - uint32 immediate_data_size, const gles2::cmds::StencilFunc& c) { + uint32 immediate_data_size, + const gles2::cmds::StencilFunc& c) { GLenum func = static_cast<GLenum>(c.func); GLint ref = static_cast<GLint>(c.ref); GLuint mask = static_cast<GLuint>(c.mask); @@ -1571,12 +1628,9 @@ error::Error GLES2DecoderImpl::HandleStencilFunc( LOCAL_SET_GL_ERROR_INVALID_ENUM("glStencilFunc", func, "func"); return error::kNoError; } - if (state_.stencil_front_func != func || - state_.stencil_front_ref != ref || - state_.stencil_front_mask != mask || - state_.stencil_back_func != func || - state_.stencil_back_ref != ref || - state_.stencil_back_mask != mask) { + if (state_.stencil_front_func != func || state_.stencil_front_ref != ref || + state_.stencil_front_mask != mask || state_.stencil_back_func != func || + state_.stencil_back_ref != ref || state_.stencil_back_mask != mask) { state_.stencil_front_func = func; state_.stencil_front_ref = ref; state_.stencil_front_mask = mask; @@ -1589,7 +1643,8 @@ error::Error GLES2DecoderImpl::HandleStencilFunc( } error::Error GLES2DecoderImpl::HandleStencilFuncSeparate( - uint32 immediate_data_size, const gles2::cmds::StencilFuncSeparate& c) { + uint32 immediate_data_size, + const gles2::cmds::StencilFuncSeparate& c) { GLenum face = static_cast<GLenum>(c.face); GLenum func = static_cast<GLenum>(c.func); GLint ref = static_cast<GLint>(c.ref); @@ -1605,13 +1660,13 @@ error::Error GLES2DecoderImpl::HandleStencilFuncSeparate( bool changed = false; if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { changed |= state_.stencil_front_func != func || - state_.stencil_front_ref != ref || - state_.stencil_front_mask != mask; + state_.stencil_front_ref != ref || + state_.stencil_front_mask != mask; } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { changed |= state_.stencil_back_func != func || - state_.stencil_back_ref != ref || - state_.stencil_back_mask != mask; + state_.stencil_back_ref != ref || + state_.stencil_back_mask != mask; } if (changed) { if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { @@ -1630,7 +1685,8 @@ error::Error GLES2DecoderImpl::HandleStencilFuncSeparate( } error::Error GLES2DecoderImpl::HandleStencilMask( - uint32 immediate_data_size, const gles2::cmds::StencilMask& c) { + uint32 immediate_data_size, + const gles2::cmds::StencilMask& c) { GLuint mask = static_cast<GLuint>(c.mask); if (state_.stencil_front_writemask != mask || state_.stencil_back_writemask != mask) { @@ -1642,7 +1698,8 @@ error::Error GLES2DecoderImpl::HandleStencilMask( } error::Error GLES2DecoderImpl::HandleStencilMaskSeparate( - uint32 immediate_data_size, const gles2::cmds::StencilMaskSeparate& c) { + uint32 immediate_data_size, + const gles2::cmds::StencilMaskSeparate& c) { GLenum face = static_cast<GLenum>(c.face); GLuint mask = static_cast<GLuint>(c.mask); if (!validators_->face_type.IsValid(face)) { @@ -1669,7 +1726,8 @@ error::Error GLES2DecoderImpl::HandleStencilMaskSeparate( } error::Error GLES2DecoderImpl::HandleStencilOp( - uint32 immediate_data_size, const gles2::cmds::StencilOp& c) { + uint32 immediate_data_size, + const gles2::cmds::StencilOp& c) { GLenum fail = static_cast<GLenum>(c.fail); GLenum zfail = static_cast<GLenum>(c.zfail); GLenum zpass = static_cast<GLenum>(c.zpass); @@ -1703,7 +1761,8 @@ error::Error GLES2DecoderImpl::HandleStencilOp( } error::Error GLES2DecoderImpl::HandleStencilOpSeparate( - uint32 immediate_data_size, const gles2::cmds::StencilOpSeparate& c) { + uint32 immediate_data_size, + const gles2::cmds::StencilOpSeparate& c) { GLenum face = static_cast<GLenum>(c.face); GLenum fail = static_cast<GLenum>(c.fail); GLenum zfail = static_cast<GLenum>(c.zfail); @@ -1727,13 +1786,13 @@ error::Error GLES2DecoderImpl::HandleStencilOpSeparate( bool changed = false; if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { changed |= state_.stencil_front_fail_op != fail || - state_.stencil_front_z_fail_op != zfail || - state_.stencil_front_z_pass_op != zpass; + state_.stencil_front_z_fail_op != zfail || + state_.stencil_front_z_pass_op != zpass; } if (face == GL_BACK || face == GL_FRONT_AND_BACK) { changed |= state_.stencil_back_fail_op != fail || - state_.stencil_back_z_fail_op != zfail || - state_.stencil_back_z_pass_op != zpass; + state_.stencil_back_z_fail_op != zfail || + state_.stencil_back_z_pass_op != zpass; } if (changed) { if (face == GL_FRONT || face == GL_FRONT_AND_BACK) { @@ -1752,7 +1811,8 @@ error::Error GLES2DecoderImpl::HandleStencilOpSeparate( } error::Error GLES2DecoderImpl::HandleTexParameterf( - uint32 immediate_data_size, const gles2::cmds::TexParameterf& c) { + uint32 immediate_data_size, + const gles2::cmds::TexParameterf& c) { GLenum target = static_cast<GLenum>(c.target); GLenum pname = static_cast<GLenum>(c.pname); GLfloat param = static_cast<GLfloat>(c.param); @@ -1769,7 +1829,8 @@ error::Error GLES2DecoderImpl::HandleTexParameterf( } error::Error GLES2DecoderImpl::HandleTexParameterfv( - uint32 immediate_data_size, const gles2::cmds::TexParameterfv& c) { + uint32 immediate_data_size, + const gles2::cmds::TexParameterfv& c) { GLenum target = static_cast<GLenum>(c.target); GLenum pname = static_cast<GLenum>(c.pname); uint32 data_size; @@ -1805,8 +1866,8 @@ error::Error GLES2DecoderImpl::HandleTexParameterfvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* params = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* params = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (!validators_->texture_bind_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameterfv", target, "target"); return error::kNoError; @@ -1823,7 +1884,8 @@ error::Error GLES2DecoderImpl::HandleTexParameterfvImmediate( } error::Error GLES2DecoderImpl::HandleTexParameteri( - uint32 immediate_data_size, const gles2::cmds::TexParameteri& c) { + uint32 immediate_data_size, + const gles2::cmds::TexParameteri& c) { GLenum target = static_cast<GLenum>(c.target); GLenum pname = static_cast<GLenum>(c.pname); GLint param = static_cast<GLint>(c.param); @@ -1840,7 +1902,8 @@ error::Error GLES2DecoderImpl::HandleTexParameteri( } error::Error GLES2DecoderImpl::HandleTexParameteriv( - uint32 immediate_data_size, const gles2::cmds::TexParameteriv& c) { + uint32 immediate_data_size, + const gles2::cmds::TexParameteriv& c) { GLenum target = static_cast<GLenum>(c.target); GLenum pname = static_cast<GLenum>(c.pname); uint32 data_size; @@ -1876,8 +1939,8 @@ error::Error GLES2DecoderImpl::HandleTexParameterivImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLint* params = GetImmediateDataAs<const GLint*>( - c, data_size, immediate_data_size); + const GLint* params = + GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size); if (!validators_->texture_bind_target.IsValid(target)) { LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameteriv", target, "target"); return error::kNoError; @@ -1894,24 +1957,26 @@ error::Error GLES2DecoderImpl::HandleTexParameterivImmediate( } error::Error GLES2DecoderImpl::HandleUniform1f( - uint32 immediate_data_size, const gles2::cmds::Uniform1f& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform1f& c) { GLint location = static_cast<GLint>(c.location); GLfloat x = static_cast<GLfloat>(c.x); - GLfloat temp[1] = { x, }; + GLfloat temp[1] = {x, }; DoUniform1fv(location, 1, &temp[0]); return error::kNoError; } error::Error GLES2DecoderImpl::HandleUniform1fv( - uint32 immediate_data_size, const gles2::cmds::Uniform1fv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform1fv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLfloat), 1, &data_size)) { return error::kOutOfBounds; } - const GLfloat* v = GetSharedMemoryAs<const GLfloat*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLfloat* v = + GetSharedMemoryAs<const GLfloat*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -1920,7 +1985,8 @@ error::Error GLES2DecoderImpl::HandleUniform1fv( } error::Error GLES2DecoderImpl::HandleUniform1fvImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform1fvImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform1fvImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -1930,8 +1996,8 @@ error::Error GLES2DecoderImpl::HandleUniform1fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* v = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* v = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -1940,7 +2006,8 @@ error::Error GLES2DecoderImpl::HandleUniform1fvImmediate( } error::Error GLES2DecoderImpl::HandleUniform1i( - uint32 immediate_data_size, const gles2::cmds::Uniform1i& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform1i& c) { GLint location = static_cast<GLint>(c.location); GLint x = static_cast<GLint>(c.x); DoUniform1i(location, x); @@ -1948,15 +2015,16 @@ error::Error GLES2DecoderImpl::HandleUniform1i( } error::Error GLES2DecoderImpl::HandleUniform1iv( - uint32 immediate_data_size, const gles2::cmds::Uniform1iv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform1iv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLint), 1, &data_size)) { return error::kOutOfBounds; } - const GLint* v = GetSharedMemoryAs<const GLint*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLint* v = + GetSharedMemoryAs<const GLint*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -1965,7 +2033,8 @@ error::Error GLES2DecoderImpl::HandleUniform1iv( } error::Error GLES2DecoderImpl::HandleUniform1ivImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform1ivImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform1ivImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -1975,8 +2044,8 @@ error::Error GLES2DecoderImpl::HandleUniform1ivImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLint* v = GetImmediateDataAs<const GLint*>( - c, data_size, immediate_data_size); + const GLint* v = + GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -1985,25 +2054,27 @@ error::Error GLES2DecoderImpl::HandleUniform1ivImmediate( } error::Error GLES2DecoderImpl::HandleUniform2f( - uint32 immediate_data_size, const gles2::cmds::Uniform2f& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform2f& c) { GLint location = static_cast<GLint>(c.location); GLfloat x = static_cast<GLfloat>(c.x); GLfloat y = static_cast<GLfloat>(c.y); - GLfloat temp[2] = { x, y, }; + GLfloat temp[2] = {x, y, }; DoUniform2fv(location, 1, &temp[0]); return error::kNoError; } error::Error GLES2DecoderImpl::HandleUniform2fv( - uint32 immediate_data_size, const gles2::cmds::Uniform2fv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform2fv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLfloat), 2, &data_size)) { return error::kOutOfBounds; } - const GLfloat* v = GetSharedMemoryAs<const GLfloat*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLfloat* v = + GetSharedMemoryAs<const GLfloat*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2012,7 +2083,8 @@ error::Error GLES2DecoderImpl::HandleUniform2fv( } error::Error GLES2DecoderImpl::HandleUniform2fvImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform2fvImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform2fvImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -2022,8 +2094,8 @@ error::Error GLES2DecoderImpl::HandleUniform2fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* v = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* v = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2032,25 +2104,27 @@ error::Error GLES2DecoderImpl::HandleUniform2fvImmediate( } error::Error GLES2DecoderImpl::HandleUniform2i( - uint32 immediate_data_size, const gles2::cmds::Uniform2i& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform2i& c) { GLint location = static_cast<GLint>(c.location); GLint x = static_cast<GLint>(c.x); GLint y = static_cast<GLint>(c.y); - GLint temp[2] = { x, y, }; + GLint temp[2] = {x, y, }; DoUniform2iv(location, 1, &temp[0]); return error::kNoError; } error::Error GLES2DecoderImpl::HandleUniform2iv( - uint32 immediate_data_size, const gles2::cmds::Uniform2iv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform2iv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLint), 2, &data_size)) { return error::kOutOfBounds; } - const GLint* v = GetSharedMemoryAs<const GLint*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLint* v = + GetSharedMemoryAs<const GLint*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2059,7 +2133,8 @@ error::Error GLES2DecoderImpl::HandleUniform2iv( } error::Error GLES2DecoderImpl::HandleUniform2ivImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform2ivImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform2ivImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -2069,8 +2144,8 @@ error::Error GLES2DecoderImpl::HandleUniform2ivImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLint* v = GetImmediateDataAs<const GLint*>( - c, data_size, immediate_data_size); + const GLint* v = + GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2079,26 +2154,28 @@ error::Error GLES2DecoderImpl::HandleUniform2ivImmediate( } error::Error GLES2DecoderImpl::HandleUniform3f( - uint32 immediate_data_size, const gles2::cmds::Uniform3f& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform3f& c) { GLint location = static_cast<GLint>(c.location); GLfloat x = static_cast<GLfloat>(c.x); GLfloat y = static_cast<GLfloat>(c.y); GLfloat z = static_cast<GLfloat>(c.z); - GLfloat temp[3] = { x, y, z, }; + GLfloat temp[3] = {x, y, z, }; DoUniform3fv(location, 1, &temp[0]); return error::kNoError; } error::Error GLES2DecoderImpl::HandleUniform3fv( - uint32 immediate_data_size, const gles2::cmds::Uniform3fv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform3fv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLfloat), 3, &data_size)) { return error::kOutOfBounds; } - const GLfloat* v = GetSharedMemoryAs<const GLfloat*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLfloat* v = + GetSharedMemoryAs<const GLfloat*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2107,7 +2184,8 @@ error::Error GLES2DecoderImpl::HandleUniform3fv( } error::Error GLES2DecoderImpl::HandleUniform3fvImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform3fvImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform3fvImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -2117,8 +2195,8 @@ error::Error GLES2DecoderImpl::HandleUniform3fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* v = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* v = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2127,26 +2205,28 @@ error::Error GLES2DecoderImpl::HandleUniform3fvImmediate( } error::Error GLES2DecoderImpl::HandleUniform3i( - uint32 immediate_data_size, const gles2::cmds::Uniform3i& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform3i& c) { GLint location = static_cast<GLint>(c.location); GLint x = static_cast<GLint>(c.x); GLint y = static_cast<GLint>(c.y); GLint z = static_cast<GLint>(c.z); - GLint temp[3] = { x, y, z, }; + GLint temp[3] = {x, y, z, }; DoUniform3iv(location, 1, &temp[0]); return error::kNoError; } error::Error GLES2DecoderImpl::HandleUniform3iv( - uint32 immediate_data_size, const gles2::cmds::Uniform3iv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform3iv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLint), 3, &data_size)) { return error::kOutOfBounds; } - const GLint* v = GetSharedMemoryAs<const GLint*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLint* v = + GetSharedMemoryAs<const GLint*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2155,7 +2235,8 @@ error::Error GLES2DecoderImpl::HandleUniform3iv( } error::Error GLES2DecoderImpl::HandleUniform3ivImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform3ivImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform3ivImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -2165,8 +2246,8 @@ error::Error GLES2DecoderImpl::HandleUniform3ivImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLint* v = GetImmediateDataAs<const GLint*>( - c, data_size, immediate_data_size); + const GLint* v = + GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2175,27 +2256,29 @@ error::Error GLES2DecoderImpl::HandleUniform3ivImmediate( } error::Error GLES2DecoderImpl::HandleUniform4f( - uint32 immediate_data_size, const gles2::cmds::Uniform4f& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform4f& c) { GLint location = static_cast<GLint>(c.location); GLfloat x = static_cast<GLfloat>(c.x); GLfloat y = static_cast<GLfloat>(c.y); GLfloat z = static_cast<GLfloat>(c.z); GLfloat w = static_cast<GLfloat>(c.w); - GLfloat temp[4] = { x, y, z, w, }; + GLfloat temp[4] = {x, y, z, w, }; DoUniform4fv(location, 1, &temp[0]); return error::kNoError; } error::Error GLES2DecoderImpl::HandleUniform4fv( - uint32 immediate_data_size, const gles2::cmds::Uniform4fv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform4fv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLfloat), 4, &data_size)) { return error::kOutOfBounds; } - const GLfloat* v = GetSharedMemoryAs<const GLfloat*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLfloat* v = + GetSharedMemoryAs<const GLfloat*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2204,7 +2287,8 @@ error::Error GLES2DecoderImpl::HandleUniform4fv( } error::Error GLES2DecoderImpl::HandleUniform4fvImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform4fvImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform4fvImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -2214,8 +2298,8 @@ error::Error GLES2DecoderImpl::HandleUniform4fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* v = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* v = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2224,27 +2308,29 @@ error::Error GLES2DecoderImpl::HandleUniform4fvImmediate( } error::Error GLES2DecoderImpl::HandleUniform4i( - uint32 immediate_data_size, const gles2::cmds::Uniform4i& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform4i& c) { GLint location = static_cast<GLint>(c.location); GLint x = static_cast<GLint>(c.x); GLint y = static_cast<GLint>(c.y); GLint z = static_cast<GLint>(c.z); GLint w = static_cast<GLint>(c.w); - GLint temp[4] = { x, y, z, w, }; + GLint temp[4] = {x, y, z, w, }; DoUniform4iv(location, 1, &temp[0]); return error::kNoError; } error::Error GLES2DecoderImpl::HandleUniform4iv( - uint32 immediate_data_size, const gles2::cmds::Uniform4iv& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform4iv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLint), 4, &data_size)) { return error::kOutOfBounds; } - const GLint* v = GetSharedMemoryAs<const GLint*>( - c.v_shm_id, c.v_shm_offset, data_size); + const GLint* v = + GetSharedMemoryAs<const GLint*>(c.v_shm_id, c.v_shm_offset, data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2253,7 +2339,8 @@ error::Error GLES2DecoderImpl::HandleUniform4iv( } error::Error GLES2DecoderImpl::HandleUniform4ivImmediate( - uint32 immediate_data_size, const gles2::cmds::Uniform4ivImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::Uniform4ivImmediate& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -2263,8 +2350,8 @@ error::Error GLES2DecoderImpl::HandleUniform4ivImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLint* v = GetImmediateDataAs<const GLint*>( - c, data_size, immediate_data_size); + const GLint* v = + GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size); if (v == NULL) { return error::kOutOfBounds; } @@ -2273,7 +2360,8 @@ error::Error GLES2DecoderImpl::HandleUniform4ivImmediate( } error::Error GLES2DecoderImpl::HandleUniformMatrix2fv( - uint32 immediate_data_size, const gles2::cmds::UniformMatrix2fv& c) { + uint32 immediate_data_size, + const gles2::cmds::UniformMatrix2fv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); GLboolean transpose = static_cast<GLboolean>(c.transpose); @@ -2308,8 +2396,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* value = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* value = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (!validators_->false_only.IsValid(transpose)) { LOCAL_SET_GL_ERROR( GL_INVALID_VALUE, "glUniformMatrix2fv", "transpose GL_INVALID_VALUE"); @@ -2323,7 +2411,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2fvImmediate( } error::Error GLES2DecoderImpl::HandleUniformMatrix3fv( - uint32 immediate_data_size, const gles2::cmds::UniformMatrix3fv& c) { + uint32 immediate_data_size, + const gles2::cmds::UniformMatrix3fv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); GLboolean transpose = static_cast<GLboolean>(c.transpose); @@ -2358,8 +2447,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* value = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* value = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (!validators_->false_only.IsValid(transpose)) { LOCAL_SET_GL_ERROR( GL_INVALID_VALUE, "glUniformMatrix3fv", "transpose GL_INVALID_VALUE"); @@ -2373,7 +2462,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3fvImmediate( } error::Error GLES2DecoderImpl::HandleUniformMatrix4fv( - uint32 immediate_data_size, const gles2::cmds::UniformMatrix4fv& c) { + uint32 immediate_data_size, + const gles2::cmds::UniformMatrix4fv& c) { GLint location = static_cast<GLint>(c.location); GLsizei count = static_cast<GLsizei>(c.count); GLboolean transpose = static_cast<GLboolean>(c.transpose); @@ -2408,8 +2498,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* value = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* value = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (!validators_->false_only.IsValid(transpose)) { LOCAL_SET_GL_ERROR( GL_INVALID_VALUE, "glUniformMatrix4fv", "transpose GL_INVALID_VALUE"); @@ -2423,21 +2513,24 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4fvImmediate( } error::Error GLES2DecoderImpl::HandleUseProgram( - uint32 immediate_data_size, const gles2::cmds::UseProgram& c) { + uint32 immediate_data_size, + const gles2::cmds::UseProgram& c) { GLuint program = c.program; DoUseProgram(program); return error::kNoError; } error::Error GLES2DecoderImpl::HandleValidateProgram( - uint32 immediate_data_size, const gles2::cmds::ValidateProgram& c) { + uint32 immediate_data_size, + const gles2::cmds::ValidateProgram& c) { GLuint program = c.program; DoValidateProgram(program); return error::kNoError; } error::Error GLES2DecoderImpl::HandleVertexAttrib1f( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib1f& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib1f& c) { GLuint indx = static_cast<GLuint>(c.indx); GLfloat x = static_cast<GLfloat>(c.x); DoVertexAttrib1f(indx, x); @@ -2445,7 +2538,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib1f( } error::Error GLES2DecoderImpl::HandleVertexAttrib1fv( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib1fv& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib1fv& c) { GLuint indx = static_cast<GLuint>(c.indx); uint32 data_size; if (!ComputeDataSize(1, sizeof(GLfloat), 1, &data_size)) { @@ -2471,8 +2565,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib1fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* values = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* values = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (values == NULL) { return error::kOutOfBounds; } @@ -2481,7 +2575,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib1fvImmediate( } error::Error GLES2DecoderImpl::HandleVertexAttrib2f( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib2f& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib2f& c) { GLuint indx = static_cast<GLuint>(c.indx); GLfloat x = static_cast<GLfloat>(c.x); GLfloat y = static_cast<GLfloat>(c.y); @@ -2490,7 +2585,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib2f( } error::Error GLES2DecoderImpl::HandleVertexAttrib2fv( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib2fv& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib2fv& c) { GLuint indx = static_cast<GLuint>(c.indx); uint32 data_size; if (!ComputeDataSize(1, sizeof(GLfloat), 2, &data_size)) { @@ -2516,8 +2612,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib2fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* values = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* values = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (values == NULL) { return error::kOutOfBounds; } @@ -2526,7 +2622,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib2fvImmediate( } error::Error GLES2DecoderImpl::HandleVertexAttrib3f( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib3f& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib3f& c) { GLuint indx = static_cast<GLuint>(c.indx); GLfloat x = static_cast<GLfloat>(c.x); GLfloat y = static_cast<GLfloat>(c.y); @@ -2536,7 +2633,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib3f( } error::Error GLES2DecoderImpl::HandleVertexAttrib3fv( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib3fv& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib3fv& c) { GLuint indx = static_cast<GLuint>(c.indx); uint32 data_size; if (!ComputeDataSize(1, sizeof(GLfloat), 3, &data_size)) { @@ -2562,8 +2660,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib3fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* values = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* values = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (values == NULL) { return error::kOutOfBounds; } @@ -2572,7 +2670,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib3fvImmediate( } error::Error GLES2DecoderImpl::HandleVertexAttrib4f( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib4f& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib4f& c) { GLuint indx = static_cast<GLuint>(c.indx); GLfloat x = static_cast<GLfloat>(c.x); GLfloat y = static_cast<GLfloat>(c.y); @@ -2583,7 +2682,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib4f( } error::Error GLES2DecoderImpl::HandleVertexAttrib4fv( - uint32 immediate_data_size, const gles2::cmds::VertexAttrib4fv& c) { + uint32 immediate_data_size, + const gles2::cmds::VertexAttrib4fv& c) { GLuint indx = static_cast<GLuint>(c.indx); uint32 data_size; if (!ComputeDataSize(1, sizeof(GLfloat), 4, &data_size)) { @@ -2609,8 +2709,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib4fvImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLfloat* values = GetImmediateDataAs<const GLfloat*>( - c, data_size, immediate_data_size); + const GLfloat* values = + GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size); if (values == NULL) { return error::kOutOfBounds; } @@ -2618,8 +2718,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib4fvImmediate( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleViewport( - uint32 immediate_data_size, const gles2::cmds::Viewport& c) { +error::Error GLES2DecoderImpl::HandleViewport(uint32 immediate_data_size, + const gles2::cmds::Viewport& c) { GLint x = static_cast<GLint>(c.x); GLint y = static_cast<GLint>(c.y); GLsizei width = static_cast<GLsizei>(c.width); @@ -2657,8 +2757,8 @@ error::Error GLES2DecoderImpl::HandleBlitFramebufferCHROMIUM( GLbitfield mask = static_cast<GLbitfield>(c.mask); GLenum filter = static_cast<GLenum>(c.filter); if (!validators_->blit_filter.IsValid(filter)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlitFramebufferCHROMIUM", filter, - "filter"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glBlitFramebufferCHROMIUM", filter, "filter"); return error::kNoError; } DoBlitFramebufferCHROMIUM( @@ -2675,26 +2775,33 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleCHROMIUM( GLsizei width = static_cast<GLsizei>(c.width); GLsizei height = static_cast<GLsizei>(c.height); if (!validators_->render_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorageMultisampleCHROMIUM", target, "target"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorageMultisampleCHROMIUM", + target, + "target"); // NOLINT return error::kNoError; } if (samples < 0) { - LOCAL_SET_GL_ERROR( - GL_INVALID_VALUE, "glRenderbufferStorageMultisampleCHROMIUM", "samples < 0"); // NOLINT + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, + "glRenderbufferStorageMultisampleCHROMIUM", + "samples < 0"); // NOLINT return error::kNoError; } if (!validators_->render_buffer_format.IsValid(internalformat)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorageMultisampleCHROMIUM", internalformat, "internalformat"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorageMultisampleCHROMIUM", + internalformat, + "internalformat"); // NOLINT return error::kNoError; } if (width < 0) { - LOCAL_SET_GL_ERROR( - GL_INVALID_VALUE, "glRenderbufferStorageMultisampleCHROMIUM", "width < 0"); // NOLINT + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, + "glRenderbufferStorageMultisampleCHROMIUM", + "width < 0"); // NOLINT return error::kNoError; } if (height < 0) { - LOCAL_SET_GL_ERROR( - GL_INVALID_VALUE, "glRenderbufferStorageMultisampleCHROMIUM", "height < 0"); // NOLINT + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, + "glRenderbufferStorageMultisampleCHROMIUM", + "height < 0"); // NOLINT return error::kNoError; } DoRenderbufferStorageMultisampleCHROMIUM( @@ -2711,7 +2818,8 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleEXT( GLsizei width = static_cast<GLsizei>(c.width); GLsizei height = static_cast<GLsizei>(c.height); if (!validators_->render_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorageMultisampleEXT", target, "target"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glRenderbufferStorageMultisampleEXT", target, "target"); // NOLINT return error::kNoError; } if (samples < 0) { @@ -2720,7 +2828,9 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleEXT( return error::kNoError; } if (!validators_->render_buffer_format.IsValid(internalformat)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorageMultisampleEXT", internalformat, "internalformat"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM("glRenderbufferStorageMultisampleEXT", + internalformat, + "internalformat"); // NOLINT return error::kNoError; } if (width < 0) { @@ -2748,25 +2858,32 @@ error::Error GLES2DecoderImpl::HandleFramebufferTexture2DMultisampleEXT( GLint level = static_cast<GLint>(c.level); GLsizei samples = static_cast<GLsizei>(c.samples); if (!validators_->frame_buffer_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT", target, "target"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glFramebufferTexture2DMultisampleEXT", target, "target"); // NOLINT return error::kNoError; } if (!validators_->attachment.IsValid(attachment)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT", attachment, "attachment"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT", + attachment, + "attachment"); // NOLINT return error::kNoError; } if (!validators_->texture_target.IsValid(textarget)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT", textarget, "textarget"); // NOLINT + LOCAL_SET_GL_ERROR_INVALID_ENUM("glFramebufferTexture2DMultisampleEXT", + textarget, + "textarget"); // NOLINT return error::kNoError; } if (!validators_->zero_only.IsValid(level)) { - LOCAL_SET_GL_ERROR( - GL_INVALID_VALUE, "glFramebufferTexture2DMultisampleEXT", "level GL_INVALID_VALUE"); // NOLINT + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, + "glFramebufferTexture2DMultisampleEXT", + "level GL_INVALID_VALUE"); // NOLINT return error::kNoError; } if (samples < 0) { - LOCAL_SET_GL_ERROR( - GL_INVALID_VALUE, "glFramebufferTexture2DMultisampleEXT", "samples < 0"); // NOLINT + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, + "glFramebufferTexture2DMultisampleEXT", + "samples < 0"); // NOLINT return error::kNoError; } DoFramebufferTexture2DMultisample( @@ -2775,7 +2892,8 @@ error::Error GLES2DecoderImpl::HandleFramebufferTexture2DMultisampleEXT( } error::Error GLES2DecoderImpl::HandleTexStorage2DEXT( - uint32 immediate_data_size, const gles2::cmds::TexStorage2DEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::TexStorage2DEXT& c) { GLenum target = static_cast<GLenum>(c.target); GLsizei levels = static_cast<GLsizei>(c.levels); GLenum internalFormat = static_cast<GLenum>(c.internalFormat); @@ -2790,8 +2908,8 @@ error::Error GLES2DecoderImpl::HandleTexStorage2DEXT( return error::kNoError; } if (!validators_->texture_internal_format_storage.IsValid(internalFormat)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexStorage2DEXT", internalFormat, - "internalFormat"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glTexStorage2DEXT", internalFormat, "internalFormat"); return error::kNoError; } if (width < 0) { @@ -2807,7 +2925,8 @@ error::Error GLES2DecoderImpl::HandleTexStorage2DEXT( } error::Error GLES2DecoderImpl::HandleGenQueriesEXT( - uint32 immediate_data_size, const gles2::cmds::GenQueriesEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::GenQueriesEXT& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -2825,14 +2944,15 @@ error::Error GLES2DecoderImpl::HandleGenQueriesEXT( } error::Error GLES2DecoderImpl::HandleGenQueriesEXTImmediate( - uint32 immediate_data_size, const gles2::cmds::GenQueriesEXTImmediate& c) { + uint32 immediate_data_size, + const gles2::cmds::GenQueriesEXTImmediate& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - GLuint* queries = GetImmediateDataAs<GLuint*>( - c, data_size, immediate_data_size); + GLuint* queries = + GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size); if (queries == NULL) { return error::kOutOfBounds; } @@ -2843,7 +2963,8 @@ error::Error GLES2DecoderImpl::HandleGenQueriesEXTImmediate( } error::Error GLES2DecoderImpl::HandleDeleteQueriesEXT( - uint32 immediate_data_size, const gles2::cmds::DeleteQueriesEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::DeleteQueriesEXT& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -2866,8 +2987,8 @@ error::Error GLES2DecoderImpl::HandleDeleteQueriesEXTImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - const GLuint* queries = GetImmediateDataAs<const GLuint*>( - c, data_size, immediate_data_size); + const GLuint* queries = + GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); if (queries == NULL) { return error::kOutOfBounds; } @@ -2876,7 +2997,8 @@ error::Error GLES2DecoderImpl::HandleDeleteQueriesEXTImmediate( } error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT( - uint32 immediate_data_size, const gles2::cmds::InsertEventMarkerEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::InsertEventMarkerEXT& c) { GLuint bucket_id = static_cast<GLuint>(c.bucket_id); Bucket* bucket = GetBucket(bucket_id); if (!bucket || bucket->size() == 0) { @@ -2891,7 +3013,8 @@ error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT( } error::Error GLES2DecoderImpl::HandlePushGroupMarkerEXT( - uint32 immediate_data_size, const gles2::cmds::PushGroupMarkerEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::PushGroupMarkerEXT& c) { GLuint bucket_id = static_cast<GLuint>(c.bucket_id); Bucket* bucket = GetBucket(bucket_id); if (!bucket || bucket->size() == 0) { @@ -2906,13 +3029,15 @@ error::Error GLES2DecoderImpl::HandlePushGroupMarkerEXT( } error::Error GLES2DecoderImpl::HandlePopGroupMarkerEXT( - uint32 immediate_data_size, const gles2::cmds::PopGroupMarkerEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::PopGroupMarkerEXT& c) { DoPopGroupMarkerEXT(); return error::kNoError; } error::Error GLES2DecoderImpl::HandleGenVertexArraysOES( - uint32 immediate_data_size, const gles2::cmds::GenVertexArraysOES& c) { + uint32 immediate_data_size, + const gles2::cmds::GenVertexArraysOES& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -2937,8 +3062,8 @@ error::Error GLES2DecoderImpl::HandleGenVertexArraysOESImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - GLuint* arrays = GetImmediateDataAs<GLuint*>( - c, data_size, immediate_data_size); + GLuint* arrays = + GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size); if (arrays == NULL) { return error::kOutOfBounds; } @@ -2949,7 +3074,8 @@ error::Error GLES2DecoderImpl::HandleGenVertexArraysOESImmediate( } error::Error GLES2DecoderImpl::HandleDeleteVertexArraysOES( - uint32 immediate_data_size, const gles2::cmds::DeleteVertexArraysOES& c) { + uint32 immediate_data_size, + const gles2::cmds::DeleteVertexArraysOES& c) { GLsizei n = static_cast<GLsizei>(c.n); uint32 data_size; if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { @@ -2972,8 +3098,8 @@ error::Error GLES2DecoderImpl::HandleDeleteVertexArraysOESImmediate( if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) { return error::kOutOfBounds; } - const GLuint* arrays = GetImmediateDataAs<const GLuint*>( - c, data_size, immediate_data_size); + const GLuint* arrays = + GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size); if (arrays == NULL) { return error::kOutOfBounds; } @@ -2982,7 +3108,8 @@ error::Error GLES2DecoderImpl::HandleDeleteVertexArraysOESImmediate( } error::Error GLES2DecoderImpl::HandleIsVertexArrayOES( - uint32 immediate_data_size, const gles2::cmds::IsVertexArrayOES& c) { + uint32 immediate_data_size, + const gles2::cmds::IsVertexArrayOES& c) { GLuint array = c.array; typedef cmds::IsVertexArrayOES::Result Result; Result* result_dst = GetSharedMemoryAs<Result*>( @@ -2995,14 +3122,16 @@ error::Error GLES2DecoderImpl::HandleIsVertexArrayOES( } error::Error GLES2DecoderImpl::HandleBindVertexArrayOES( - uint32 immediate_data_size, const gles2::cmds::BindVertexArrayOES& c) { + uint32 immediate_data_size, + const gles2::cmds::BindVertexArrayOES& c) { GLuint array = c.array; DoBindVertexArrayOES(array); return error::kNoError; } error::Error GLES2DecoderImpl::HandleSwapBuffers( - uint32 immediate_data_size, const gles2::cmds::SwapBuffers& c) { + uint32 immediate_data_size, + const gles2::cmds::SwapBuffers& c) { DoSwapBuffers(); return error::kNoError; } @@ -3026,8 +3155,8 @@ error::Error GLES2DecoderImpl::HandleGetMaxValueInBufferCHROMIUM( return error::kNoError; } if (!validators_->get_max_index_type.IsValid(type)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetMaxValueInBufferCHROMIUM", type, - "type"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glGetMaxValueInBufferCHROMIUM", type, "type"); return error::kNoError; } *result_dst = DoGetMaxValueInBufferCHROMIUM(buffer_id, count, type, offset); @@ -3043,8 +3172,8 @@ error::Error GLES2DecoderImpl::HandleTexImageIOSurface2DCHROMIUM( GLuint ioSurfaceId = static_cast<GLuint>(c.ioSurfaceId); GLuint plane = static_cast<GLuint>(c.plane); if (!validators_->texture_bind_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexImageIOSurface2DCHROMIUM", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glTexImageIOSurface2DCHROMIUM", target, "target"); return error::kNoError; } if (width < 0) { @@ -3062,7 +3191,8 @@ error::Error GLES2DecoderImpl::HandleTexImageIOSurface2DCHROMIUM( } error::Error GLES2DecoderImpl::HandleCopyTextureCHROMIUM( - uint32 immediate_data_size, const gles2::cmds::CopyTextureCHROMIUM& c) { + uint32 immediate_data_size, + const gles2::cmds::CopyTextureCHROMIUM& c) { GLenum target = static_cast<GLenum>(c.target); GLenum source_id = static_cast<GLenum>(c.source_id); GLenum dest_id = static_cast<GLenum>(c.dest_id); @@ -3070,13 +3200,14 @@ error::Error GLES2DecoderImpl::HandleCopyTextureCHROMIUM( GLint internalformat = static_cast<GLint>(c.internalformat); GLenum dest_type = static_cast<GLenum>(c.dest_type); if (!validators_->texture_internal_format.IsValid(internalformat)) { - LOCAL_SET_GL_ERROR( - GL_INVALID_VALUE, "glCopyTextureCHROMIUM", "internalformat GL_INVALID_VALUE"); // NOLINT + LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, + "glCopyTextureCHROMIUM", + "internalformat GL_INVALID_VALUE"); // NOLINT return error::kNoError; } if (!validators_->pixel_type.IsValid(dest_type)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyTextureCHROMIUM", dest_type, - "dest_type"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glCopyTextureCHROMIUM", dest_type, "dest_type"); return error::kNoError; } DoCopyTextureCHROMIUM( @@ -3085,7 +3216,8 @@ error::Error GLES2DecoderImpl::HandleCopyTextureCHROMIUM( } error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUM( - uint32 immediate_data_size, const gles2::cmds::ProduceTextureCHROMIUM& c) { + uint32 immediate_data_size, + const gles2::cmds::ProduceTextureCHROMIUM& c) { GLenum target = static_cast<GLenum>(c.target); uint32 data_size; if (!ComputeDataSize(1, sizeof(GLbyte), 64, &data_size)) { @@ -3094,8 +3226,8 @@ error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUM( const GLbyte* mailbox = GetSharedMemoryAs<const GLbyte*>( c.mailbox_shm_id, c.mailbox_shm_offset, data_size); if (!validators_->texture_bind_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glProduceTextureCHROMIUM", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glProduceTextureCHROMIUM", target, "target"); return error::kNoError; } if (mailbox == NULL) { @@ -3116,11 +3248,11 @@ error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUMImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLbyte* mailbox = GetImmediateDataAs<const GLbyte*>( - c, data_size, immediate_data_size); + const GLbyte* mailbox = + GetImmediateDataAs<const GLbyte*>(c, data_size, immediate_data_size); if (!validators_->texture_bind_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glProduceTextureCHROMIUM", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glProduceTextureCHROMIUM", target, "target"); return error::kNoError; } if (mailbox == NULL) { @@ -3131,7 +3263,8 @@ error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUMImmediate( } error::Error GLES2DecoderImpl::HandleConsumeTextureCHROMIUM( - uint32 immediate_data_size, const gles2::cmds::ConsumeTextureCHROMIUM& c) { + uint32 immediate_data_size, + const gles2::cmds::ConsumeTextureCHROMIUM& c) { GLenum target = static_cast<GLenum>(c.target); uint32 data_size; if (!ComputeDataSize(1, sizeof(GLbyte), 64, &data_size)) { @@ -3140,8 +3273,8 @@ error::Error GLES2DecoderImpl::HandleConsumeTextureCHROMIUM( const GLbyte* mailbox = GetSharedMemoryAs<const GLbyte*>( c.mailbox_shm_id, c.mailbox_shm_offset, data_size); if (!validators_->texture_bind_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glConsumeTextureCHROMIUM", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glConsumeTextureCHROMIUM", target, "target"); return error::kNoError; } if (mailbox == NULL) { @@ -3162,11 +3295,11 @@ error::Error GLES2DecoderImpl::HandleConsumeTextureCHROMIUMImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLbyte* mailbox = GetImmediateDataAs<const GLbyte*>( - c, data_size, immediate_data_size); + const GLbyte* mailbox = + GetImmediateDataAs<const GLbyte*>(c, data_size, immediate_data_size); if (!validators_->texture_bind_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glConsumeTextureCHROMIUM", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glConsumeTextureCHROMIUM", target, "target"); return error::kNoError; } if (mailbox == NULL) { @@ -3177,12 +3310,13 @@ error::Error GLES2DecoderImpl::HandleConsumeTextureCHROMIUMImmediate( } error::Error GLES2DecoderImpl::HandleBindTexImage2DCHROMIUM( - uint32 immediate_data_size, const gles2::cmds::BindTexImage2DCHROMIUM& c) { + uint32 immediate_data_size, + const gles2::cmds::BindTexImage2DCHROMIUM& c) { GLenum target = static_cast<GLenum>(c.target); GLint imageId = static_cast<GLint>(c.imageId); if (!validators_->texture_bind_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glBindTexImage2DCHROMIUM", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glBindTexImage2DCHROMIUM", target, "target"); return error::kNoError; } DoBindTexImage2DCHROMIUM(target, imageId); @@ -3195,8 +3329,8 @@ error::Error GLES2DecoderImpl::HandleReleaseTexImage2DCHROMIUM( GLenum target = static_cast<GLenum>(c.target); GLint imageId = static_cast<GLint>(c.imageId); if (!validators_->texture_bind_target.IsValid(target)) { - LOCAL_SET_GL_ERROR_INVALID_ENUM("glReleaseTexImage2DCHROMIUM", target, - "target"); + LOCAL_SET_GL_ERROR_INVALID_ENUM( + "glReleaseTexImage2DCHROMIUM", target, "target"); return error::kNoError; } DoReleaseTexImage2DCHROMIUM(target, imageId); @@ -3204,13 +3338,15 @@ error::Error GLES2DecoderImpl::HandleReleaseTexImage2DCHROMIUM( } error::Error GLES2DecoderImpl::HandleTraceEndCHROMIUM( - uint32 immediate_data_size, const gles2::cmds::TraceEndCHROMIUM& c) { + uint32 immediate_data_size, + const gles2::cmds::TraceEndCHROMIUM& c) { DoTraceEndCHROMIUM(); return error::kNoError; } error::Error GLES2DecoderImpl::HandleDiscardFramebufferEXT( - uint32 immediate_data_size, const gles2::cmds::DiscardFramebufferEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::DiscardFramebufferEXT& c) { GLenum target = static_cast<GLenum>(c.target); GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; @@ -3243,8 +3379,8 @@ error::Error GLES2DecoderImpl::HandleDiscardFramebufferEXTImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLenum* attachments = GetImmediateDataAs<const GLenum*>( - c, data_size, immediate_data_size); + const GLenum* attachments = + GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size); if (count < 0) { LOCAL_SET_GL_ERROR( GL_INVALID_VALUE, "glDiscardFramebufferEXT", "count < 0"); @@ -3258,7 +3394,8 @@ error::Error GLES2DecoderImpl::HandleDiscardFramebufferEXTImmediate( } error::Error GLES2DecoderImpl::HandleDrawBuffersEXT( - uint32 immediate_data_size, const gles2::cmds::DrawBuffersEXT& c) { + uint32 immediate_data_size, + const gles2::cmds::DrawBuffersEXT& c) { GLsizei count = static_cast<GLsizei>(c.count); uint32 data_size; if (!ComputeDataSize(count, sizeof(GLenum), 1, &data_size)) { @@ -3288,8 +3425,8 @@ error::Error GLES2DecoderImpl::HandleDrawBuffersEXTImmediate( if (data_size > immediate_data_size) { return error::kOutOfBounds; } - const GLenum* bufs = GetImmediateDataAs<const GLenum*>( - c, data_size, immediate_data_size); + const GLenum* bufs = + GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size); if (count < 0) { LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDrawBuffersEXT", "count < 0"); return error::kNoError; @@ -3301,7 +3438,6 @@ error::Error GLES2DecoderImpl::HandleDrawBuffersEXTImmediate( return error::kNoError; } - bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { switch (cap) { case GL_BLEND: @@ -3346,4 +3482,3 @@ bool GLES2DecoderImpl::SetCapabilityState(GLenum cap, bool enabled) { } } #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h index d9c66c9..6e9c7b33 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by gles2_cmd_decoder_unittest_base.cc @@ -35,50 +37,30 @@ void GLES2DecoderTestBase::SetupInitStateExpectations() { EXPECT_CALL(*gl_, ClearColor(0.0f, 0.0f, 0.0f, 0.0f)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, ClearDepth(1.0f)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL(*gl_, ClearStencil(0)) - .Times(1) - .RetiresOnSaturation(); + EXPECT_CALL(*gl_, ClearDepth(1.0f)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, ClearStencil(0)).Times(1).RetiresOnSaturation(); EXPECT_CALL(*gl_, ColorMask(true, true, true, true)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, CullFace(GL_BACK)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL(*gl_, DepthFunc(GL_LESS)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL(*gl_, DepthMask(true)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL(*gl_, DepthRange(0.0f, 1.0f)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL(*gl_, FrontFace(GL_CCW)) - .Times(1) - .RetiresOnSaturation(); + EXPECT_CALL(*gl_, CullFace(GL_BACK)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, DepthFunc(GL_LESS)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, DepthMask(true)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, DepthRange(0.0f, 1.0f)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, FrontFace(GL_CCW)).Times(1).RetiresOnSaturation(); EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_DONT_CARE)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, LineWidth(1.0f)) - .Times(1) - .RetiresOnSaturation(); + EXPECT_CALL(*gl_, LineWidth(1.0f)).Times(1).RetiresOnSaturation(); EXPECT_CALL(*gl_, PixelStorei(GL_PACK_ALIGNMENT, 4)) .Times(1) .RetiresOnSaturation(); EXPECT_CALL(*gl_, PixelStorei(GL_UNPACK_ALIGNMENT, 4)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, PolygonOffset(0.0f, 0.0f)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL(*gl_, SampleCoverage(1.0f, false)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL( - *gl_, Scissor(kViewportX, kViewportY, kViewportWidth, kViewportHeight)) + EXPECT_CALL(*gl_, PolygonOffset(0.0f, 0.0f)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, SampleCoverage(1.0f, false)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, + Scissor(kViewportX, kViewportY, kViewportWidth, kViewportHeight)) .Times(1) .RetiresOnSaturation(); EXPECT_CALL(*gl_, StencilFuncSeparate(GL_FRONT, GL_ALWAYS, 0, 0xFFFFFFFFU)) @@ -99,10 +81,9 @@ void GLES2DecoderTestBase::SetupInitStateExpectations() { EXPECT_CALL(*gl_, StencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_KEEP)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL( - *gl_, Viewport(kViewportX, kViewportY, kViewportWidth, kViewportHeight)) + EXPECT_CALL(*gl_, + Viewport(kViewportX, kViewportY, kViewportWidth, kViewportHeight)) .Times(1) .RetiresOnSaturation(); } #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_0_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h index 62e4fb9..cf58966 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by gles2_cmd_decoder_unittest_1.cc @@ -36,7 +38,7 @@ TEST_F(GLES2DecoderTest1, BindBufferValidArgs) { TEST_F(GLES2DecoderTest1, BindBufferValidArgsNewId) { EXPECT_CALL(*gl_, BindBuffer(GL_ARRAY_BUFFER, kNewServiceId)); EXPECT_CALL(*gl_, GenBuffersARB(1, _)) - .WillOnce(SetArgumentPointee<1>(kNewServiceId)); + .WillOnce(SetArgumentPointee<1>(kNewServiceId)); SpecializedSetup<cmds::BindBuffer, 0>(true); cmds::BindBuffer cmd; cmd.Init(GL_ARRAY_BUFFER, kNewClientId); @@ -66,7 +68,7 @@ TEST_F(GLES2DecoderTest1, BindFramebufferValidArgs) { TEST_F(GLES2DecoderTest1, BindFramebufferValidArgsNewId) { EXPECT_CALL(*gl_, BindFramebufferEXT(GL_FRAMEBUFFER, kNewServiceId)); EXPECT_CALL(*gl_, GenFramebuffersEXT(1, _)) - .WillOnce(SetArgumentPointee<1>(kNewServiceId)); + .WillOnce(SetArgumentPointee<1>(kNewServiceId)); SpecializedSetup<cmds::BindFramebuffer, 0>(true); cmds::BindFramebuffer cmd; cmd.Init(GL_FRAMEBUFFER, kNewClientId); @@ -94,8 +96,8 @@ TEST_F(GLES2DecoderTest1, BindFramebufferInvalidArgs0_1) { } TEST_F(GLES2DecoderTest1, BindRenderbufferValidArgs) { - EXPECT_CALL( - *gl_, BindRenderbufferEXT(GL_RENDERBUFFER, kServiceRenderbufferId)); + EXPECT_CALL(*gl_, + BindRenderbufferEXT(GL_RENDERBUFFER, kServiceRenderbufferId)); SpecializedSetup<cmds::BindRenderbuffer, 0>(true); cmds::BindRenderbuffer cmd; cmd.Init(GL_RENDERBUFFER, client_renderbuffer_id_); @@ -106,7 +108,7 @@ TEST_F(GLES2DecoderTest1, BindRenderbufferValidArgs) { TEST_F(GLES2DecoderTest1, BindRenderbufferValidArgsNewId) { EXPECT_CALL(*gl_, BindRenderbufferEXT(GL_RENDERBUFFER, kNewServiceId)); EXPECT_CALL(*gl_, GenRenderbuffersEXT(1, _)) - .WillOnce(SetArgumentPointee<1>(kNewServiceId)); + .WillOnce(SetArgumentPointee<1>(kNewServiceId)); SpecializedSetup<cmds::BindRenderbuffer, 0>(true); cmds::BindRenderbuffer cmd; cmd.Init(GL_RENDERBUFFER, kNewClientId); @@ -136,7 +138,7 @@ TEST_F(GLES2DecoderTest1, BindTextureValidArgs) { TEST_F(GLES2DecoderTest1, BindTextureValidArgsNewId) { EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, kNewServiceId)); EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgumentPointee<1>(kNewServiceId)); + .WillOnce(SetArgumentPointee<1>(kNewServiceId)); SpecializedSetup<cmds::BindTexture, 0>(true); cmds::BindTexture cmd; cmd.Init(GL_TEXTURE_2D, kNewClientId); @@ -265,7 +267,6 @@ TEST_F(GLES2DecoderTest1, BlendFuncSeparateValidArgs) { // TODO(gman): BufferSubData - TEST_F(GLES2DecoderTest1, CheckFramebufferStatusValidArgs) { EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)); SpecializedSetup<cmds::CheckFramebufferStatus, 0>(true); @@ -392,8 +393,7 @@ TEST_F(GLES2DecoderTest1, CopyTexSubImage2DInvalidArgs7_0) { } TEST_F(GLES2DecoderTest1, CreateProgramValidArgs) { - EXPECT_CALL(*gl_, CreateProgram()) - .WillOnce(Return(kNewServiceId)); + EXPECT_CALL(*gl_, CreateProgram()).WillOnce(Return(kNewServiceId)); SpecializedSetup<cmds::CreateProgram, 0>(true); cmds::CreateProgram cmd; cmd.Init(kNewClientId); @@ -432,18 +432,14 @@ TEST_F(GLES2DecoderTest1, CullFaceValidArgs) { } TEST_F(GLES2DecoderTest1, DeleteBuffersValidArgs) { - EXPECT_CALL( - *gl_, - DeleteBuffersARB(1, Pointee(kServiceBufferId))) - .Times(1); + EXPECT_CALL(*gl_, DeleteBuffersARB(1, Pointee(kServiceBufferId))).Times(1); GetSharedMemoryAs<GLuint*>()[0] = client_buffer_id_; SpecializedSetup<cmds::DeleteBuffers, 0>(true); cmds::DeleteBuffers cmd; cmd.Init(1, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetBuffer(client_buffer_id_) == NULL); + EXPECT_TRUE(GetBuffer(client_buffer_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteBuffersInvalidArgs) { @@ -455,10 +451,7 @@ TEST_F(GLES2DecoderTest1, DeleteBuffersInvalidArgs) { } TEST_F(GLES2DecoderTest1, DeleteBuffersImmediateValidArgs) { - EXPECT_CALL( - *gl_, - DeleteBuffersARB(1, Pointee(kServiceBufferId))) - .Times(1); + EXPECT_CALL(*gl_, DeleteBuffersARB(1, Pointee(kServiceBufferId))).Times(1); cmds::DeleteBuffersImmediate& cmd = *GetImmediateAs<cmds::DeleteBuffersImmediate>(); SpecializedSetup<cmds::DeleteBuffersImmediate, 0>(true); @@ -466,8 +459,7 @@ TEST_F(GLES2DecoderTest1, DeleteBuffersImmediateValidArgs) { EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_buffer_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetBuffer(client_buffer_id_) == NULL); + EXPECT_TRUE(GetBuffer(client_buffer_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteBuffersImmediateInvalidArgs) { @@ -476,14 +468,11 @@ TEST_F(GLES2DecoderTest1, DeleteBuffersImmediateInvalidArgs) { SpecializedSetup<cmds::DeleteBuffersImmediate, 0>(false); GLuint temp = kInvalidClientId; cmd.Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); } TEST_F(GLES2DecoderTest1, DeleteFramebuffersValidArgs) { - EXPECT_CALL( - *gl_, - DeleteFramebuffersEXT(1, Pointee(kServiceFramebufferId))) + EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(kServiceFramebufferId))) .Times(1); GetSharedMemoryAs<GLuint*>()[0] = client_framebuffer_id_; SpecializedSetup<cmds::DeleteFramebuffers, 0>(true); @@ -491,8 +480,7 @@ TEST_F(GLES2DecoderTest1, DeleteFramebuffersValidArgs) { cmd.Init(1, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetFramebuffer(client_framebuffer_id_) == NULL); + EXPECT_TRUE(GetFramebuffer(client_framebuffer_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteFramebuffersInvalidArgs) { @@ -504,9 +492,7 @@ TEST_F(GLES2DecoderTest1, DeleteFramebuffersInvalidArgs) { } TEST_F(GLES2DecoderTest1, DeleteFramebuffersImmediateValidArgs) { - EXPECT_CALL( - *gl_, - DeleteFramebuffersEXT(1, Pointee(kServiceFramebufferId))) + EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(kServiceFramebufferId))) .Times(1); cmds::DeleteFramebuffersImmediate& cmd = *GetImmediateAs<cmds::DeleteFramebuffersImmediate>(); @@ -515,8 +501,7 @@ TEST_F(GLES2DecoderTest1, DeleteFramebuffersImmediateValidArgs) { EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_framebuffer_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetFramebuffer(client_framebuffer_id_) == NULL); + EXPECT_TRUE(GetFramebuffer(client_framebuffer_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteFramebuffersImmediateInvalidArgs) { @@ -525,8 +510,7 @@ TEST_F(GLES2DecoderTest1, DeleteFramebuffersImmediateInvalidArgs) { SpecializedSetup<cmds::DeleteFramebuffersImmediate, 0>(false); GLuint temp = kInvalidClientId; cmd.Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); } TEST_F(GLES2DecoderTest1, DeleteProgramValidArgs) { @@ -539,9 +523,7 @@ TEST_F(GLES2DecoderTest1, DeleteProgramValidArgs) { } TEST_F(GLES2DecoderTest1, DeleteRenderbuffersValidArgs) { - EXPECT_CALL( - *gl_, - DeleteRenderbuffersEXT(1, Pointee(kServiceRenderbufferId))) + EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, Pointee(kServiceRenderbufferId))) .Times(1); GetSharedMemoryAs<GLuint*>()[0] = client_renderbuffer_id_; SpecializedSetup<cmds::DeleteRenderbuffers, 0>(true); @@ -549,8 +531,7 @@ TEST_F(GLES2DecoderTest1, DeleteRenderbuffersValidArgs) { cmd.Init(1, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetRenderbuffer(client_renderbuffer_id_) == NULL); + EXPECT_TRUE(GetRenderbuffer(client_renderbuffer_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteRenderbuffersInvalidArgs) { @@ -562,9 +543,7 @@ TEST_F(GLES2DecoderTest1, DeleteRenderbuffersInvalidArgs) { } TEST_F(GLES2DecoderTest1, DeleteRenderbuffersImmediateValidArgs) { - EXPECT_CALL( - *gl_, - DeleteRenderbuffersEXT(1, Pointee(kServiceRenderbufferId))) + EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, Pointee(kServiceRenderbufferId))) .Times(1); cmds::DeleteRenderbuffersImmediate& cmd = *GetImmediateAs<cmds::DeleteRenderbuffersImmediate>(); @@ -573,8 +552,7 @@ TEST_F(GLES2DecoderTest1, DeleteRenderbuffersImmediateValidArgs) { EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_renderbuffer_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetRenderbuffer(client_renderbuffer_id_) == NULL); + EXPECT_TRUE(GetRenderbuffer(client_renderbuffer_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteRenderbuffersImmediateInvalidArgs) { @@ -583,8 +561,7 @@ TEST_F(GLES2DecoderTest1, DeleteRenderbuffersImmediateInvalidArgs) { SpecializedSetup<cmds::DeleteRenderbuffersImmediate, 0>(false); GLuint temp = kInvalidClientId; cmd.Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); } TEST_F(GLES2DecoderTest1, DeleteShaderValidArgs) { @@ -597,18 +574,14 @@ TEST_F(GLES2DecoderTest1, DeleteShaderValidArgs) { } TEST_F(GLES2DecoderTest1, DeleteTexturesValidArgs) { - EXPECT_CALL( - *gl_, - DeleteTextures(1, Pointee(kServiceTextureId))) - .Times(1); + EXPECT_CALL(*gl_, DeleteTextures(1, Pointee(kServiceTextureId))).Times(1); GetSharedMemoryAs<GLuint*>()[0] = client_texture_id_; SpecializedSetup<cmds::DeleteTextures, 0>(true); cmds::DeleteTextures cmd; cmd.Init(1, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetTexture(client_texture_id_) == NULL); + EXPECT_TRUE(GetTexture(client_texture_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteTexturesInvalidArgs) { @@ -620,10 +593,7 @@ TEST_F(GLES2DecoderTest1, DeleteTexturesInvalidArgs) { } TEST_F(GLES2DecoderTest1, DeleteTexturesImmediateValidArgs) { - EXPECT_CALL( - *gl_, - DeleteTextures(1, Pointee(kServiceTextureId))) - .Times(1); + EXPECT_CALL(*gl_, DeleteTextures(1, Pointee(kServiceTextureId))).Times(1); cmds::DeleteTexturesImmediate& cmd = *GetImmediateAs<cmds::DeleteTexturesImmediate>(); SpecializedSetup<cmds::DeleteTexturesImmediate, 0>(true); @@ -631,8 +601,7 @@ TEST_F(GLES2DecoderTest1, DeleteTexturesImmediateValidArgs) { EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_texture_id_))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE( - GetTexture(client_texture_id_) == NULL); + EXPECT_TRUE(GetTexture(client_texture_id_) == NULL); } TEST_F(GLES2DecoderTest1, DeleteTexturesImmediateInvalidArgs) { @@ -641,8 +610,7 @@ TEST_F(GLES2DecoderTest1, DeleteTexturesImmediateInvalidArgs) { SpecializedSetup<cmds::DeleteTexturesImmediate, 0>(false); GLuint temp = kInvalidClientId; cmd.Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); } TEST_F(GLES2DecoderTest1, DepthFuncValidArgs) { @@ -719,7 +687,6 @@ TEST_F(GLES2DecoderTest1, DisableVertexAttribArrayValidArgs) { // TODO(gman): DrawElements - TEST_F(GLES2DecoderTest1, EnableValidArgs) { EXPECT_CALL(*gl_, Enable(GL_BLEND)); SpecializedSetup<cmds::Enable, 0>(true); @@ -775,15 +742,17 @@ TEST_F(GLES2DecoderTest1, FlushValidArgs) { } TEST_F(GLES2DecoderTest1, FramebufferRenderbufferValidArgs) { - EXPECT_CALL( - *gl_, FramebufferRenderbufferEXT( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, - kServiceRenderbufferId)); + EXPECT_CALL(*gl_, + FramebufferRenderbufferEXT(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, + kServiceRenderbufferId)); SpecializedSetup<cmds::FramebufferRenderbuffer, 0>(true); cmds::FramebufferRenderbuffer cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, - client_renderbuffer_id_); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, + client_renderbuffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -792,9 +761,10 @@ TEST_F(GLES2DecoderTest1, FramebufferRenderbufferInvalidArgs0_0) { EXPECT_CALL(*gl_, FramebufferRenderbufferEXT(_, _, _, _)).Times(0); SpecializedSetup<cmds::FramebufferRenderbuffer, 0>(false); cmds::FramebufferRenderbuffer cmd; - cmd.Init( - GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, - client_renderbuffer_id_); + cmd.Init(GL_DRAW_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, + client_renderbuffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -803,9 +773,10 @@ TEST_F(GLES2DecoderTest1, FramebufferRenderbufferInvalidArgs0_1) { EXPECT_CALL(*gl_, FramebufferRenderbufferEXT(_, _, _, _)).Times(0); SpecializedSetup<cmds::FramebufferRenderbuffer, 0>(false); cmds::FramebufferRenderbuffer cmd; - cmd.Init( - GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, - client_renderbuffer_id_); + cmd.Init(GL_READ_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, + client_renderbuffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -814,23 +785,28 @@ TEST_F(GLES2DecoderTest1, FramebufferRenderbufferInvalidArgs2_0) { EXPECT_CALL(*gl_, FramebufferRenderbufferEXT(_, _, _, _)).Times(0); SpecializedSetup<cmds::FramebufferRenderbuffer, 0>(false); cmds::FramebufferRenderbuffer cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER, - client_renderbuffer_id_); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER, + client_renderbuffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } TEST_F(GLES2DecoderTest1, FramebufferTexture2DValidArgs) { - EXPECT_CALL( - *gl_, FramebufferTexture2DEXT( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, - kServiceTextureId, 0)); + EXPECT_CALL(*gl_, + FramebufferTexture2DEXT(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, + kServiceTextureId, + 0)); SpecializedSetup<cmds::FramebufferTexture2D, 0>(true); cmds::FramebufferTexture2D cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, - 0); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, + client_texture_id_, + 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -839,9 +815,11 @@ TEST_F(GLES2DecoderTest1, FramebufferTexture2DInvalidArgs0_0) { EXPECT_CALL(*gl_, FramebufferTexture2DEXT(_, _, _, _, _)).Times(0); SpecializedSetup<cmds::FramebufferTexture2D, 0>(false); cmds::FramebufferTexture2D cmd; - cmd.Init( - GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, - client_texture_id_, 0); + cmd.Init(GL_DRAW_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, + client_texture_id_, + 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -850,9 +828,11 @@ TEST_F(GLES2DecoderTest1, FramebufferTexture2DInvalidArgs0_1) { EXPECT_CALL(*gl_, FramebufferTexture2DEXT(_, _, _, _, _)).Times(0); SpecializedSetup<cmds::FramebufferTexture2D, 0>(false); cmds::FramebufferTexture2D cmd; - cmd.Init( - GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, - client_texture_id_, 0); + cmd.Init(GL_READ_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, + client_texture_id_, + 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -861,9 +841,11 @@ TEST_F(GLES2DecoderTest1, FramebufferTexture2DInvalidArgs2_0) { EXPECT_CALL(*gl_, FramebufferTexture2DEXT(_, _, _, _, _)).Times(0); SpecializedSetup<cmds::FramebufferTexture2D, 0>(false); cmds::FramebufferTexture2D cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_PROXY_TEXTURE_CUBE_MAP, - client_texture_id_, 0); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_PROXY_TEXTURE_CUBE_MAP, + client_texture_id_, + 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -872,9 +854,11 @@ TEST_F(GLES2DecoderTest1, FramebufferTexture2DInvalidArgs4_0) { EXPECT_CALL(*gl_, FramebufferTexture2DEXT(_, _, _, _, _)).Times(0); SpecializedSetup<cmds::FramebufferTexture2D, 0>(false); cmds::FramebufferTexture2D cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, - 1); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, + client_texture_id_, + 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } @@ -916,8 +900,7 @@ TEST_F(GLES2DecoderTest1, GenBuffersImmediateValidArgs) { GLuint temp = kNewClientId; SpecializedSetup<cmds::GenBuffersImmediate, 0>(true); cmd->Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(*cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_TRUE(GetBuffer(kNewClientId) != NULL); } @@ -987,8 +970,7 @@ TEST_F(GLES2DecoderTest1, GenFramebuffersImmediateValidArgs) { GLuint temp = kNewClientId; SpecializedSetup<cmds::GenFramebuffersImmediate, 0>(true); cmd->Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(*cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_TRUE(GetFramebuffer(kNewClientId) != NULL); } @@ -1032,8 +1014,7 @@ TEST_F(GLES2DecoderTest1, GenRenderbuffersImmediateValidArgs) { GLuint temp = kNewClientId; SpecializedSetup<cmds::GenRenderbuffersImmediate, 0>(true); cmd->Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(*cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_TRUE(GetRenderbuffer(kNewClientId) != NULL); } @@ -1077,8 +1058,7 @@ TEST_F(GLES2DecoderTest1, GenTexturesImmediateValidArgs) { GLuint temp = kNewClientId; SpecializedSetup<cmds::GenTexturesImmediate, 0>(true); cmd->Init(1, &temp); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(*cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_TRUE(GetTexture(kNewClientId) != NULL); } @@ -1102,7 +1082,6 @@ TEST_F(GLES2DecoderTest1, GenTexturesImmediateInvalidArgs) { // TODO(gman): GetAttribLocationBucket - TEST_F(GLES2DecoderTest1, GetBooleanvValidArgs) { EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) @@ -1116,8 +1095,7 @@ TEST_F(GLES2DecoderTest1, GetBooleanvValidArgs) { cmds::GetBooleanv cmd; cmd.Init(GL_ACTIVE_TEXTURE, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_ACTIVE_TEXTURE), + EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_ACTIVE_TEXTURE), result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1165,12 +1143,12 @@ TEST_F(GLES2DecoderTest1, GetBufferParameterivValidArgs) { Result* result = static_cast<Result*>(shared_memory_address_); result->size = 0; cmds::GetBufferParameteriv cmd; - cmd.Init( - GL_ARRAY_BUFFER, GL_BUFFER_SIZE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_ARRAY_BUFFER, + GL_BUFFER_SIZE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_BUFFER_SIZE), + EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_BUFFER_SIZE), result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1182,9 +1160,10 @@ TEST_F(GLES2DecoderTest1, GetBufferParameterivInvalidArgs0_0) { static_cast<cmds::GetBufferParameteriv::Result*>(shared_memory_address_); result->size = 0; cmds::GetBufferParameteriv cmd; - cmd.Init( - GL_RENDERBUFFER, GL_BUFFER_SIZE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_RENDERBUFFER, + GL_BUFFER_SIZE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1197,9 +1176,10 @@ TEST_F(GLES2DecoderTest1, GetBufferParameterivInvalidArgs1_0) { static_cast<cmds::GetBufferParameteriv::Result*>(shared_memory_address_); result->size = 0; cmds::GetBufferParameteriv cmd; - cmd.Init( - GL_ARRAY_BUFFER, GL_PIXEL_PACK_BUFFER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_ARRAY_BUFFER, + GL_PIXEL_PACK_BUFFER, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1224,9 +1204,10 @@ TEST_F(GLES2DecoderTest1, GetBufferParameterivInvalidArgs2_1) { static_cast<cmds::GetBufferParameteriv::Result*>(shared_memory_address_); result->size = 0; cmds::GetBufferParameteriv cmd; - cmd.Init( - GL_ARRAY_BUFFER, GL_BUFFER_SIZE, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(GL_ARRAY_BUFFER, + GL_BUFFER_SIZE, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1263,8 +1244,7 @@ TEST_F(GLES2DecoderTest1, GetFloatvValidArgs) { cmds::GetFloatv cmd; cmd.Init(GL_ACTIVE_TEXTURE, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_ACTIVE_TEXTURE), + EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_ACTIVE_TEXTURE), result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1314,16 +1294,19 @@ TEST_F(GLES2DecoderTest1, GetFramebufferAttachmentParameterivValidArgs) { SpecializedSetup<cmds::GetFramebufferAttachmentParameteriv, 0>(true); typedef cmds::GetFramebufferAttachmentParameteriv::Result Result; Result* result = static_cast<Result*>(shared_memory_address_); - EXPECT_CALL( - *gl_, GetFramebufferAttachmentParameterivEXT( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, result->GetData())); + EXPECT_CALL(*gl_, + GetFramebufferAttachmentParameterivEXT( + GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + result->GetData())); result->size = 0; cmds::GetFramebufferAttachmentParameteriv cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE), @@ -1332,70 +1315,75 @@ TEST_F(GLES2DecoderTest1, GetFramebufferAttachmentParameterivValidArgs) { } TEST_F(GLES2DecoderTest1, GetFramebufferAttachmentParameterivInvalidArgs0_0) { - EXPECT_CALL( - *gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)).Times(0); + EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)) + .Times(0); SpecializedSetup<cmds::GetFramebufferAttachmentParameteriv, 0>(false); cmds::GetFramebufferAttachmentParameteriv::Result* result = static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->size = 0; cmds::GetFramebufferAttachmentParameteriv cmd; - cmd.Init( - GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_DRAW_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } TEST_F(GLES2DecoderTest1, GetFramebufferAttachmentParameterivInvalidArgs0_1) { - EXPECT_CALL( - *gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)).Times(0); + EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)) + .Times(0); SpecializedSetup<cmds::GetFramebufferAttachmentParameteriv, 0>(false); cmds::GetFramebufferAttachmentParameteriv::Result* result = static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->size = 0; cmds::GetFramebufferAttachmentParameteriv cmd; - cmd.Init( - GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_READ_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } TEST_F(GLES2DecoderTest1, GetFramebufferAttachmentParameterivInvalidArgs3_0) { - EXPECT_CALL( - *gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)).Times(0); + EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)) + .Times(0); SpecializedSetup<cmds::GetFramebufferAttachmentParameteriv, 0>(false); cmds::GetFramebufferAttachmentParameteriv::Result* result = static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->size = 0; cmds::GetFramebufferAttachmentParameteriv cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, kInvalidSharedMemoryId, 0); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + kInvalidSharedMemoryId, + 0); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } TEST_F(GLES2DecoderTest1, GetFramebufferAttachmentParameterivInvalidArgs3_1) { - EXPECT_CALL( - *gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)).Times(0); + EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)) + .Times(0); SpecializedSetup<cmds::GetFramebufferAttachmentParameteriv, 0>(false); cmds::GetFramebufferAttachmentParameteriv::Result* result = static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->size = 0; cmds::GetFramebufferAttachmentParameteriv cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1413,8 +1401,7 @@ TEST_F(GLES2DecoderTest1, GetIntegervValidArgs) { cmds::GetIntegerv cmd; cmd.Init(GL_ACTIVE_TEXTURE, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_ACTIVE_TEXTURE), + EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_ACTIVE_TEXTURE), result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1462,12 +1449,12 @@ TEST_F(GLES2DecoderTest1, GetProgramivValidArgs) { Result* result = static_cast<Result*>(shared_memory_address_); result->size = 0; cmds::GetProgramiv cmd; - cmd.Init( - client_program_id_, GL_DELETE_STATUS, shared_memory_id_, - shared_memory_offset_); + cmd.Init(client_program_id_, + GL_DELETE_STATUS, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_DELETE_STATUS), + EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DELETE_STATUS), result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1491,9 +1478,10 @@ TEST_F(GLES2DecoderTest1, GetProgramivInvalidArgs2_1) { static_cast<cmds::GetProgramiv::Result*>(shared_memory_address_); result->size = 0; cmds::GetProgramiv cmd; - cmd.Init( - client_program_id_, GL_DELETE_STATUS, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(client_program_id_, + GL_DELETE_STATUS, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1509,8 +1497,8 @@ TEST_F(GLES2DecoderTest1, GetProgramInfoLogValidArgs) { CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); ASSERT_TRUE(bucket != NULL); EXPECT_EQ(strlen(kInfo) + 1, bucket->size()); - EXPECT_EQ(0, memcmp(bucket->GetData(0, bucket->size()), kInfo, - bucket->size())); + EXPECT_EQ(0, + memcmp(bucket->GetData(0, bucket->size()), kInfo, bucket->size())); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1531,13 +1519,15 @@ TEST_F(GLES2DecoderTest1, GetRenderbufferParameterivValidArgs) { typedef cmds::GetRenderbufferParameteriv::Result Result; Result* result = static_cast<Result*>(shared_memory_address_); EXPECT_CALL( - *gl_, GetRenderbufferParameterivEXT( + *gl_, + GetRenderbufferParameterivEXT( GL_RENDERBUFFER, GL_RENDERBUFFER_RED_SIZE, result->GetData())); result->size = 0; cmds::GetRenderbufferParameteriv cmd; - cmd.Init( - GL_RENDERBUFFER, GL_RENDERBUFFER_RED_SIZE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_RENDERBUFFER, + GL_RENDERBUFFER_RED_SIZE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( GL_RENDERBUFFER_RED_SIZE), @@ -1553,9 +1543,10 @@ TEST_F(GLES2DecoderTest1, GetRenderbufferParameterivInvalidArgs0_0) { shared_memory_address_); result->size = 0; cmds::GetRenderbufferParameteriv cmd; - cmd.Init( - GL_FRAMEBUFFER, GL_RENDERBUFFER_RED_SIZE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_FRAMEBUFFER, + GL_RENDERBUFFER_RED_SIZE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1583,9 +1574,10 @@ TEST_F(GLES2DecoderTest1, GetRenderbufferParameterivInvalidArgs2_1) { shared_memory_address_); result->size = 0; cmds::GetRenderbufferParameteriv cmd; - cmd.Init( - GL_RENDERBUFFER, GL_RENDERBUFFER_RED_SIZE, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(GL_RENDERBUFFER, + GL_RENDERBUFFER_RED_SIZE, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1598,16 +1590,16 @@ TEST_F(GLES2DecoderTest1, GetShaderivValidArgs) { SpecializedSetup<cmds::GetShaderiv, 0>(true); typedef cmds::GetShaderiv::Result Result; Result* result = static_cast<Result*>(shared_memory_address_); - EXPECT_CALL( - *gl_, GetShaderiv(kServiceShaderId, GL_SHADER_TYPE, result->GetData())); + EXPECT_CALL(*gl_, + GetShaderiv(kServiceShaderId, GL_SHADER_TYPE, result->GetData())); result->size = 0; cmds::GetShaderiv cmd; - cmd.Init( - client_shader_id_, GL_SHADER_TYPE, shared_memory_id_, - shared_memory_offset_); + cmd.Init(client_shader_id_, + GL_SHADER_TYPE, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_SHADER_TYPE), + EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_SHADER_TYPE), result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1631,9 +1623,10 @@ TEST_F(GLES2DecoderTest1, GetShaderivInvalidArgs2_1) { static_cast<cmds::GetShaderiv::Result*>(shared_memory_address_); result->size = 0; cmds::GetShaderiv cmd; - cmd.Init( - client_shader_id_, GL_SHADER_TYPE, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(client_shader_id_, + GL_SHADER_TYPE, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1643,7 +1636,6 @@ TEST_F(GLES2DecoderTest1, GetShaderivInvalidArgs2_1) { // TODO(gman): GetShaderSource // TODO(gman): GetString - TEST_F(GLES2DecoderTest1, GetTexParameterfvValidArgs) { EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) @@ -1652,18 +1644,19 @@ TEST_F(GLES2DecoderTest1, GetTexParameterfvValidArgs) { SpecializedSetup<cmds::GetTexParameterfv, 0>(true); typedef cmds::GetTexParameterfv::Result Result; Result* result = static_cast<Result*>(shared_memory_address_); - EXPECT_CALL( - *gl_, GetTexParameterfv( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, result->GetData())); + EXPECT_CALL(*gl_, + GetTexParameterfv( + GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, result->GetData())); result->size = 0; cmds::GetTexParameterfv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_TEXTURE_MAG_FILTER), - result->GetNumResults()); + EXPECT_EQ( + decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_TEXTURE_MAG_FILTER), + result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1674,9 +1667,10 @@ TEST_F(GLES2DecoderTest1, GetTexParameterfvInvalidArgs0_0) { static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_); result->size = 0; cmds::GetTexParameterfv cmd; - cmd.Init( - GL_PROXY_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_PROXY_TEXTURE_CUBE_MAP, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1689,9 +1683,10 @@ TEST_F(GLES2DecoderTest1, GetTexParameterfvInvalidArgs1_0) { static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_); result->size = 0; cmds::GetTexParameterfv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_GENERATE_MIPMAP, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1716,9 +1711,10 @@ TEST_F(GLES2DecoderTest1, GetTexParameterfvInvalidArgs2_1) { static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_); result->size = 0; cmds::GetTexParameterfv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1731,18 +1727,19 @@ TEST_F(GLES2DecoderTest1, GetTexParameterivValidArgs) { SpecializedSetup<cmds::GetTexParameteriv, 0>(true); typedef cmds::GetTexParameteriv::Result Result; Result* result = static_cast<Result*>(shared_memory_address_); - EXPECT_CALL( - *gl_, GetTexParameteriv( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, result->GetData())); + EXPECT_CALL(*gl_, + GetTexParameteriv( + GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, result->GetData())); result->size = 0; cmds::GetTexParameteriv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_TEXTURE_MAG_FILTER), - result->GetNumResults()); + EXPECT_EQ( + decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_TEXTURE_MAG_FILTER), + result->GetNumResults()); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1753,9 +1750,10 @@ TEST_F(GLES2DecoderTest1, GetTexParameterivInvalidArgs0_0) { static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_); result->size = 0; cmds::GetTexParameteriv cmd; - cmd.Init( - GL_PROXY_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_PROXY_TEXTURE_CUBE_MAP, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1768,9 +1766,10 @@ TEST_F(GLES2DecoderTest1, GetTexParameterivInvalidArgs1_0) { static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_); result->size = 0; cmds::GetTexParameteriv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_GENERATE_MIPMAP, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1795,9 +1794,10 @@ TEST_F(GLES2DecoderTest1, GetTexParameterivInvalidArgs2_1) { static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_); result->size = 0; cmds::GetTexParameteriv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1809,16 +1809,16 @@ TEST_F(GLES2DecoderTest1, GetTexParameterivInvalidArgs2_1) { // TODO(gman): GetUniformLocationBucket - TEST_F(GLES2DecoderTest1, GetVertexAttribfvValidArgs) { SpecializedSetup<cmds::GetVertexAttribfv, 0>(true); typedef cmds::GetVertexAttribfv::Result Result; Result* result = static_cast<Result*>(shared_memory_address_); result->size = 0; cmds::GetVertexAttribfv cmd; - cmd.Init( - 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, - shared_memory_offset_); + cmd.Init(1, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( GL_VERTEX_ATTRIB_ARRAY_NORMALIZED), @@ -1845,9 +1845,10 @@ TEST_F(GLES2DecoderTest1, GetVertexAttribfvInvalidArgs2_1) { static_cast<cmds::GetVertexAttribfv::Result*>(shared_memory_address_); result->size = 0; cmds::GetVertexAttribfv cmd; - cmd.Init( - 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(1, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } @@ -1858,9 +1859,10 @@ TEST_F(GLES2DecoderTest1, GetVertexAttribivValidArgs) { Result* result = static_cast<Result*>(shared_memory_address_); result->size = 0; cmds::GetVertexAttribiv cmd; - cmd.Init( - 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, - shared_memory_offset_); + cmd.Init(1, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( GL_VERTEX_ATTRIB_ARRAY_NORMALIZED), @@ -1887,15 +1889,15 @@ TEST_F(GLES2DecoderTest1, GetVertexAttribivInvalidArgs2_1) { static_cast<cmds::GetVertexAttribiv::Result*>(shared_memory_address_); result->size = 0; cmds::GetVertexAttribiv cmd; - cmd.Init( - 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(1, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, + shared_memory_id_, + kInvalidSharedMemoryOffset); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } // TODO(gman): GetVertexAttribPointerv - TEST_F(GLES2DecoderTest1, HintValidArgs) { EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST)); SpecializedSetup<cmds::Hint, 0>(true); @@ -2002,4 +2004,3 @@ TEST_F(GLES2DecoderTest1, IsProgramInvalidArgsBadSharedMemoryId) { EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); } #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h index a0375418..58de1404 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h @@ -4,13 +4,14 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by gles2_cmd_decoder_unittest_2.cc #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ - TEST_F(GLES2DecoderTest2, IsRenderbufferValidArgs) { SpecializedSetup<cmds::IsRenderbuffer, 0>(true); cmds::IsRenderbuffer cmd; @@ -91,7 +92,6 @@ TEST_F(GLES2DecoderTest2, LinkProgramValidArgs) { } // TODO(gman): PixelStorei - TEST_F(GLES2DecoderTest2, PolygonOffsetValidArgs) { EXPECT_CALL(*gl_, PolygonOffset(1, 2)); SpecializedSetup<cmds::PolygonOffset, 0>(true); @@ -233,10 +233,9 @@ TEST_F(GLES2DecoderTest2, StencilOpSeparateValidArgs) { } // TODO(gman): TexImage2D - TEST_F(GLES2DecoderTest2, TexParameterfValidArgs) { - EXPECT_CALL( - *gl_, TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); + EXPECT_CALL(*gl_, + TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); SpecializedSetup<cmds::TexParameterf, 0>(true); cmds::TexParameterf cmd; cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -274,14 +273,16 @@ TEST_F(GLES2DecoderTest2, TexParameterfInvalidArgs1_0) { TEST_F(GLES2DecoderTest2, TexParameterfvValidArgs) { SpecializedSetup<cmds::TexParameterfv, 0>(true); cmds::TexParameterfv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = GL_NEAREST; EXPECT_CALL( - *gl_, TexParameteri( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, - *reinterpret_cast<const GLfloat*>(shared_memory_address_))); + *gl_, + TexParameteri(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + *reinterpret_cast<const GLfloat*>(shared_memory_address_))); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -290,9 +291,10 @@ TEST_F(GLES2DecoderTest2, TexParameterfvInvalidArgs0_0) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterfv, 0>(false); cmds::TexParameterfv cmd; - cmd.Init( - GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_1D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = GL_NEAREST; EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -302,9 +304,10 @@ TEST_F(GLES2DecoderTest2, TexParameterfvInvalidArgs0_1) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterfv, 0>(false); cmds::TexParameterfv cmd; - cmd.Init( - GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_3D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = GL_NEAREST; EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -314,9 +317,10 @@ TEST_F(GLES2DecoderTest2, TexParameterfvInvalidArgs1_0) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterfv, 0>(false); cmds::TexParameterfv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_GENERATE_MIPMAP, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = GL_NEAREST; EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -335,9 +339,10 @@ TEST_F(GLES2DecoderTest2, TexParameterfvInvalidArgs2_1) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterfv, 0>(false); cmds::TexParameterfv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + kInvalidSharedMemoryOffset); GetSharedMemoryAs<GLfloat*>()[0] = GL_NEAREST; EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); } @@ -346,14 +351,14 @@ TEST_F(GLES2DecoderTest2, TexParameterfvImmediateValidArgs) { cmds::TexParameterfvImmediate& cmd = *GetImmediateAs<cmds::TexParameterfvImmediate>(); SpecializedSetup<cmds::TexParameterfvImmediate, 0>(true); - GLfloat temp[1] = { GL_NEAREST, }; + GLfloat temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &temp[0]); EXPECT_CALL( *gl_, - TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, *reinterpret_cast< - GLfloat*>(ImmediateDataAddress(&cmd)))); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + TexParameteri(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + *reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -362,10 +367,9 @@ TEST_F(GLES2DecoderTest2, TexParameterfvImmediateInvalidArgs0_0) { *GetImmediateAs<cmds::TexParameterfvImmediate>(); EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterfvImmediate, 0>(false); - GLfloat temp[1] = { GL_NEAREST, }; + GLfloat temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -374,10 +378,9 @@ TEST_F(GLES2DecoderTest2, TexParameterfvImmediateInvalidArgs0_1) { *GetImmediateAs<cmds::TexParameterfvImmediate>(); EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterfvImmediate, 0>(false); - GLfloat temp[1] = { GL_NEAREST, }; + GLfloat temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -386,16 +389,15 @@ TEST_F(GLES2DecoderTest2, TexParameterfvImmediateInvalidArgs1_0) { *GetImmediateAs<cmds::TexParameterfvImmediate>(); EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterfvImmediate, 0>(false); - GLfloat temp[1] = { GL_NEAREST, }; + GLfloat temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } TEST_F(GLES2DecoderTest2, TexParameteriValidArgs) { - EXPECT_CALL( - *gl_, TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); + EXPECT_CALL(*gl_, + TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); SpecializedSetup<cmds::TexParameteri, 0>(true); cmds::TexParameteri cmd; cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -433,14 +435,16 @@ TEST_F(GLES2DecoderTest2, TexParameteriInvalidArgs1_0) { TEST_F(GLES2DecoderTest2, TexParameterivValidArgs) { SpecializedSetup<cmds::TexParameteriv, 0>(true); cmds::TexParameteriv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLint*>()[0] = GL_NEAREST; EXPECT_CALL( - *gl_, TexParameteri( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, *reinterpret_cast<const GLint*>( - shared_memory_address_))); + *gl_, + TexParameteri(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + *reinterpret_cast<const GLint*>(shared_memory_address_))); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -449,9 +453,10 @@ TEST_F(GLES2DecoderTest2, TexParameterivInvalidArgs0_0) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameteriv, 0>(false); cmds::TexParameteriv cmd; - cmd.Init( - GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_1D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLint*>()[0] = GL_NEAREST; EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -461,9 +466,10 @@ TEST_F(GLES2DecoderTest2, TexParameterivInvalidArgs0_1) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameteriv, 0>(false); cmds::TexParameteriv cmd; - cmd.Init( - GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_3D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLint*>()[0] = GL_NEAREST; EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -473,9 +479,10 @@ TEST_F(GLES2DecoderTest2, TexParameterivInvalidArgs1_0) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameteriv, 0>(false); cmds::TexParameteriv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_, - shared_memory_offset_); + cmd.Init(GL_TEXTURE_2D, + GL_GENERATE_MIPMAP, + shared_memory_id_, + shared_memory_offset_); GetSharedMemoryAs<GLint*>()[0] = GL_NEAREST; EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -494,9 +501,10 @@ TEST_F(GLES2DecoderTest2, TexParameterivInvalidArgs2_1) { EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameteriv, 0>(false); cmds::TexParameteriv cmd; - cmd.Init( - GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, - kInvalidSharedMemoryOffset); + cmd.Init(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + shared_memory_id_, + kInvalidSharedMemoryOffset); GetSharedMemoryAs<GLint*>()[0] = GL_NEAREST; EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); } @@ -505,14 +513,14 @@ TEST_F(GLES2DecoderTest2, TexParameterivImmediateValidArgs) { cmds::TexParameterivImmediate& cmd = *GetImmediateAs<cmds::TexParameterivImmediate>(); SpecializedSetup<cmds::TexParameterivImmediate, 0>(true); - GLint temp[1] = { GL_NEAREST, }; + GLint temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &temp[0]); EXPECT_CALL( *gl_, - TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, *reinterpret_cast< - GLint*>(ImmediateDataAddress(&cmd)))); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + TexParameteri(GL_TEXTURE_2D, + GL_TEXTURE_MAG_FILTER, + *reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -521,10 +529,9 @@ TEST_F(GLES2DecoderTest2, TexParameterivImmediateInvalidArgs0_0) { *GetImmediateAs<cmds::TexParameterivImmediate>(); EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterivImmediate, 0>(false); - GLint temp[1] = { GL_NEAREST, }; + GLint temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -533,10 +540,9 @@ TEST_F(GLES2DecoderTest2, TexParameterivImmediateInvalidArgs0_1) { *GetImmediateAs<cmds::TexParameterivImmediate>(); EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterivImmediate, 0>(false); - GLint temp[1] = { GL_NEAREST, }; + GLint temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } @@ -545,15 +551,13 @@ TEST_F(GLES2DecoderTest2, TexParameterivImmediateInvalidArgs1_0) { *GetImmediateAs<cmds::TexParameterivImmediate>(); EXPECT_CALL(*gl_, TexParameteri(_, _, _)).Times(0); SpecializedSetup<cmds::TexParameterivImmediate, 0>(false); - GLint temp[1] = { GL_NEAREST, }; + GLint temp[1] = {GL_NEAREST, }; cmd.Init(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } // TODO(gman): TexSubImage2D - TEST_F(GLES2DecoderTest2, Uniform1fValidArgs) { EXPECT_CALL(*gl_, Uniform1fv(1, 1, _)); SpecializedSetup<cmds::Uniform1f, 0>(true); @@ -565,7 +569,8 @@ TEST_F(GLES2DecoderTest2, Uniform1fValidArgs) { TEST_F(GLES2DecoderTest2, Uniform1fvValidArgs) { EXPECT_CALL( - *gl_, Uniform1fv( + *gl_, + Uniform1fv( 1, 2, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform1fv, 0>(true); cmds::Uniform1fv cmd; @@ -601,29 +606,28 @@ TEST_F(GLES2DecoderTest2, Uniform1fvInvalidArgs2_1) { TEST_F(GLES2DecoderTest2, Uniform1fvValidArgsCountTooLarge) { EXPECT_CALL( - *gl_, Uniform1fv( + *gl_, + Uniform1fv( 3, 3, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform1fv, 0>(true); cmds::Uniform1fv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, Uniform1fvImmediateValidArgs) { - cmds::Uniform1fvImmediate& cmd = - *GetImmediateAs<cmds::Uniform1fvImmediate>(); + cmds::Uniform1fvImmediate& cmd = *GetImmediateAs<cmds::Uniform1fvImmediate>(); EXPECT_CALL( *gl_, - Uniform1fv(1, 2, - reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + Uniform1fv(1, 2, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::Uniform1fvImmediate, 0>(true); - GLfloat temp[1 * 2] = { 0, }; + GLfloat temp[1 * 2] = {0, }; cmd.Init(1, 2, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } // TODO(gman): Uniform1i @@ -641,7 +645,8 @@ TEST_F(GLES2DecoderTest2, Uniform2fValidArgs) { TEST_F(GLES2DecoderTest2, Uniform2fvValidArgs) { EXPECT_CALL( - *gl_, Uniform2fv( + *gl_, + Uniform2fv( 1, 2, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform2fv, 0>(true); cmds::Uniform2fv cmd; @@ -677,29 +682,28 @@ TEST_F(GLES2DecoderTest2, Uniform2fvInvalidArgs2_1) { TEST_F(GLES2DecoderTest2, Uniform2fvValidArgsCountTooLarge) { EXPECT_CALL( - *gl_, Uniform2fv( + *gl_, + Uniform2fv( 3, 3, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform2fv, 0>(true); cmds::Uniform2fv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, Uniform2fvImmediateValidArgs) { - cmds::Uniform2fvImmediate& cmd = - *GetImmediateAs<cmds::Uniform2fvImmediate>(); + cmds::Uniform2fvImmediate& cmd = *GetImmediateAs<cmds::Uniform2fvImmediate>(); EXPECT_CALL( *gl_, - Uniform2fv(1, 2, - reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + Uniform2fv(1, 2, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::Uniform2fvImmediate, 0>(true); - GLfloat temp[2 * 2] = { 0, }; + GLfloat temp[2 * 2] = {0, }; cmd.Init(1, 2, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -714,8 +718,8 @@ TEST_F(GLES2DecoderTest2, Uniform2iValidArgs) { TEST_F(GLES2DecoderTest2, Uniform2ivValidArgs) { EXPECT_CALL( - *gl_, Uniform2iv( - 1, 2, reinterpret_cast<const GLint*>(shared_memory_address_))); + *gl_, + Uniform2iv(1, 2, reinterpret_cast<const GLint*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform2iv, 0>(true); cmds::Uniform2iv cmd; cmd.Init(1, 2, shared_memory_id_, shared_memory_offset_); @@ -750,29 +754,27 @@ TEST_F(GLES2DecoderTest2, Uniform2ivInvalidArgs2_1) { TEST_F(GLES2DecoderTest2, Uniform2ivValidArgsCountTooLarge) { EXPECT_CALL( - *gl_, Uniform2iv( - 3, 3, reinterpret_cast<const GLint*>(shared_memory_address_))); + *gl_, + Uniform2iv(3, 3, reinterpret_cast<const GLint*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform2iv, 0>(true); cmds::Uniform2iv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, Uniform2ivImmediateValidArgs) { - cmds::Uniform2ivImmediate& cmd = - *GetImmediateAs<cmds::Uniform2ivImmediate>(); + cmds::Uniform2ivImmediate& cmd = *GetImmediateAs<cmds::Uniform2ivImmediate>(); EXPECT_CALL( *gl_, - Uniform2iv(1, 2, - reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); + Uniform2iv(1, 2, reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::Uniform2ivImmediate, 0>(true); - GLint temp[2 * 2] = { 0, }; + GLint temp[2 * 2] = {0, }; cmd.Init(1, 2, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -787,7 +789,8 @@ TEST_F(GLES2DecoderTest2, Uniform3fValidArgs) { TEST_F(GLES2DecoderTest2, Uniform3fvValidArgs) { EXPECT_CALL( - *gl_, Uniform3fv( + *gl_, + Uniform3fv( 1, 2, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform3fv, 0>(true); cmds::Uniform3fv cmd; @@ -823,29 +826,28 @@ TEST_F(GLES2DecoderTest2, Uniform3fvInvalidArgs2_1) { TEST_F(GLES2DecoderTest2, Uniform3fvValidArgsCountTooLarge) { EXPECT_CALL( - *gl_, Uniform3fv( + *gl_, + Uniform3fv( 3, 3, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform3fv, 0>(true); cmds::Uniform3fv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, Uniform3fvImmediateValidArgs) { - cmds::Uniform3fvImmediate& cmd = - *GetImmediateAs<cmds::Uniform3fvImmediate>(); + cmds::Uniform3fvImmediate& cmd = *GetImmediateAs<cmds::Uniform3fvImmediate>(); EXPECT_CALL( *gl_, - Uniform3fv(1, 2, - reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + Uniform3fv(1, 2, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::Uniform3fvImmediate, 0>(true); - GLfloat temp[3 * 2] = { 0, }; + GLfloat temp[3 * 2] = {0, }; cmd.Init(1, 2, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -860,8 +862,8 @@ TEST_F(GLES2DecoderTest2, Uniform3iValidArgs) { TEST_F(GLES2DecoderTest2, Uniform3ivValidArgs) { EXPECT_CALL( - *gl_, Uniform3iv( - 1, 2, reinterpret_cast<const GLint*>(shared_memory_address_))); + *gl_, + Uniform3iv(1, 2, reinterpret_cast<const GLint*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform3iv, 0>(true); cmds::Uniform3iv cmd; cmd.Init(1, 2, shared_memory_id_, shared_memory_offset_); @@ -896,29 +898,27 @@ TEST_F(GLES2DecoderTest2, Uniform3ivInvalidArgs2_1) { TEST_F(GLES2DecoderTest2, Uniform3ivValidArgsCountTooLarge) { EXPECT_CALL( - *gl_, Uniform3iv( - 3, 3, reinterpret_cast<const GLint*>(shared_memory_address_))); + *gl_, + Uniform3iv(3, 3, reinterpret_cast<const GLint*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform3iv, 0>(true); cmds::Uniform3iv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, Uniform3ivImmediateValidArgs) { - cmds::Uniform3ivImmediate& cmd = - *GetImmediateAs<cmds::Uniform3ivImmediate>(); + cmds::Uniform3ivImmediate& cmd = *GetImmediateAs<cmds::Uniform3ivImmediate>(); EXPECT_CALL( *gl_, - Uniform3iv(1, 2, - reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); + Uniform3iv(1, 2, reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::Uniform3ivImmediate, 0>(true); - GLint temp[3 * 2] = { 0, }; + GLint temp[3 * 2] = {0, }; cmd.Init(1, 2, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -933,7 +933,8 @@ TEST_F(GLES2DecoderTest2, Uniform4fValidArgs) { TEST_F(GLES2DecoderTest2, Uniform4fvValidArgs) { EXPECT_CALL( - *gl_, Uniform4fv( + *gl_, + Uniform4fv( 1, 2, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform4fv, 0>(true); cmds::Uniform4fv cmd; @@ -969,29 +970,28 @@ TEST_F(GLES2DecoderTest2, Uniform4fvInvalidArgs2_1) { TEST_F(GLES2DecoderTest2, Uniform4fvValidArgsCountTooLarge) { EXPECT_CALL( - *gl_, Uniform4fv( + *gl_, + Uniform4fv( 3, 3, reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform4fv, 0>(true); cmds::Uniform4fv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, Uniform4fvImmediateValidArgs) { - cmds::Uniform4fvImmediate& cmd = - *GetImmediateAs<cmds::Uniform4fvImmediate>(); + cmds::Uniform4fvImmediate& cmd = *GetImmediateAs<cmds::Uniform4fvImmediate>(); EXPECT_CALL( *gl_, - Uniform4fv(1, 2, - reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + Uniform4fv(1, 2, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::Uniform4fvImmediate, 0>(true); - GLfloat temp[4 * 2] = { 0, }; + GLfloat temp[4 * 2] = {0, }; cmd.Init(1, 2, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1006,8 +1006,8 @@ TEST_F(GLES2DecoderTest2, Uniform4iValidArgs) { TEST_F(GLES2DecoderTest2, Uniform4ivValidArgs) { EXPECT_CALL( - *gl_, Uniform4iv( - 1, 2, reinterpret_cast<const GLint*>(shared_memory_address_))); + *gl_, + Uniform4iv(1, 2, reinterpret_cast<const GLint*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform4iv, 0>(true); cmds::Uniform4iv cmd; cmd.Init(1, 2, shared_memory_id_, shared_memory_offset_); @@ -1042,37 +1042,37 @@ TEST_F(GLES2DecoderTest2, Uniform4ivInvalidArgs2_1) { TEST_F(GLES2DecoderTest2, Uniform4ivValidArgsCountTooLarge) { EXPECT_CALL( - *gl_, Uniform4iv( - 3, 3, reinterpret_cast<const GLint*>(shared_memory_address_))); + *gl_, + Uniform4iv(3, 3, reinterpret_cast<const GLint*>(shared_memory_address_))); SpecializedSetup<cmds::Uniform4iv, 0>(true); cmds::Uniform4iv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, Uniform4ivImmediateValidArgs) { - cmds::Uniform4ivImmediate& cmd = - *GetImmediateAs<cmds::Uniform4ivImmediate>(); + cmds::Uniform4ivImmediate& cmd = *GetImmediateAs<cmds::Uniform4ivImmediate>(); EXPECT_CALL( *gl_, - Uniform4iv(1, 2, - reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); + Uniform4iv(1, 2, reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::Uniform4ivImmediate, 0>(true); - GLint temp[4 * 2] = { 0, }; + GLint temp[4 * 2] = {0, }; cmd.Init(1, 2, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES2DecoderTest2, UniformMatrix2fvValidArgs) { - EXPECT_CALL( - *gl_, UniformMatrix2fv( - 1, 2, false, reinterpret_cast<const GLfloat*>( - shared_memory_address_))); + EXPECT_CALL(*gl_, + UniformMatrix2fv( + 1, + 2, + false, + reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::UniformMatrix2fv, 0>(true); cmds::UniformMatrix2fv cmd; cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_); @@ -1115,15 +1115,19 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvInvalidArgs3_1) { } TEST_F(GLES2DecoderTest2, UniformMatrix2fvValidArgsCountTooLarge) { - EXPECT_CALL( - *gl_, UniformMatrix2fv( - 3, 3, false, reinterpret_cast<const GLfloat*>( - shared_memory_address_))); + EXPECT_CALL(*gl_, + UniformMatrix2fv( + 3, + 3, + false, + reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::UniformMatrix2fv, 0>(true); cmds::UniformMatrix2fv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, false, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + false, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1133,13 +1137,12 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvImmediateValidArgs) { *GetImmediateAs<cmds::UniformMatrix2fvImmediate>(); EXPECT_CALL( *gl_, - UniformMatrix2fv(1, 2, false, - reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + UniformMatrix2fv( + 1, 2, false, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(true); - GLfloat temp[4 * 2] = { 0, }; + GLfloat temp[4 * 2] = {0, }; cmd.Init(1, 2, false, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1148,18 +1151,19 @@ TEST_F(GLES2DecoderTest2, UniformMatrix2fvImmediateInvalidArgs2_0) { *GetImmediateAs<cmds::UniformMatrix2fvImmediate>(); EXPECT_CALL(*gl_, UniformMatrix2fv(_, _, _, _)).Times(0); SpecializedSetup<cmds::UniformMatrix2fvImmediate, 0>(false); - GLfloat temp[4 * 2] = { 0, }; + GLfloat temp[4 * 2] = {0, }; cmd.Init(1, 2, true, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } TEST_F(GLES2DecoderTest2, UniformMatrix3fvValidArgs) { - EXPECT_CALL( - *gl_, UniformMatrix3fv( - 1, 2, false, reinterpret_cast<const GLfloat*>( - shared_memory_address_))); + EXPECT_CALL(*gl_, + UniformMatrix3fv( + 1, + 2, + false, + reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::UniformMatrix3fv, 0>(true); cmds::UniformMatrix3fv cmd; cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_); @@ -1202,15 +1206,19 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvInvalidArgs3_1) { } TEST_F(GLES2DecoderTest2, UniformMatrix3fvValidArgsCountTooLarge) { - EXPECT_CALL( - *gl_, UniformMatrix3fv( - 3, 3, false, reinterpret_cast<const GLfloat*>( - shared_memory_address_))); + EXPECT_CALL(*gl_, + UniformMatrix3fv( + 3, + 3, + false, + reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::UniformMatrix3fv, 0>(true); cmds::UniformMatrix3fv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, false, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + false, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1220,13 +1228,12 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvImmediateValidArgs) { *GetImmediateAs<cmds::UniformMatrix3fvImmediate>(); EXPECT_CALL( *gl_, - UniformMatrix3fv(1, 2, false, - reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + UniformMatrix3fv( + 1, 2, false, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::UniformMatrix3fvImmediate, 0>(true); - GLfloat temp[9 * 2] = { 0, }; + GLfloat temp[9 * 2] = {0, }; cmd.Init(1, 2, false, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1235,18 +1242,19 @@ TEST_F(GLES2DecoderTest2, UniformMatrix3fvImmediateInvalidArgs2_0) { *GetImmediateAs<cmds::UniformMatrix3fvImmediate>(); EXPECT_CALL(*gl_, UniformMatrix3fv(_, _, _, _)).Times(0); SpecializedSetup<cmds::UniformMatrix3fvImmediate, 0>(false); - GLfloat temp[9 * 2] = { 0, }; + GLfloat temp[9 * 2] = {0, }; cmd.Init(1, 2, true, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } TEST_F(GLES2DecoderTest2, UniformMatrix4fvValidArgs) { - EXPECT_CALL( - *gl_, UniformMatrix4fv( - 1, 2, false, reinterpret_cast<const GLfloat*>( - shared_memory_address_))); + EXPECT_CALL(*gl_, + UniformMatrix4fv( + 1, + 2, + false, + reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::UniformMatrix4fv, 0>(true); cmds::UniformMatrix4fv cmd; cmd.Init(1, 2, false, shared_memory_id_, shared_memory_offset_); @@ -1289,15 +1297,19 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvInvalidArgs3_1) { } TEST_F(GLES2DecoderTest2, UniformMatrix4fvValidArgsCountTooLarge) { - EXPECT_CALL( - *gl_, UniformMatrix4fv( - 3, 3, false, reinterpret_cast<const GLfloat*>( - shared_memory_address_))); + EXPECT_CALL(*gl_, + UniformMatrix4fv( + 3, + 3, + false, + reinterpret_cast<const GLfloat*>(shared_memory_address_))); SpecializedSetup<cmds::UniformMatrix4fv, 0>(true); cmds::UniformMatrix4fv cmd; - cmd.Init( - ProgramManager::MakeFakeLocation( - 1, 1), 5, false, shared_memory_id_, shared_memory_offset_); + cmd.Init(ProgramManager::MakeFakeLocation(1, 1), + 5, + false, + shared_memory_id_, + shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1307,13 +1319,12 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvImmediateValidArgs) { *GetImmediateAs<cmds::UniformMatrix4fvImmediate>(); EXPECT_CALL( *gl_, - UniformMatrix4fv(1, 2, false, - reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + UniformMatrix4fv( + 1, 2, false, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>(true); - GLfloat temp[16 * 2] = { 0, }; + GLfloat temp[16 * 2] = {0, }; cmd.Init(1, 2, false, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1322,10 +1333,9 @@ TEST_F(GLES2DecoderTest2, UniformMatrix4fvImmediateInvalidArgs2_0) { *GetImmediateAs<cmds::UniformMatrix4fvImmediate>(); EXPECT_CALL(*gl_, UniformMatrix4fv(_, _, _, _)).Times(0); SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>(false); - GLfloat temp[16 * 2] = { 0, }; + GLfloat temp[16 * 2] = {0, }; cmd.Init(1, 2, true, &temp[0]); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } // TODO(gman): UseProgram @@ -1353,9 +1363,9 @@ TEST_F(GLES2DecoderTest2, VertexAttrib1fvValidArgs) { cmds::VertexAttrib1fv cmd; cmd.Init(1, shared_memory_id_, shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = 0; - EXPECT_CALL( - *gl_, VertexAttrib1fv( - 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); + EXPECT_CALL(*gl_, + VertexAttrib1fv( + 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1382,14 +1392,12 @@ TEST_F(GLES2DecoderTest2, VertexAttrib1fvImmediateValidArgs) { cmds::VertexAttrib1fvImmediate& cmd = *GetImmediateAs<cmds::VertexAttrib1fvImmediate>(); SpecializedSetup<cmds::VertexAttrib1fvImmediate, 0>(true); - GLfloat temp[1] = { 0, }; + GLfloat temp[1] = {0, }; cmd.Init(1, &temp[0]); - EXPECT_CALL( - *gl_, - VertexAttrib1fv(1, reinterpret_cast< - GLfloat*>(ImmediateDataAddress(&cmd)))); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_CALL(*gl_, + VertexAttrib1fv( + 1, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1407,9 +1415,9 @@ TEST_F(GLES2DecoderTest2, VertexAttrib2fvValidArgs) { cmds::VertexAttrib2fv cmd; cmd.Init(1, shared_memory_id_, shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = 0; - EXPECT_CALL( - *gl_, VertexAttrib2fv( - 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); + EXPECT_CALL(*gl_, + VertexAttrib2fv( + 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1436,14 +1444,12 @@ TEST_F(GLES2DecoderTest2, VertexAttrib2fvImmediateValidArgs) { cmds::VertexAttrib2fvImmediate& cmd = *GetImmediateAs<cmds::VertexAttrib2fvImmediate>(); SpecializedSetup<cmds::VertexAttrib2fvImmediate, 0>(true); - GLfloat temp[2] = { 0, }; + GLfloat temp[2] = {0, }; cmd.Init(1, &temp[0]); - EXPECT_CALL( - *gl_, - VertexAttrib2fv(1, reinterpret_cast< - GLfloat*>(ImmediateDataAddress(&cmd)))); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_CALL(*gl_, + VertexAttrib2fv( + 1, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1461,9 +1467,9 @@ TEST_F(GLES2DecoderTest2, VertexAttrib3fvValidArgs) { cmds::VertexAttrib3fv cmd; cmd.Init(1, shared_memory_id_, shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = 0; - EXPECT_CALL( - *gl_, VertexAttrib3fv( - 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); + EXPECT_CALL(*gl_, + VertexAttrib3fv( + 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1490,14 +1496,12 @@ TEST_F(GLES2DecoderTest2, VertexAttrib3fvImmediateValidArgs) { cmds::VertexAttrib3fvImmediate& cmd = *GetImmediateAs<cmds::VertexAttrib3fvImmediate>(); SpecializedSetup<cmds::VertexAttrib3fvImmediate, 0>(true); - GLfloat temp[3] = { 0, }; + GLfloat temp[3] = {0, }; cmd.Init(1, &temp[0]); - EXPECT_CALL( - *gl_, - VertexAttrib3fv(1, reinterpret_cast< - GLfloat*>(ImmediateDataAddress(&cmd)))); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_CALL(*gl_, + VertexAttrib3fv( + 1, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1515,9 +1519,9 @@ TEST_F(GLES2DecoderTest2, VertexAttrib4fvValidArgs) { cmds::VertexAttrib4fv cmd; cmd.Init(1, shared_memory_id_, shared_memory_offset_); GetSharedMemoryAs<GLfloat*>()[0] = 0; - EXPECT_CALL( - *gl_, VertexAttrib4fv( - 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); + EXPECT_CALL(*gl_, + VertexAttrib4fv( + 1, reinterpret_cast<const GLfloat*>(shared_memory_address_))); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } @@ -1544,19 +1548,16 @@ TEST_F(GLES2DecoderTest2, VertexAttrib4fvImmediateValidArgs) { cmds::VertexAttrib4fvImmediate& cmd = *GetImmediateAs<cmds::VertexAttrib4fvImmediate>(); SpecializedSetup<cmds::VertexAttrib4fvImmediate, 0>(true); - GLfloat temp[4] = { 0, }; + GLfloat temp[4] = {0, }; cmd.Init(1, &temp[0]); - EXPECT_CALL( - *gl_, - VertexAttrib4fv(1, reinterpret_cast< - GLfloat*>(ImmediateDataAddress(&cmd)))); - EXPECT_EQ(error::kNoError, - ExecuteImmediateCmd(cmd, sizeof(temp))); + EXPECT_CALL(*gl_, + VertexAttrib4fv( + 1, reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd)))); + EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } // TODO(gman): VertexAttribPointer - TEST_F(GLES2DecoderTest2, ViewportValidArgs) { EXPECT_CALL(*gl_, Viewport(1, 2, 3, 4)); SpecializedSetup<cmds::Viewport, 0>(true); @@ -1600,7 +1601,6 @@ TEST_F(GLES2DecoderTest2, ViewportInvalidArgs3_0) { // TODO(gman): PushGroupMarkerEXT - TEST_F(GLES2DecoderTest2, PopGroupMarkerEXTValidArgs) { SpecializedSetup<cmds::PopGroupMarkerEXT, 0>(true); cmds::PopGroupMarkerEXT cmd; @@ -1619,4 +1619,3 @@ TEST_F(GLES2DecoderTest2, PopGroupMarkerEXTValidArgs) { // TODO(gman): GenSharedIdsCHROMIUM #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h index a8cc551..5843185 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // It is included by gles2_cmd_decoder_unittest_3.cc @@ -65,4 +67,3 @@ // TODO(gman): DiscardBackbufferCHROMIUM #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/gles2_cmd_validation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_autogen.h index 3cfa322..0e78731 100644 --- a/gpu/command_buffer/service/gles2_cmd_validation_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_validation_autogen.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_AUTOGEN_H_ @@ -71,4 +73,3 @@ ValueValidator<GLenum> vertex_pointer; ValueValidator<GLint> zero_only; #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_AUTOGEN_H_ - diff --git a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h index 3ba4970..fe98f26 100644 --- a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h @@ -4,672 +4,430 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_ // NOLINT #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_ // NOLINT static const GLenum valid_attachment_table[] = { - GL_COLOR_ATTACHMENT0, - GL_DEPTH_ATTACHMENT, - GL_STENCIL_ATTACHMENT, -}; + GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT, }; static const GLenum valid_backbuffer_attachment_table[] = { - GL_COLOR_EXT, - GL_DEPTH_EXT, - GL_STENCIL_EXT, -}; - -static const GLenum valid_blit_filter_table[] = { - GL_NEAREST, - GL_LINEAR, -}; - -static const GLenum valid_buffer_parameter_table[] = { - GL_BUFFER_SIZE, - GL_BUFFER_USAGE, -}; - -static const GLenum valid_buffer_target_table[] = { - GL_ARRAY_BUFFER, - GL_ELEMENT_ARRAY_BUFFER, -}; + GL_COLOR_EXT, GL_DEPTH_EXT, GL_STENCIL_EXT, }; + +static const GLenum valid_blit_filter_table[] = {GL_NEAREST, GL_LINEAR, }; + +static const GLenum valid_buffer_parameter_table[] = {GL_BUFFER_SIZE, + GL_BUFFER_USAGE, }; + +static const GLenum valid_buffer_target_table[] = {GL_ARRAY_BUFFER, + GL_ELEMENT_ARRAY_BUFFER, }; static const GLenum valid_buffer_usage_table[] = { - GL_STREAM_DRAW, - GL_STATIC_DRAW, - GL_DYNAMIC_DRAW, -}; + GL_STREAM_DRAW, GL_STATIC_DRAW, GL_DYNAMIC_DRAW, }; static const GLenum valid_capability_table[] = { - GL_BLEND, - GL_CULL_FACE, - GL_DEPTH_TEST, - GL_DITHER, - GL_POLYGON_OFFSET_FILL, - GL_SAMPLE_ALPHA_TO_COVERAGE, - GL_SAMPLE_COVERAGE, - GL_SCISSOR_TEST, - GL_STENCIL_TEST, -}; + GL_BLEND, GL_CULL_FACE, GL_DEPTH_TEST, + GL_DITHER, GL_POLYGON_OFFSET_FILL, GL_SAMPLE_ALPHA_TO_COVERAGE, + GL_SAMPLE_COVERAGE, GL_SCISSOR_TEST, GL_STENCIL_TEST, }; static const GLenum valid_cmp_function_table[] = { - GL_NEVER, - GL_LESS, - GL_EQUAL, - GL_LEQUAL, - GL_GREATER, - GL_NOTEQUAL, - GL_GEQUAL, - GL_ALWAYS, -}; + GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, + GL_GREATER, GL_NOTEQUAL, GL_GEQUAL, GL_ALWAYS, }; static const GLenum valid_draw_mode_table[] = { - GL_POINTS, - GL_LINE_STRIP, - GL_LINE_LOOP, - GL_LINES, - GL_TRIANGLE_STRIP, - GL_TRIANGLE_FAN, - GL_TRIANGLES, -}; + GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, + GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, }; static const GLenum valid_dst_blend_factor_table[] = { - GL_ZERO, - GL_ONE, - GL_SRC_COLOR, - GL_ONE_MINUS_SRC_COLOR, - GL_DST_COLOR, - GL_ONE_MINUS_DST_COLOR, - GL_SRC_ALPHA, - GL_ONE_MINUS_SRC_ALPHA, - GL_DST_ALPHA, - GL_ONE_MINUS_DST_ALPHA, - GL_CONSTANT_COLOR, - GL_ONE_MINUS_CONSTANT_COLOR, - GL_CONSTANT_ALPHA, - GL_ONE_MINUS_CONSTANT_ALPHA, -}; - -static const GLenum valid_equation_table[] = { - GL_FUNC_ADD, - GL_FUNC_SUBTRACT, - GL_FUNC_REVERSE_SUBTRACT, -}; - -static const GLenum valid_face_mode_table[] = { - GL_CW, - GL_CCW, -}; - -static const GLenum valid_face_type_table[] = { - GL_FRONT, - GL_BACK, - GL_FRONT_AND_BACK, -}; - -static const GLboolean valid_false_only_table[] = { - false, -}; + GL_ZERO, GL_ONE, + GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, + GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, + GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, + GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, + GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, + GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, }; + +static const GLenum valid_equation_table[] = {GL_FUNC_ADD, GL_FUNC_SUBTRACT, + GL_FUNC_REVERSE_SUBTRACT, }; + +static const GLenum valid_face_mode_table[] = {GL_CW, GL_CCW, }; + +static const GLenum valid_face_type_table[] = {GL_FRONT, GL_BACK, + GL_FRONT_AND_BACK, }; + +static const GLboolean valid_false_only_table[] = {false, }; static const GLenum valid_frame_buffer_parameter_table[] = { - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, -}; + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, }; -static const GLenum valid_frame_buffer_target_table[] = { - GL_FRAMEBUFFER, -}; +static const GLenum valid_frame_buffer_target_table[] = {GL_FRAMEBUFFER, }; static const GLenum valid_g_l_state_table[] = { - GL_ACTIVE_TEXTURE, - GL_ALIASED_LINE_WIDTH_RANGE, - GL_ALIASED_POINT_SIZE_RANGE, - GL_ALPHA_BITS, - GL_ARRAY_BUFFER_BINDING, - GL_BLUE_BITS, - GL_COMPRESSED_TEXTURE_FORMATS, - GL_CURRENT_PROGRAM, - GL_DEPTH_BITS, - GL_DEPTH_RANGE, - GL_ELEMENT_ARRAY_BUFFER_BINDING, - GL_FRAMEBUFFER_BINDING, - GL_GENERATE_MIPMAP_HINT, - GL_GREEN_BITS, - GL_IMPLEMENTATION_COLOR_READ_FORMAT, - GL_IMPLEMENTATION_COLOR_READ_TYPE, - GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, - GL_MAX_CUBE_MAP_TEXTURE_SIZE, - GL_MAX_FRAGMENT_UNIFORM_VECTORS, - GL_MAX_RENDERBUFFER_SIZE, - GL_MAX_TEXTURE_IMAGE_UNITS, - GL_MAX_TEXTURE_SIZE, - GL_MAX_VARYING_VECTORS, - GL_MAX_VERTEX_ATTRIBS, - GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, - GL_MAX_VERTEX_UNIFORM_VECTORS, - GL_MAX_VIEWPORT_DIMS, - GL_NUM_COMPRESSED_TEXTURE_FORMATS, - GL_NUM_SHADER_BINARY_FORMATS, - GL_PACK_ALIGNMENT, - GL_RED_BITS, - GL_RENDERBUFFER_BINDING, - GL_SAMPLE_BUFFERS, - GL_SAMPLE_COVERAGE_INVERT, - GL_SAMPLE_COVERAGE_VALUE, - GL_SAMPLES, - GL_SCISSOR_BOX, - GL_SHADER_BINARY_FORMATS, - GL_SHADER_COMPILER, - GL_SUBPIXEL_BITS, - GL_STENCIL_BITS, - GL_TEXTURE_BINDING_2D, - GL_TEXTURE_BINDING_CUBE_MAP, - GL_UNPACK_ALIGNMENT, - GL_UNPACK_FLIP_Y_CHROMIUM, - GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, - GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, - GL_VERTEX_ARRAY_BINDING_OES, - GL_VIEWPORT, - GL_BLEND_COLOR, - GL_BLEND_EQUATION_RGB, - GL_BLEND_EQUATION_ALPHA, - GL_BLEND_SRC_RGB, - GL_BLEND_DST_RGB, - GL_BLEND_SRC_ALPHA, - GL_BLEND_DST_ALPHA, - GL_COLOR_CLEAR_VALUE, - GL_DEPTH_CLEAR_VALUE, - GL_STENCIL_CLEAR_VALUE, - GL_COLOR_WRITEMASK, - GL_CULL_FACE_MODE, - GL_DEPTH_FUNC, - GL_DEPTH_WRITEMASK, - GL_DEPTH_RANGE, - GL_FRONT_FACE, - GL_GENERATE_MIPMAP_HINT, - GL_LINE_WIDTH, - GL_PACK_ALIGNMENT, - GL_UNPACK_ALIGNMENT, - GL_POLYGON_OFFSET_FACTOR, - GL_POLYGON_OFFSET_UNITS, - GL_SAMPLE_COVERAGE_VALUE, - GL_SAMPLE_COVERAGE_INVERT, - GL_SCISSOR_BOX, - GL_STENCIL_FUNC, - GL_STENCIL_REF, - GL_STENCIL_VALUE_MASK, - GL_STENCIL_BACK_FUNC, - GL_STENCIL_BACK_REF, - GL_STENCIL_BACK_VALUE_MASK, - GL_STENCIL_WRITEMASK, - GL_STENCIL_BACK_WRITEMASK, - GL_STENCIL_FAIL, - GL_STENCIL_PASS_DEPTH_FAIL, - GL_STENCIL_PASS_DEPTH_PASS, - GL_STENCIL_BACK_FAIL, - GL_STENCIL_BACK_PASS_DEPTH_FAIL, - GL_STENCIL_BACK_PASS_DEPTH_PASS, - GL_VIEWPORT, - GL_BLEND, - GL_CULL_FACE, - GL_DEPTH_TEST, - GL_DITHER, - GL_POLYGON_OFFSET_FILL, - GL_SAMPLE_ALPHA_TO_COVERAGE, - GL_SAMPLE_COVERAGE, - GL_SCISSOR_TEST, - GL_STENCIL_TEST, -}; + GL_ACTIVE_TEXTURE, + GL_ALIASED_LINE_WIDTH_RANGE, + GL_ALIASED_POINT_SIZE_RANGE, + GL_ALPHA_BITS, + GL_ARRAY_BUFFER_BINDING, + GL_BLUE_BITS, + GL_COMPRESSED_TEXTURE_FORMATS, + GL_CURRENT_PROGRAM, + GL_DEPTH_BITS, + GL_DEPTH_RANGE, + GL_ELEMENT_ARRAY_BUFFER_BINDING, + GL_FRAMEBUFFER_BINDING, + GL_GENERATE_MIPMAP_HINT, + GL_GREEN_BITS, + GL_IMPLEMENTATION_COLOR_READ_FORMAT, + GL_IMPLEMENTATION_COLOR_READ_TYPE, + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, + GL_MAX_CUBE_MAP_TEXTURE_SIZE, + GL_MAX_FRAGMENT_UNIFORM_VECTORS, + GL_MAX_RENDERBUFFER_SIZE, + GL_MAX_TEXTURE_IMAGE_UNITS, + GL_MAX_TEXTURE_SIZE, + GL_MAX_VARYING_VECTORS, + GL_MAX_VERTEX_ATTRIBS, + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, + GL_MAX_VERTEX_UNIFORM_VECTORS, + GL_MAX_VIEWPORT_DIMS, + GL_NUM_COMPRESSED_TEXTURE_FORMATS, + GL_NUM_SHADER_BINARY_FORMATS, + GL_PACK_ALIGNMENT, + GL_RED_BITS, + GL_RENDERBUFFER_BINDING, + GL_SAMPLE_BUFFERS, + GL_SAMPLE_COVERAGE_INVERT, + GL_SAMPLE_COVERAGE_VALUE, + GL_SAMPLES, + GL_SCISSOR_BOX, + GL_SHADER_BINARY_FORMATS, + GL_SHADER_COMPILER, + GL_SUBPIXEL_BITS, + GL_STENCIL_BITS, + GL_TEXTURE_BINDING_2D, + GL_TEXTURE_BINDING_CUBE_MAP, + GL_UNPACK_ALIGNMENT, + GL_UNPACK_FLIP_Y_CHROMIUM, + GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, + GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, + GL_VERTEX_ARRAY_BINDING_OES, + GL_VIEWPORT, + GL_BLEND_COLOR, + GL_BLEND_EQUATION_RGB, + GL_BLEND_EQUATION_ALPHA, + GL_BLEND_SRC_RGB, + GL_BLEND_DST_RGB, + GL_BLEND_SRC_ALPHA, + GL_BLEND_DST_ALPHA, + GL_COLOR_CLEAR_VALUE, + GL_DEPTH_CLEAR_VALUE, + GL_STENCIL_CLEAR_VALUE, + GL_COLOR_WRITEMASK, + GL_CULL_FACE_MODE, + GL_DEPTH_FUNC, + GL_DEPTH_WRITEMASK, + GL_DEPTH_RANGE, + GL_FRONT_FACE, + GL_GENERATE_MIPMAP_HINT, + GL_LINE_WIDTH, + GL_PACK_ALIGNMENT, + GL_UNPACK_ALIGNMENT, + GL_POLYGON_OFFSET_FACTOR, + GL_POLYGON_OFFSET_UNITS, + GL_SAMPLE_COVERAGE_VALUE, + GL_SAMPLE_COVERAGE_INVERT, + GL_SCISSOR_BOX, + GL_STENCIL_FUNC, + GL_STENCIL_REF, + GL_STENCIL_VALUE_MASK, + GL_STENCIL_BACK_FUNC, + GL_STENCIL_BACK_REF, + GL_STENCIL_BACK_VALUE_MASK, + GL_STENCIL_WRITEMASK, + GL_STENCIL_BACK_WRITEMASK, + GL_STENCIL_FAIL, + GL_STENCIL_PASS_DEPTH_FAIL, + GL_STENCIL_PASS_DEPTH_PASS, + GL_STENCIL_BACK_FAIL, + GL_STENCIL_BACK_PASS_DEPTH_FAIL, + GL_STENCIL_BACK_PASS_DEPTH_PASS, + GL_VIEWPORT, + GL_BLEND, + GL_CULL_FACE, + GL_DEPTH_TEST, + GL_DITHER, + GL_POLYGON_OFFSET_FILL, + GL_SAMPLE_ALPHA_TO_COVERAGE, + GL_SAMPLE_COVERAGE, + GL_SCISSOR_TEST, + GL_STENCIL_TEST, }; static const GLenum valid_get_max_index_type_table[] = { - GL_UNSIGNED_BYTE, - GL_UNSIGNED_SHORT, - GL_UNSIGNED_INT, -}; + GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, }; static const GLenum valid_get_tex_param_target_table[] = { - GL_TEXTURE_2D, - GL_TEXTURE_CUBE_MAP, -}; + GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, }; -static const GLenum valid_hint_mode_table[] = { - GL_FASTEST, - GL_NICEST, - GL_DONT_CARE, -}; +static const GLenum valid_hint_mode_table[] = {GL_FASTEST, GL_NICEST, + GL_DONT_CARE, }; -static const GLenum valid_hint_target_table[] = { - GL_GENERATE_MIPMAP_HINT, -}; +static const GLenum valid_hint_target_table[] = {GL_GENERATE_MIPMAP_HINT, }; -static const GLenum valid_index_type_table[] = { - GL_UNSIGNED_BYTE, - GL_UNSIGNED_SHORT, -}; +static const GLenum valid_index_type_table[] = {GL_UNSIGNED_BYTE, + GL_UNSIGNED_SHORT, }; static const GLenum valid_pixel_store_table[] = { - GL_PACK_ALIGNMENT, - GL_UNPACK_ALIGNMENT, - GL_UNPACK_FLIP_Y_CHROMIUM, - GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, - GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, -}; - -static const GLint valid_pixel_store_alignment_table[] = { - 1, - 2, - 4, - 8, -}; + GL_PACK_ALIGNMENT, + GL_UNPACK_ALIGNMENT, + GL_UNPACK_FLIP_Y_CHROMIUM, + GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, + GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, }; + +static const GLint valid_pixel_store_alignment_table[] = {1, 2, 4, 8, }; static const GLenum valid_pixel_type_table[] = { - GL_UNSIGNED_BYTE, - GL_UNSIGNED_SHORT_5_6_5, - GL_UNSIGNED_SHORT_4_4_4_4, - GL_UNSIGNED_SHORT_5_5_5_1, -}; + GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4, + GL_UNSIGNED_SHORT_5_5_5_1, }; static const GLenum valid_program_parameter_table[] = { - GL_DELETE_STATUS, - GL_LINK_STATUS, - GL_VALIDATE_STATUS, - GL_INFO_LOG_LENGTH, - GL_ATTACHED_SHADERS, - GL_ACTIVE_ATTRIBUTES, - GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, - GL_ACTIVE_UNIFORMS, - GL_ACTIVE_UNIFORM_MAX_LENGTH, -}; + GL_DELETE_STATUS, GL_LINK_STATUS, + GL_VALIDATE_STATUS, GL_INFO_LOG_LENGTH, + GL_ATTACHED_SHADERS, GL_ACTIVE_ATTRIBUTES, + GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, GL_ACTIVE_UNIFORMS, + GL_ACTIVE_UNIFORM_MAX_LENGTH, }; static const GLenum valid_query_object_parameter_table[] = { - GL_QUERY_RESULT_EXT, - GL_QUERY_RESULT_AVAILABLE_EXT, -}; + GL_QUERY_RESULT_EXT, GL_QUERY_RESULT_AVAILABLE_EXT, }; -static const GLenum valid_query_parameter_table[] = { - GL_CURRENT_QUERY_EXT, -}; +static const GLenum valid_query_parameter_table[] = {GL_CURRENT_QUERY_EXT, }; static const GLenum valid_query_target_table[] = { - GL_ANY_SAMPLES_PASSED_EXT, - GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, - GL_COMMANDS_ISSUED_CHROMIUM, - GL_LATENCY_QUERY_CHROMIUM, - GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM, - GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, -}; - -static const GLenum valid_read_pixel_format_table[] = { - GL_ALPHA, - GL_RGB, - GL_RGBA, -}; + GL_ANY_SAMPLES_PASSED_EXT, + GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, + GL_COMMANDS_ISSUED_CHROMIUM, + GL_LATENCY_QUERY_CHROMIUM, + GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM, + GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, }; + +static const GLenum valid_read_pixel_format_table[] = {GL_ALPHA, GL_RGB, + GL_RGBA, }; static const GLenum valid_read_pixel_type_table[] = { - GL_UNSIGNED_BYTE, - GL_UNSIGNED_SHORT_5_6_5, - GL_UNSIGNED_SHORT_4_4_4_4, - GL_UNSIGNED_SHORT_5_5_5_1, -}; + GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4, + GL_UNSIGNED_SHORT_5_5_5_1, }; static const GLenum valid_render_buffer_format_table[] = { - GL_RGBA4, - GL_RGB565, - GL_RGB5_A1, - GL_DEPTH_COMPONENT16, - GL_STENCIL_INDEX8, -}; + GL_RGBA4, GL_RGB565, GL_RGB5_A1, GL_DEPTH_COMPONENT16, GL_STENCIL_INDEX8, }; static const GLenum valid_render_buffer_parameter_table[] = { - GL_RENDERBUFFER_RED_SIZE, - GL_RENDERBUFFER_GREEN_SIZE, - GL_RENDERBUFFER_BLUE_SIZE, - GL_RENDERBUFFER_ALPHA_SIZE, - GL_RENDERBUFFER_DEPTH_SIZE, - GL_RENDERBUFFER_STENCIL_SIZE, - GL_RENDERBUFFER_WIDTH, - GL_RENDERBUFFER_HEIGHT, - GL_RENDERBUFFER_INTERNAL_FORMAT, -}; - -static const GLenum valid_render_buffer_target_table[] = { - GL_RENDERBUFFER, -}; + GL_RENDERBUFFER_RED_SIZE, GL_RENDERBUFFER_GREEN_SIZE, + GL_RENDERBUFFER_BLUE_SIZE, GL_RENDERBUFFER_ALPHA_SIZE, + GL_RENDERBUFFER_DEPTH_SIZE, GL_RENDERBUFFER_STENCIL_SIZE, + GL_RENDERBUFFER_WIDTH, GL_RENDERBUFFER_HEIGHT, + GL_RENDERBUFFER_INTERNAL_FORMAT, }; + +static const GLenum valid_render_buffer_target_table[] = {GL_RENDERBUFFER, }; static const GLenum valid_reset_status_table[] = { - GL_GUILTY_CONTEXT_RESET_ARB, - GL_INNOCENT_CONTEXT_RESET_ARB, - GL_UNKNOWN_CONTEXT_RESET_ARB, -}; + GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB, + GL_UNKNOWN_CONTEXT_RESET_ARB, }; static const GLenum valid_shader_parameter_table[] = { - GL_SHADER_TYPE, - GL_DELETE_STATUS, - GL_COMPILE_STATUS, - GL_INFO_LOG_LENGTH, - GL_SHADER_SOURCE_LENGTH, - GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, -}; + GL_SHADER_TYPE, GL_DELETE_STATUS, + GL_COMPILE_STATUS, GL_INFO_LOG_LENGTH, + GL_SHADER_SOURCE_LENGTH, GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, }; static const GLenum valid_shader_precision_table[] = { - GL_LOW_FLOAT, - GL_MEDIUM_FLOAT, - GL_HIGH_FLOAT, - GL_LOW_INT, - GL_MEDIUM_INT, - GL_HIGH_INT, -}; - -static const GLenum valid_shader_type_table[] = { - GL_VERTEX_SHADER, - GL_FRAGMENT_SHADER, -}; + GL_LOW_FLOAT, GL_MEDIUM_FLOAT, GL_HIGH_FLOAT, + GL_LOW_INT, GL_MEDIUM_INT, GL_HIGH_INT, }; + +static const GLenum valid_shader_type_table[] = {GL_VERTEX_SHADER, + GL_FRAGMENT_SHADER, }; static const GLenum valid_src_blend_factor_table[] = { - GL_ZERO, - GL_ONE, - GL_SRC_COLOR, - GL_ONE_MINUS_SRC_COLOR, - GL_DST_COLOR, - GL_ONE_MINUS_DST_COLOR, - GL_SRC_ALPHA, - GL_ONE_MINUS_SRC_ALPHA, - GL_DST_ALPHA, - GL_ONE_MINUS_DST_ALPHA, - GL_CONSTANT_COLOR, - GL_ONE_MINUS_CONSTANT_COLOR, - GL_CONSTANT_ALPHA, - GL_ONE_MINUS_CONSTANT_ALPHA, - GL_SRC_ALPHA_SATURATE, -}; + GL_ZERO, GL_ONE, + GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, + GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, + GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, + GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, + GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, + GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, + GL_SRC_ALPHA_SATURATE, }; static const GLenum valid_stencil_op_table[] = { - GL_KEEP, - GL_ZERO, - GL_REPLACE, - GL_INCR, - GL_INCR_WRAP, - GL_DECR, - GL_DECR_WRAP, - GL_INVERT, -}; + GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, + GL_INCR_WRAP, GL_DECR, GL_DECR_WRAP, GL_INVERT, }; static const GLenum valid_string_type_table[] = { - GL_VENDOR, - GL_RENDERER, - GL_VERSION, - GL_SHADING_LANGUAGE_VERSION, - GL_EXTENSIONS, -}; - -static const GLenum valid_texture_bind_target_table[] = { - GL_TEXTURE_2D, - GL_TEXTURE_CUBE_MAP, -}; - -static const GLint valid_texture_border_table[] = { - 0, -}; + GL_VENDOR, GL_RENDERER, GL_VERSION, + GL_SHADING_LANGUAGE_VERSION, GL_EXTENSIONS, }; + +static const GLenum valid_texture_bind_target_table[] = {GL_TEXTURE_2D, + GL_TEXTURE_CUBE_MAP, }; + +static const GLint valid_texture_border_table[] = {0, }; static const GLenum valid_texture_format_table[] = { - GL_ALPHA, - GL_LUMINANCE, - GL_LUMINANCE_ALPHA, - GL_RGB, - GL_RGBA, -}; + GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA, }; static const GLenum valid_texture_internal_format_table[] = { - GL_ALPHA, - GL_LUMINANCE, - GL_LUMINANCE_ALPHA, - GL_RGB, - GL_RGBA, -}; + GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA, }; static const GLenum valid_texture_internal_format_storage_table[] = { - GL_RGB565, - GL_RGBA4, - GL_RGB5_A1, - GL_ALPHA8_EXT, - GL_LUMINANCE8_EXT, - GL_LUMINANCE8_ALPHA8_EXT, - GL_RGB8_OES, - GL_RGBA8_OES, -}; - -static const GLenum valid_texture_mag_filter_mode_table[] = { - GL_NEAREST, - GL_LINEAR, -}; + GL_RGB565, GL_RGBA4, GL_RGB5_A1, GL_ALPHA8_EXT, + GL_LUMINANCE8_EXT, GL_LUMINANCE8_ALPHA8_EXT, GL_RGB8_OES, GL_RGBA8_OES, }; + +static const GLenum valid_texture_mag_filter_mode_table[] = {GL_NEAREST, + GL_LINEAR, }; static const GLenum valid_texture_min_filter_mode_table[] = { - GL_NEAREST, - GL_LINEAR, - GL_NEAREST_MIPMAP_NEAREST, - GL_LINEAR_MIPMAP_NEAREST, - GL_NEAREST_MIPMAP_LINEAR, - GL_LINEAR_MIPMAP_LINEAR, -}; + GL_NEAREST, GL_LINEAR, + GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, + GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_LINEAR, }; static const GLenum valid_texture_parameter_table[] = { - GL_TEXTURE_MAG_FILTER, - GL_TEXTURE_MIN_FILTER, - GL_TEXTURE_POOL_CHROMIUM, - GL_TEXTURE_WRAP_S, - GL_TEXTURE_WRAP_T, -}; + GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_POOL_CHROMIUM, + GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, }; static const GLenum valid_texture_pool_table[] = { - GL_TEXTURE_POOL_MANAGED_CHROMIUM, - GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, -}; + GL_TEXTURE_POOL_MANAGED_CHROMIUM, GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, }; static const GLenum valid_texture_target_table[] = { - GL_TEXTURE_2D, - GL_TEXTURE_CUBE_MAP_POSITIVE_X, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, -}; + GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, }; static const GLenum valid_texture_usage_table[] = { - GL_NONE, - GL_FRAMEBUFFER_ATTACHMENT_ANGLE, -}; + GL_NONE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE, }; static const GLenum valid_texture_wrap_mode_table[] = { - GL_CLAMP_TO_EDGE, - GL_MIRRORED_REPEAT, - GL_REPEAT, -}; - -static const GLint valid_vertex_attrib_size_table[] = { - 1, - 2, - 3, - 4, -}; + GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, GL_REPEAT, }; + +static const GLint valid_vertex_attrib_size_table[] = {1, 2, 3, 4, }; static const GLenum valid_vertex_attrib_type_table[] = { - GL_BYTE, - GL_UNSIGNED_BYTE, - GL_SHORT, - GL_UNSIGNED_SHORT, - GL_FLOAT, -}; + GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_FLOAT, }; static const GLenum valid_vertex_attribute_table[] = { - GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, - GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, - GL_VERTEX_ATTRIB_ARRAY_ENABLED, - GL_VERTEX_ATTRIB_ARRAY_SIZE, - GL_VERTEX_ATTRIB_ARRAY_STRIDE, - GL_VERTEX_ATTRIB_ARRAY_TYPE, - GL_CURRENT_VERTEX_ATTRIB, -}; + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, + GL_VERTEX_ATTRIB_ARRAY_ENABLED, GL_VERTEX_ATTRIB_ARRAY_SIZE, + GL_VERTEX_ATTRIB_ARRAY_STRIDE, GL_VERTEX_ATTRIB_ARRAY_TYPE, + GL_CURRENT_VERTEX_ATTRIB, }; static const GLenum valid_vertex_pointer_table[] = { - GL_VERTEX_ATTRIB_ARRAY_POINTER, -}; + GL_VERTEX_ATTRIB_ARRAY_POINTER, }; -static const GLint valid_zero_only_table[] = { - 0, -}; +static const GLint valid_zero_only_table[] = {0, }; Validators::Validators() - : attachment( - valid_attachment_table, arraysize(valid_attachment_table)), - backbuffer_attachment( - valid_backbuffer_attachment_table, arraysize( - valid_backbuffer_attachment_table)), - blit_filter( - valid_blit_filter_table, arraysize(valid_blit_filter_table)), - buffer_parameter( - valid_buffer_parameter_table, arraysize( - valid_buffer_parameter_table)), - buffer_target( - valid_buffer_target_table, arraysize(valid_buffer_target_table)), - buffer_usage( - valid_buffer_usage_table, arraysize(valid_buffer_usage_table)), - capability( - valid_capability_table, arraysize(valid_capability_table)), - cmp_function( - valid_cmp_function_table, arraysize(valid_cmp_function_table)), + : attachment(valid_attachment_table, arraysize(valid_attachment_table)), + backbuffer_attachment(valid_backbuffer_attachment_table, + arraysize(valid_backbuffer_attachment_table)), + blit_filter(valid_blit_filter_table, arraysize(valid_blit_filter_table)), + buffer_parameter(valid_buffer_parameter_table, + arraysize(valid_buffer_parameter_table)), + buffer_target(valid_buffer_target_table, + arraysize(valid_buffer_target_table)), + buffer_usage(valid_buffer_usage_table, + arraysize(valid_buffer_usage_table)), + capability(valid_capability_table, arraysize(valid_capability_table)), + cmp_function(valid_cmp_function_table, + arraysize(valid_cmp_function_table)), compressed_texture_format(), - draw_mode( - valid_draw_mode_table, arraysize(valid_draw_mode_table)), - dst_blend_factor( - valid_dst_blend_factor_table, arraysize( - valid_dst_blend_factor_table)), - equation( - valid_equation_table, arraysize(valid_equation_table)), - face_mode( - valid_face_mode_table, arraysize(valid_face_mode_table)), - face_type( - valid_face_type_table, arraysize(valid_face_type_table)), - false_only( - valid_false_only_table, arraysize(valid_false_only_table)), - frame_buffer_parameter( - valid_frame_buffer_parameter_table, arraysize( - valid_frame_buffer_parameter_table)), - frame_buffer_target( - valid_frame_buffer_target_table, arraysize( - valid_frame_buffer_target_table)), - g_l_state( - valid_g_l_state_table, arraysize(valid_g_l_state_table)), - get_max_index_type( - valid_get_max_index_type_table, arraysize( - valid_get_max_index_type_table)), - get_tex_param_target( - valid_get_tex_param_target_table, arraysize( - valid_get_tex_param_target_table)), - hint_mode( - valid_hint_mode_table, arraysize(valid_hint_mode_table)), - hint_target( - valid_hint_target_table, arraysize(valid_hint_target_table)), - index_type( - valid_index_type_table, arraysize(valid_index_type_table)), - pixel_store( - valid_pixel_store_table, arraysize(valid_pixel_store_table)), - pixel_store_alignment( - valid_pixel_store_alignment_table, arraysize( - valid_pixel_store_alignment_table)), - pixel_type( - valid_pixel_type_table, arraysize(valid_pixel_type_table)), - program_parameter( - valid_program_parameter_table, arraysize( - valid_program_parameter_table)), - query_object_parameter( - valid_query_object_parameter_table, arraysize( - valid_query_object_parameter_table)), - query_parameter( - valid_query_parameter_table, arraysize(valid_query_parameter_table)), - query_target( - valid_query_target_table, arraysize(valid_query_target_table)), - read_pixel_format( - valid_read_pixel_format_table, arraysize( - valid_read_pixel_format_table)), - read_pixel_type( - valid_read_pixel_type_table, arraysize(valid_read_pixel_type_table)), - render_buffer_format( - valid_render_buffer_format_table, arraysize( - valid_render_buffer_format_table)), - render_buffer_parameter( - valid_render_buffer_parameter_table, arraysize( - valid_render_buffer_parameter_table)), - render_buffer_target( - valid_render_buffer_target_table, arraysize( - valid_render_buffer_target_table)), - reset_status( - valid_reset_status_table, arraysize(valid_reset_status_table)), + draw_mode(valid_draw_mode_table, arraysize(valid_draw_mode_table)), + dst_blend_factor(valid_dst_blend_factor_table, + arraysize(valid_dst_blend_factor_table)), + equation(valid_equation_table, arraysize(valid_equation_table)), + face_mode(valid_face_mode_table, arraysize(valid_face_mode_table)), + face_type(valid_face_type_table, arraysize(valid_face_type_table)), + false_only(valid_false_only_table, arraysize(valid_false_only_table)), + frame_buffer_parameter(valid_frame_buffer_parameter_table, + arraysize(valid_frame_buffer_parameter_table)), + frame_buffer_target(valid_frame_buffer_target_table, + arraysize(valid_frame_buffer_target_table)), + g_l_state(valid_g_l_state_table, arraysize(valid_g_l_state_table)), + get_max_index_type(valid_get_max_index_type_table, + arraysize(valid_get_max_index_type_table)), + get_tex_param_target(valid_get_tex_param_target_table, + arraysize(valid_get_tex_param_target_table)), + hint_mode(valid_hint_mode_table, arraysize(valid_hint_mode_table)), + hint_target(valid_hint_target_table, arraysize(valid_hint_target_table)), + index_type(valid_index_type_table, arraysize(valid_index_type_table)), + pixel_store(valid_pixel_store_table, arraysize(valid_pixel_store_table)), + pixel_store_alignment(valid_pixel_store_alignment_table, + arraysize(valid_pixel_store_alignment_table)), + pixel_type(valid_pixel_type_table, arraysize(valid_pixel_type_table)), + program_parameter(valid_program_parameter_table, + arraysize(valid_program_parameter_table)), + query_object_parameter(valid_query_object_parameter_table, + arraysize(valid_query_object_parameter_table)), + query_parameter(valid_query_parameter_table, + arraysize(valid_query_parameter_table)), + query_target(valid_query_target_table, + arraysize(valid_query_target_table)), + read_pixel_format(valid_read_pixel_format_table, + arraysize(valid_read_pixel_format_table)), + read_pixel_type(valid_read_pixel_type_table, + arraysize(valid_read_pixel_type_table)), + render_buffer_format(valid_render_buffer_format_table, + arraysize(valid_render_buffer_format_table)), + render_buffer_parameter(valid_render_buffer_parameter_table, + arraysize(valid_render_buffer_parameter_table)), + render_buffer_target(valid_render_buffer_target_table, + arraysize(valid_render_buffer_target_table)), + reset_status(valid_reset_status_table, + arraysize(valid_reset_status_table)), shader_binary_format(), - shader_parameter( - valid_shader_parameter_table, arraysize( - valid_shader_parameter_table)), - shader_precision( - valid_shader_precision_table, arraysize( - valid_shader_precision_table)), - shader_type( - valid_shader_type_table, arraysize(valid_shader_type_table)), - src_blend_factor( - valid_src_blend_factor_table, arraysize( - valid_src_blend_factor_table)), - stencil_op( - valid_stencil_op_table, arraysize(valid_stencil_op_table)), - string_type( - valid_string_type_table, arraysize(valid_string_type_table)), - texture_bind_target( - valid_texture_bind_target_table, arraysize( - valid_texture_bind_target_table)), - texture_border( - valid_texture_border_table, arraysize(valid_texture_border_table)), - texture_format( - valid_texture_format_table, arraysize(valid_texture_format_table)), - texture_internal_format( - valid_texture_internal_format_table, arraysize( - valid_texture_internal_format_table)), + shader_parameter(valid_shader_parameter_table, + arraysize(valid_shader_parameter_table)), + shader_precision(valid_shader_precision_table, + arraysize(valid_shader_precision_table)), + shader_type(valid_shader_type_table, arraysize(valid_shader_type_table)), + src_blend_factor(valid_src_blend_factor_table, + arraysize(valid_src_blend_factor_table)), + stencil_op(valid_stencil_op_table, arraysize(valid_stencil_op_table)), + string_type(valid_string_type_table, arraysize(valid_string_type_table)), + texture_bind_target(valid_texture_bind_target_table, + arraysize(valid_texture_bind_target_table)), + texture_border(valid_texture_border_table, + arraysize(valid_texture_border_table)), + texture_format(valid_texture_format_table, + arraysize(valid_texture_format_table)), + texture_internal_format(valid_texture_internal_format_table, + arraysize(valid_texture_internal_format_table)), texture_internal_format_storage( - valid_texture_internal_format_storage_table, arraysize( - valid_texture_internal_format_storage_table)), - texture_mag_filter_mode( - valid_texture_mag_filter_mode_table, arraysize( - valid_texture_mag_filter_mode_table)), - texture_min_filter_mode( - valid_texture_min_filter_mode_table, arraysize( - valid_texture_min_filter_mode_table)), - texture_parameter( - valid_texture_parameter_table, arraysize( - valid_texture_parameter_table)), - texture_pool( - valid_texture_pool_table, arraysize(valid_texture_pool_table)), - texture_target( - valid_texture_target_table, arraysize(valid_texture_target_table)), - texture_usage( - valid_texture_usage_table, arraysize(valid_texture_usage_table)), - texture_wrap_mode( - valid_texture_wrap_mode_table, arraysize( - valid_texture_wrap_mode_table)), - vertex_attrib_size( - valid_vertex_attrib_size_table, arraysize( - valid_vertex_attrib_size_table)), - vertex_attrib_type( - valid_vertex_attrib_type_table, arraysize( - valid_vertex_attrib_type_table)), - vertex_attribute( - valid_vertex_attribute_table, arraysize( - valid_vertex_attribute_table)), - vertex_pointer( - valid_vertex_pointer_table, arraysize(valid_vertex_pointer_table)), - zero_only( - valid_zero_only_table, arraysize(valid_zero_only_table)) { -} - -#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_ // NOLINT - + valid_texture_internal_format_storage_table, + arraysize(valid_texture_internal_format_storage_table)), + texture_mag_filter_mode(valid_texture_mag_filter_mode_table, + arraysize(valid_texture_mag_filter_mode_table)), + texture_min_filter_mode(valid_texture_min_filter_mode_table, + arraysize(valid_texture_min_filter_mode_table)), + texture_parameter(valid_texture_parameter_table, + arraysize(valid_texture_parameter_table)), + texture_pool(valid_texture_pool_table, + arraysize(valid_texture_pool_table)), + texture_target(valid_texture_target_table, + arraysize(valid_texture_target_table)), + texture_usage(valid_texture_usage_table, + arraysize(valid_texture_usage_table)), + texture_wrap_mode(valid_texture_wrap_mode_table, + arraysize(valid_texture_wrap_mode_table)), + vertex_attrib_size(valid_vertex_attrib_size_table, + arraysize(valid_vertex_attrib_size_table)), + vertex_attrib_type(valid_vertex_attrib_type_table, + arraysize(valid_vertex_attrib_type_table)), + vertex_attribute(valid_vertex_attribute_table, + arraysize(valid_vertex_attribute_table)), + vertex_pointer(valid_vertex_pointer_table, + arraysize(valid_vertex_pointer_table)), + zero_only(valid_zero_only_table, arraysize(valid_zero_only_table)) {} + +#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_ + // // NOLINT diff --git a/mojo/public/gles2/gles2_call_visitor_autogen.h b/mojo/public/gles2/gles2_call_visitor_autogen.h index 8886afb..ef06a33 100644 --- a/mojo/public/gles2/gles2_call_visitor_autogen.h +++ b/mojo/public/gles2/gles2_call_visitor_autogen.h @@ -4,218 +4,296 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! VISIT_GL_CALL(ActiveTexture, void, (GLenum texture), (texture)) -VISIT_GL_CALL( - AttachShader, void, (GLuint program, GLuint shader), (program, shader)) -VISIT_GL_CALL( - BindAttribLocation, void, ( - GLuint program, GLuint index, const char* name), ( - program, index, name)) -VISIT_GL_CALL( - BindBuffer, void, (GLenum target, GLuint buffer), (target, buffer)) -VISIT_GL_CALL( - BindFramebuffer, void, ( - GLenum target, GLuint framebuffer), (target, framebuffer)) -VISIT_GL_CALL( - BindRenderbuffer, void, ( - GLenum target, GLuint renderbuffer), (target, renderbuffer)) -VISIT_GL_CALL( - BindTexture, void, (GLenum target, GLuint texture), (target, texture)) -VISIT_GL_CALL( - BlendColor, void, ( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), ( - red, green, blue, alpha)) +VISIT_GL_CALL(AttachShader, + void, + (GLuint program, GLuint shader), + (program, shader)) +VISIT_GL_CALL(BindAttribLocation, + void, + (GLuint program, GLuint index, const char* name), + (program, index, name)) +VISIT_GL_CALL(BindBuffer, + void, + (GLenum target, GLuint buffer), + (target, buffer)) +VISIT_GL_CALL(BindFramebuffer, + void, + (GLenum target, GLuint framebuffer), + (target, framebuffer)) +VISIT_GL_CALL(BindRenderbuffer, + void, + (GLenum target, GLuint renderbuffer), + (target, renderbuffer)) +VISIT_GL_CALL(BindTexture, + void, + (GLenum target, GLuint texture), + (target, texture)) +VISIT_GL_CALL(BlendColor, + void, + (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), + (red, green, blue, alpha)) VISIT_GL_CALL(BlendEquation, void, (GLenum mode), (mode)) -VISIT_GL_CALL( - BlendEquationSeparate, void, ( - GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha)) -VISIT_GL_CALL( - BlendFunc, void, (GLenum sfactor, GLenum dfactor), (sfactor, dfactor)) -VISIT_GL_CALL( - BlendFuncSeparate, void, ( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), ( - srcRGB, dstRGB, srcAlpha, dstAlpha)) -VISIT_GL_CALL( - BufferData, void, ( - GLenum target, GLsizeiptr size, const void* data, GLenum usage), ( - target, size, data, usage)) -VISIT_GL_CALL( - BufferSubData, void, ( - GLenum target, GLintptr offset, GLsizeiptr size, const void* data), ( - target, offset, size, data)) +VISIT_GL_CALL(BlendEquationSeparate, + void, + (GLenum modeRGB, GLenum modeAlpha), + (modeRGB, modeAlpha)) +VISIT_GL_CALL(BlendFunc, + void, + (GLenum sfactor, GLenum dfactor), + (sfactor, dfactor)) +VISIT_GL_CALL(BlendFuncSeparate, + void, + (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), + (srcRGB, dstRGB, srcAlpha, dstAlpha)) +VISIT_GL_CALL(BufferData, + void, + (GLenum target, GLsizeiptr size, const void* data, GLenum usage), + (target, size, data, usage)) +VISIT_GL_CALL( + BufferSubData, + void, + (GLenum target, GLintptr offset, GLsizeiptr size, const void* data), + (target, offset, size, data)) VISIT_GL_CALL(CheckFramebufferStatus, GLenum, (GLenum target), (target)) VISIT_GL_CALL(Clear, void, (GLbitfield mask), (mask)) -VISIT_GL_CALL( - ClearColor, void, ( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), ( - red, green, blue, alpha)) +VISIT_GL_CALL(ClearColor, + void, + (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), + (red, green, blue, alpha)) VISIT_GL_CALL(ClearDepthf, void, (GLclampf depth), (depth)) VISIT_GL_CALL(ClearStencil, void, (GLint s), (s)) -VISIT_GL_CALL( - ColorMask, void, ( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha), ( - red, green, blue, alpha)) +VISIT_GL_CALL(ColorMask, + void, + (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha), + (red, green, blue, alpha)) VISIT_GL_CALL(CompileShader, void, (GLuint shader), (shader)) VISIT_GL_CALL( - CompressedTexImage2D, void, ( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, const void* data), ( - target, level, internalformat, width, height, border, imageSize, - data)) -VISIT_GL_CALL( - CompressedTexSubImage2D, void, ( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, const void* data), ( - target, level, xoffset, yoffset, width, height, format, imageSize, - data)) -VISIT_GL_CALL( - CopyTexImage2D, void, ( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border), ( - target, level, internalformat, x, y, width, height, border)) -VISIT_GL_CALL( - CopyTexSubImage2D, void, ( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, - GLint y, GLsizei width, GLsizei height), ( - target, level, xoffset, yoffset, x, y, width, height)) + CompressedTexImage2D, + void, + (GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data), + (target, level, internalformat, width, height, border, imageSize, data)) +VISIT_GL_CALL( + CompressedTexSubImage2D, + void, + (GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data), + (target, level, xoffset, yoffset, width, height, format, imageSize, data)) +VISIT_GL_CALL(CopyTexImage2D, + void, + (GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border), + (target, level, internalformat, x, y, width, height, border)) +VISIT_GL_CALL(CopyTexSubImage2D, + void, + (GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height), + (target, level, xoffset, yoffset, x, y, width, height)) VISIT_GL_CALL(CreateProgram, GLuint, (), ()) VISIT_GL_CALL(CreateShader, GLuint, (GLenum type), (type)) VISIT_GL_CALL(CullFace, void, (GLenum mode), (mode)) -VISIT_GL_CALL( - DeleteBuffers, void, (GLsizei n, const GLuint* buffers), (n, buffers)) -VISIT_GL_CALL( - DeleteFramebuffers, void, ( - GLsizei n, const GLuint* framebuffers), (n, framebuffers)) +VISIT_GL_CALL(DeleteBuffers, + void, + (GLsizei n, const GLuint* buffers), + (n, buffers)) +VISIT_GL_CALL(DeleteFramebuffers, + void, + (GLsizei n, const GLuint* framebuffers), + (n, framebuffers)) VISIT_GL_CALL(DeleteProgram, void, (GLuint program), (program)) -VISIT_GL_CALL( - DeleteRenderbuffers, void, ( - GLsizei n, const GLuint* renderbuffers), (n, renderbuffers)) +VISIT_GL_CALL(DeleteRenderbuffers, + void, + (GLsizei n, const GLuint* renderbuffers), + (n, renderbuffers)) VISIT_GL_CALL(DeleteShader, void, (GLuint shader), (shader)) -VISIT_GL_CALL( - DeleteTextures, void, (GLsizei n, const GLuint* textures), (n, textures)) +VISIT_GL_CALL(DeleteTextures, + void, + (GLsizei n, const GLuint* textures), + (n, textures)) VISIT_GL_CALL(DepthFunc, void, (GLenum func), (func)) VISIT_GL_CALL(DepthMask, void, (GLboolean flag), (flag)) -VISIT_GL_CALL( - DepthRangef, void, (GLclampf zNear, GLclampf zFar), (zNear, zFar)) -VISIT_GL_CALL( - DetachShader, void, (GLuint program, GLuint shader), (program, shader)) +VISIT_GL_CALL(DepthRangef, void, (GLclampf zNear, GLclampf zFar), (zNear, zFar)) +VISIT_GL_CALL(DetachShader, + void, + (GLuint program, GLuint shader), + (program, shader)) VISIT_GL_CALL(Disable, void, (GLenum cap), (cap)) VISIT_GL_CALL(DisableVertexAttribArray, void, (GLuint index), (index)) -VISIT_GL_CALL( - DrawArrays, void, ( - GLenum mode, GLint first, GLsizei count), (mode, first, count)) -VISIT_GL_CALL( - DrawElements, void, ( - GLenum mode, GLsizei count, GLenum type, const void* indices), ( - mode, count, type, indices)) +VISIT_GL_CALL(DrawArrays, + void, + (GLenum mode, GLint first, GLsizei count), + (mode, first, count)) +VISIT_GL_CALL(DrawElements, + void, + (GLenum mode, GLsizei count, GLenum type, const void* indices), + (mode, count, type, indices)) VISIT_GL_CALL(Enable, void, (GLenum cap), (cap)) VISIT_GL_CALL(EnableVertexAttribArray, void, (GLuint index), (index)) VISIT_GL_CALL(Finish, void, (), ()) VISIT_GL_CALL(Flush, void, (), ()) -VISIT_GL_CALL( - FramebufferRenderbuffer, void, ( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer), ( - target, attachment, renderbuffertarget, renderbuffer)) -VISIT_GL_CALL( - FramebufferTexture2D, void, ( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level), (target, attachment, textarget, texture, level)) +VISIT_GL_CALL(FramebufferRenderbuffer, + void, + (GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer), + (target, attachment, renderbuffertarget, renderbuffer)) +VISIT_GL_CALL(FramebufferTexture2D, + void, + (GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level), + (target, attachment, textarget, texture, level)) VISIT_GL_CALL(FrontFace, void, (GLenum mode), (mode)) VISIT_GL_CALL(GenBuffers, void, (GLsizei n, GLuint* buffers), (n, buffers)) VISIT_GL_CALL(GenerateMipmap, void, (GLenum target), (target)) -VISIT_GL_CALL( - GenFramebuffers, void, ( - GLsizei n, GLuint* framebuffers), (n, framebuffers)) -VISIT_GL_CALL( - GenRenderbuffers, void, ( - GLsizei n, GLuint* renderbuffers), (n, renderbuffers)) +VISIT_GL_CALL(GenFramebuffers, + void, + (GLsizei n, GLuint* framebuffers), + (n, framebuffers)) +VISIT_GL_CALL(GenRenderbuffers, + void, + (GLsizei n, GLuint* renderbuffers), + (n, renderbuffers)) VISIT_GL_CALL(GenTextures, void, (GLsizei n, GLuint* textures), (n, textures)) -VISIT_GL_CALL( - GetActiveAttrib, void, ( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, - GLint* size, GLenum* type, char* name), ( - program, index, bufsize, length, size, type, name)) -VISIT_GL_CALL( - GetActiveUniform, void, ( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, - GLint* size, GLenum* type, char* name), ( - program, index, bufsize, length, size, type, name)) -VISIT_GL_CALL( - GetAttachedShaders, void, ( - GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders), ( - program, maxcount, count, shaders)) -VISIT_GL_CALL( - GetAttribLocation, GLint, ( - GLuint program, const char* name), (program, name)) -VISIT_GL_CALL( - GetBooleanv, void, (GLenum pname, GLboolean* params), (pname, params)) -VISIT_GL_CALL( - GetBufferParameteriv, void, ( - GLenum target, GLenum pname, GLint* params), (target, pname, params)) +VISIT_GL_CALL(GetActiveAttrib, + void, + (GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name), + (program, index, bufsize, length, size, type, name)) +VISIT_GL_CALL(GetActiveUniform, + void, + (GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name), + (program, index, bufsize, length, size, type, name)) +VISIT_GL_CALL( + GetAttachedShaders, + void, + (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders), + (program, maxcount, count, shaders)) +VISIT_GL_CALL(GetAttribLocation, + GLint, + (GLuint program, const char* name), + (program, name)) +VISIT_GL_CALL(GetBooleanv, + void, + (GLenum pname, GLboolean* params), + (pname, params)) +VISIT_GL_CALL(GetBufferParameteriv, + void, + (GLenum target, GLenum pname, GLint* params), + (target, pname, params)) VISIT_GL_CALL(GetError, GLenum, (), ()) -VISIT_GL_CALL( - GetFloatv, void, (GLenum pname, GLfloat* params), (pname, params)) -VISIT_GL_CALL( - GetFramebufferAttachmentParameteriv, void, ( - GLenum target, GLenum attachment, GLenum pname, GLint* params), ( - target, attachment, pname, params)) -VISIT_GL_CALL( - GetIntegerv, void, (GLenum pname, GLint* params), (pname, params)) -VISIT_GL_CALL( - GetProgramiv, void, ( - GLuint program, GLenum pname, GLint* params), (program, pname, params)) -VISIT_GL_CALL( - GetProgramInfoLog, void, ( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog), ( - program, bufsize, length, infolog)) -VISIT_GL_CALL( - GetRenderbufferParameteriv, void, ( - GLenum target, GLenum pname, GLint* params), (target, pname, params)) -VISIT_GL_CALL( - GetShaderiv, void, ( - GLuint shader, GLenum pname, GLint* params), (shader, pname, params)) -VISIT_GL_CALL( - GetShaderInfoLog, void, ( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog), ( - shader, bufsize, length, infolog)) -VISIT_GL_CALL( - GetShaderPrecisionFormat, void, ( - GLenum shadertype, GLenum precisiontype, GLint* range, - GLint* precision), (shadertype, precisiontype, range, precision)) -VISIT_GL_CALL( - GetShaderSource, void, ( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source), ( - shader, bufsize, length, source)) +VISIT_GL_CALL(GetFloatv, void, (GLenum pname, GLfloat* params), (pname, params)) +VISIT_GL_CALL(GetFramebufferAttachmentParameteriv, + void, + (GLenum target, GLenum attachment, GLenum pname, GLint* params), + (target, attachment, pname, params)) +VISIT_GL_CALL(GetIntegerv, void, (GLenum pname, GLint* params), (pname, params)) +VISIT_GL_CALL(GetProgramiv, + void, + (GLuint program, GLenum pname, GLint* params), + (program, pname, params)) +VISIT_GL_CALL(GetProgramInfoLog, + void, + (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog), + (program, bufsize, length, infolog)) +VISIT_GL_CALL(GetRenderbufferParameteriv, + void, + (GLenum target, GLenum pname, GLint* params), + (target, pname, params)) +VISIT_GL_CALL(GetShaderiv, + void, + (GLuint shader, GLenum pname, GLint* params), + (shader, pname, params)) +VISIT_GL_CALL(GetShaderInfoLog, + void, + (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog), + (shader, bufsize, length, infolog)) +VISIT_GL_CALL( + GetShaderPrecisionFormat, + void, + (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision), + (shadertype, precisiontype, range, precision)) +VISIT_GL_CALL(GetShaderSource, + void, + (GLuint shader, GLsizei bufsize, GLsizei* length, char* source), + (shader, bufsize, length, source)) VISIT_GL_CALL(GetString, const GLubyte*, (GLenum name), (name)) -VISIT_GL_CALL( - GetTexParameterfv, void, ( - GLenum target, GLenum pname, GLfloat* params), (target, pname, params)) -VISIT_GL_CALL( - GetTexParameteriv, void, ( - GLenum target, GLenum pname, GLint* params), (target, pname, params)) -VISIT_GL_CALL( - GetUniformfv, void, ( - GLuint program, GLint location, GLfloat* params), ( - program, location, params)) -VISIT_GL_CALL( - GetUniformiv, void, ( - GLuint program, GLint location, GLint* params), ( - program, location, params)) -VISIT_GL_CALL( - GetUniformLocation, GLint, ( - GLuint program, const char* name), (program, name)) -VISIT_GL_CALL( - GetVertexAttribfv, void, ( - GLuint index, GLenum pname, GLfloat* params), (index, pname, params)) -VISIT_GL_CALL( - GetVertexAttribiv, void, ( - GLuint index, GLenum pname, GLint* params), (index, pname, params)) -VISIT_GL_CALL( - GetVertexAttribPointerv, void, ( - GLuint index, GLenum pname, void** pointer), (index, pname, pointer)) +VISIT_GL_CALL(GetTexParameterfv, + void, + (GLenum target, GLenum pname, GLfloat* params), + (target, pname, params)) +VISIT_GL_CALL(GetTexParameteriv, + void, + (GLenum target, GLenum pname, GLint* params), + (target, pname, params)) +VISIT_GL_CALL(GetUniformfv, + void, + (GLuint program, GLint location, GLfloat* params), + (program, location, params)) +VISIT_GL_CALL(GetUniformiv, + void, + (GLuint program, GLint location, GLint* params), + (program, location, params)) +VISIT_GL_CALL(GetUniformLocation, + GLint, + (GLuint program, const char* name), + (program, name)) +VISIT_GL_CALL(GetVertexAttribfv, + void, + (GLuint index, GLenum pname, GLfloat* params), + (index, pname, params)) +VISIT_GL_CALL(GetVertexAttribiv, + void, + (GLuint index, GLenum pname, GLint* params), + (index, pname, params)) +VISIT_GL_CALL(GetVertexAttribPointerv, + void, + (GLuint index, GLenum pname, void** pointer), + (index, pname, pointer)) VISIT_GL_CALL(Hint, void, (GLenum target, GLenum mode), (target, mode)) VISIT_GL_CALL(IsBuffer, GLboolean, (GLuint buffer), (buffer)) VISIT_GL_CALL(IsEnabled, GLboolean, (GLenum cap), (cap)) @@ -227,163 +305,233 @@ VISIT_GL_CALL(IsTexture, GLboolean, (GLuint texture), (texture)) VISIT_GL_CALL(LineWidth, void, (GLfloat width), (width)) VISIT_GL_CALL(LinkProgram, void, (GLuint program), (program)) VISIT_GL_CALL(PixelStorei, void, (GLenum pname, GLint param), (pname, param)) -VISIT_GL_CALL( - PolygonOffset, void, (GLfloat factor, GLfloat units), (factor, units)) -VISIT_GL_CALL( - ReadPixels, void, ( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, - GLenum type, void* pixels), ( - x, y, width, height, format, type, pixels)) +VISIT_GL_CALL(PolygonOffset, + void, + (GLfloat factor, GLfloat units), + (factor, units)) +VISIT_GL_CALL(ReadPixels, + void, + (GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels), + (x, y, width, height, format, type, pixels)) VISIT_GL_CALL(ReleaseShaderCompiler, void, (), ()) VISIT_GL_CALL( - RenderbufferStorage, void, ( - GLenum target, GLenum internalformat, GLsizei width, GLsizei height), ( - target, internalformat, width, height)) -VISIT_GL_CALL( - SampleCoverage, void, (GLclampf value, GLboolean invert), (value, invert)) -VISIT_GL_CALL( - Scissor, void, ( - GLint x, GLint y, GLsizei width, GLsizei height), ( - x, y, width, height)) -VISIT_GL_CALL( - ShaderBinary, void, ( - GLsizei n, const GLuint* shaders, GLenum binaryformat, - const void* binary, GLsizei length), ( - n, shaders, binaryformat, binary, length)) -VISIT_GL_CALL( - ShaderSource, void, ( - GLuint shader, GLsizei count, const GLchar* const* str, - const GLint* length), (shader, count, str, length)) -VISIT_GL_CALL( - StencilFunc, void, ( - GLenum func, GLint ref, GLuint mask), (func, ref, mask)) -VISIT_GL_CALL( - StencilFuncSeparate, void, ( - GLenum face, GLenum func, GLint ref, GLuint mask), ( - face, func, ref, mask)) + RenderbufferStorage, + void, + (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), + (target, internalformat, width, height)) +VISIT_GL_CALL(SampleCoverage, + void, + (GLclampf value, GLboolean invert), + (value, invert)) +VISIT_GL_CALL(Scissor, + void, + (GLint x, GLint y, GLsizei width, GLsizei height), + (x, y, width, height)) +VISIT_GL_CALL(ShaderBinary, + void, + (GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length), + (n, shaders, binaryformat, binary, length)) +VISIT_GL_CALL(ShaderSource, + void, + (GLuint shader, + GLsizei count, + const GLchar* const* str, + const GLint* length), + (shader, count, str, length)) +VISIT_GL_CALL(StencilFunc, + void, + (GLenum func, GLint ref, GLuint mask), + (func, ref, mask)) +VISIT_GL_CALL(StencilFuncSeparate, + void, + (GLenum face, GLenum func, GLint ref, GLuint mask), + (face, func, ref, mask)) VISIT_GL_CALL(StencilMask, void, (GLuint mask), (mask)) -VISIT_GL_CALL( - StencilMaskSeparate, void, (GLenum face, GLuint mask), (face, mask)) -VISIT_GL_CALL( - StencilOp, void, ( - GLenum fail, GLenum zfail, GLenum zpass), (fail, zfail, zpass)) -VISIT_GL_CALL( - StencilOpSeparate, void, ( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass), ( - face, fail, zfail, zpass)) -VISIT_GL_CALL( - TexImage2D, void, ( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels), ( - target, level, internalformat, width, height, border, format, type, - pixels)) -VISIT_GL_CALL( - TexParameterf, void, ( - GLenum target, GLenum pname, GLfloat param), (target, pname, param)) -VISIT_GL_CALL( - TexParameterfv, void, ( - GLenum target, GLenum pname, const GLfloat* params), ( - target, pname, params)) -VISIT_GL_CALL( - TexParameteri, void, ( - GLenum target, GLenum pname, GLint param), (target, pname, param)) -VISIT_GL_CALL( - TexParameteriv, void, ( - GLenum target, GLenum pname, const GLint* params), ( - target, pname, params)) -VISIT_GL_CALL( - TexSubImage2D, void, ( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels), ( - target, level, xoffset, yoffset, width, height, format, type, - pixels)) +VISIT_GL_CALL(StencilMaskSeparate, + void, + (GLenum face, GLuint mask), + (face, mask)) +VISIT_GL_CALL(StencilOp, + void, + (GLenum fail, GLenum zfail, GLenum zpass), + (fail, zfail, zpass)) +VISIT_GL_CALL(StencilOpSeparate, + void, + (GLenum face, GLenum fail, GLenum zfail, GLenum zpass), + (face, fail, zfail, zpass)) +VISIT_GL_CALL(TexImage2D, + void, + (GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels), + (target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels)) +VISIT_GL_CALL(TexParameterf, + void, + (GLenum target, GLenum pname, GLfloat param), + (target, pname, param)) +VISIT_GL_CALL(TexParameterfv, + void, + (GLenum target, GLenum pname, const GLfloat* params), + (target, pname, params)) +VISIT_GL_CALL(TexParameteri, + void, + (GLenum target, GLenum pname, GLint param), + (target, pname, param)) +VISIT_GL_CALL(TexParameteriv, + void, + (GLenum target, GLenum pname, const GLint* params), + (target, pname, params)) +VISIT_GL_CALL( + TexSubImage2D, + void, + (GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels), + (target, level, xoffset, yoffset, width, height, format, type, pixels)) VISIT_GL_CALL(Uniform1f, void, (GLint location, GLfloat x), (location, x)) -VISIT_GL_CALL( - Uniform1fv, void, ( - GLint location, GLsizei count, const GLfloat* v), (location, count, v)) +VISIT_GL_CALL(Uniform1fv, + void, + (GLint location, GLsizei count, const GLfloat* v), + (location, count, v)) VISIT_GL_CALL(Uniform1i, void, (GLint location, GLint x), (location, x)) -VISIT_GL_CALL( - Uniform1iv, void, ( - GLint location, GLsizei count, const GLint* v), (location, count, v)) -VISIT_GL_CALL( - Uniform2f, void, (GLint location, GLfloat x, GLfloat y), (location, x, y)) -VISIT_GL_CALL( - Uniform2fv, void, ( - GLint location, GLsizei count, const GLfloat* v), (location, count, v)) -VISIT_GL_CALL( - Uniform2i, void, (GLint location, GLint x, GLint y), (location, x, y)) -VISIT_GL_CALL( - Uniform2iv, void, ( - GLint location, GLsizei count, const GLint* v), (location, count, v)) -VISIT_GL_CALL( - Uniform3f, void, ( - GLint location, GLfloat x, GLfloat y, GLfloat z), (location, x, y, z)) -VISIT_GL_CALL( - Uniform3fv, void, ( - GLint location, GLsizei count, const GLfloat* v), (location, count, v)) -VISIT_GL_CALL( - Uniform3i, void, ( - GLint location, GLint x, GLint y, GLint z), (location, x, y, z)) -VISIT_GL_CALL( - Uniform3iv, void, ( - GLint location, GLsizei count, const GLint* v), (location, count, v)) -VISIT_GL_CALL( - Uniform4f, void, ( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), ( - location, x, y, z, w)) -VISIT_GL_CALL( - Uniform4fv, void, ( - GLint location, GLsizei count, const GLfloat* v), (location, count, v)) -VISIT_GL_CALL( - Uniform4i, void, ( - GLint location, GLint x, GLint y, GLint z, GLint w), ( - location, x, y, z, w)) -VISIT_GL_CALL( - Uniform4iv, void, ( - GLint location, GLsizei count, const GLint* v), (location, count, v)) -VISIT_GL_CALL( - UniformMatrix2fv, void, ( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value), (location, count, transpose, value)) -VISIT_GL_CALL( - UniformMatrix3fv, void, ( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value), (location, count, transpose, value)) -VISIT_GL_CALL( - UniformMatrix4fv, void, ( - GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value), (location, count, transpose, value)) +VISIT_GL_CALL(Uniform1iv, + void, + (GLint location, GLsizei count, const GLint* v), + (location, count, v)) +VISIT_GL_CALL(Uniform2f, + void, + (GLint location, GLfloat x, GLfloat y), + (location, x, y)) +VISIT_GL_CALL(Uniform2fv, + void, + (GLint location, GLsizei count, const GLfloat* v), + (location, count, v)) +VISIT_GL_CALL(Uniform2i, + void, + (GLint location, GLint x, GLint y), + (location, x, y)) +VISIT_GL_CALL(Uniform2iv, + void, + (GLint location, GLsizei count, const GLint* v), + (location, count, v)) +VISIT_GL_CALL(Uniform3f, + void, + (GLint location, GLfloat x, GLfloat y, GLfloat z), + (location, x, y, z)) +VISIT_GL_CALL(Uniform3fv, + void, + (GLint location, GLsizei count, const GLfloat* v), + (location, count, v)) +VISIT_GL_CALL(Uniform3i, + void, + (GLint location, GLint x, GLint y, GLint z), + (location, x, y, z)) +VISIT_GL_CALL(Uniform3iv, + void, + (GLint location, GLsizei count, const GLint* v), + (location, count, v)) +VISIT_GL_CALL(Uniform4f, + void, + (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), + (location, x, y, z, w)) +VISIT_GL_CALL(Uniform4fv, + void, + (GLint location, GLsizei count, const GLfloat* v), + (location, count, v)) +VISIT_GL_CALL(Uniform4i, + void, + (GLint location, GLint x, GLint y, GLint z, GLint w), + (location, x, y, z, w)) +VISIT_GL_CALL(Uniform4iv, + void, + (GLint location, GLsizei count, const GLint* v), + (location, count, v)) +VISIT_GL_CALL( + UniformMatrix2fv, + void, + (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), + (location, count, transpose, value)) +VISIT_GL_CALL( + UniformMatrix3fv, + void, + (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), + (location, count, transpose, value)) +VISIT_GL_CALL( + UniformMatrix4fv, + void, + (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), + (location, count, transpose, value)) VISIT_GL_CALL(UseProgram, void, (GLuint program), (program)) VISIT_GL_CALL(ValidateProgram, void, (GLuint program), (program)) VISIT_GL_CALL(VertexAttrib1f, void, (GLuint indx, GLfloat x), (indx, x)) -VISIT_GL_CALL( - VertexAttrib1fv, void, ( - GLuint indx, const GLfloat* values), (indx, values)) -VISIT_GL_CALL( - VertexAttrib2f, void, (GLuint indx, GLfloat x, GLfloat y), (indx, x, y)) -VISIT_GL_CALL( - VertexAttrib2fv, void, ( - GLuint indx, const GLfloat* values), (indx, values)) -VISIT_GL_CALL( - VertexAttrib3f, void, ( - GLuint indx, GLfloat x, GLfloat y, GLfloat z), (indx, x, y, z)) -VISIT_GL_CALL( - VertexAttrib3fv, void, ( - GLuint indx, const GLfloat* values), (indx, values)) -VISIT_GL_CALL( - VertexAttrib4f, void, ( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w), ( - indx, x, y, z, w)) -VISIT_GL_CALL( - VertexAttrib4fv, void, ( - GLuint indx, const GLfloat* values), (indx, values)) -VISIT_GL_CALL( - VertexAttribPointer, void, ( - GLuint indx, GLint size, GLenum type, GLboolean normalized, - GLsizei stride, const void* ptr), ( - indx, size, type, normalized, stride, ptr)) -VISIT_GL_CALL( - Viewport, void, ( - GLint x, GLint y, GLsizei width, GLsizei height), ( - x, y, width, height)) +VISIT_GL_CALL(VertexAttrib1fv, + void, + (GLuint indx, const GLfloat* values), + (indx, values)) +VISIT_GL_CALL(VertexAttrib2f, + void, + (GLuint indx, GLfloat x, GLfloat y), + (indx, x, y)) +VISIT_GL_CALL(VertexAttrib2fv, + void, + (GLuint indx, const GLfloat* values), + (indx, values)) +VISIT_GL_CALL(VertexAttrib3f, + void, + (GLuint indx, GLfloat x, GLfloat y, GLfloat z), + (indx, x, y, z)) +VISIT_GL_CALL(VertexAttrib3fv, + void, + (GLuint indx, const GLfloat* values), + (indx, values)) +VISIT_GL_CALL(VertexAttrib4f, + void, + (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w), + (indx, x, y, z, w)) +VISIT_GL_CALL(VertexAttrib4fv, + void, + (GLuint indx, const GLfloat* values), + (indx, values)) +VISIT_GL_CALL(VertexAttribPointer, + void, + (GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr), + (indx, size, type, normalized, stride, ptr)) +VISIT_GL_CALL(Viewport, + void, + (GLint x, GLint y, GLsizei width, GLsizei height), + (x, y, width, height)) diff --git a/ppapi/c/dev/ppb_opengles2ext_dev.h b/ppapi/c/dev/ppb_opengles2ext_dev.h index f84333e..56f4101 100644 --- a/ppapi/c/dev/ppb_opengles2ext_dev.h +++ b/ppapi/c/dev/ppb_opengles2ext_dev.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // OpenGL ES interface. @@ -14,4 +16,3 @@ #include "ppapi/c/ppb_opengles2.h" #endif // PPAPI_C_DEV_PPB_OPENGLES2EXT_DEV_H_ - diff --git a/ppapi/c/ppb_opengles2.h b/ppapi/c/ppb_opengles2.h index 551dcbc..d689d53 100644 --- a/ppapi/c/ppb_opengles2.h +++ b/ppapi/c/ppb_opengles2.h @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! // OpenGL ES interface. @@ -43,151 +45,249 @@ typedef long int GLsizeiptr; struct PPB_OpenGLES2 { void (*ActiveTexture)(PP_Resource context, GLenum texture); void (*AttachShader)(PP_Resource context, GLuint program, GLuint shader); - void (*BindAttribLocation)( - PP_Resource context, GLuint program, GLuint index, const char* name); + void (*BindAttribLocation)(PP_Resource context, + GLuint program, + GLuint index, + const char* name); void (*BindBuffer)(PP_Resource context, GLenum target, GLuint buffer); - void (*BindFramebuffer)( - PP_Resource context, GLenum target, GLuint framebuffer); - void (*BindRenderbuffer)( - PP_Resource context, GLenum target, GLuint renderbuffer); + void (*BindFramebuffer)(PP_Resource context, + GLenum target, + GLuint framebuffer); + void (*BindRenderbuffer)(PP_Resource context, + GLenum target, + GLuint renderbuffer); void (*BindTexture)(PP_Resource context, GLenum target, GLuint texture); - void (*BlendColor)( - PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, - GLclampf alpha); + void (*BlendColor)(PP_Resource context, + GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha); void (*BlendEquation)(PP_Resource context, GLenum mode); - void (*BlendEquationSeparate)( - PP_Resource context, GLenum modeRGB, GLenum modeAlpha); + void (*BlendEquationSeparate)(PP_Resource context, + GLenum modeRGB, + GLenum modeAlpha); void (*BlendFunc)(PP_Resource context, GLenum sfactor, GLenum dfactor); - void (*BlendFuncSeparate)( - PP_Resource context, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, - GLenum dstAlpha); - void (*BufferData)( - PP_Resource context, GLenum target, GLsizeiptr size, const void* data, - GLenum usage); - void (*BufferSubData)( - PP_Resource context, GLenum target, GLintptr offset, GLsizeiptr size, - const void* data); + void (*BlendFuncSeparate)(PP_Resource context, + GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha); + void (*BufferData)(PP_Resource context, + GLenum target, + GLsizeiptr size, + const void* data, + GLenum usage); + void (*BufferSubData)(PP_Resource context, + GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data); GLenum (*CheckFramebufferStatus)(PP_Resource context, GLenum target); void (*Clear)(PP_Resource context, GLbitfield mask); - void (*ClearColor)( - PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, - GLclampf alpha); + void (*ClearColor)(PP_Resource context, + GLclampf red, + GLclampf green, + GLclampf blue, + GLclampf alpha); void (*ClearDepthf)(PP_Resource context, GLclampf depth); void (*ClearStencil)(PP_Resource context, GLint s); - void (*ColorMask)( - PP_Resource context, GLboolean red, GLboolean green, GLboolean blue, - GLboolean alpha); + void (*ColorMask)(PP_Resource context, + GLboolean red, + GLboolean green, + GLboolean blue, + GLboolean alpha); void (*CompileShader)(PP_Resource context, GLuint shader); - void (*CompressedTexImage2D)( - PP_Resource context, GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLint border, GLsizei imageSize, - const void* data); - void (*CompressedTexSubImage2D)( - PP_Resource context, GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, - GLsizei imageSize, const void* data); - void (*CopyTexImage2D)( - PP_Resource context, GLenum target, GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLsizei height, GLint border); - void (*CopyTexSubImage2D)( - PP_Resource context, GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); + void (*CompressedTexImage2D)(PP_Resource context, + GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data); + void (*CompressedTexSubImage2D)(PP_Resource context, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data); + void (*CopyTexImage2D)(PP_Resource context, + GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border); + void (*CopyTexSubImage2D)(PP_Resource context, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height); GLuint (*CreateProgram)(PP_Resource context); GLuint (*CreateShader)(PP_Resource context, GLenum type); void (*CullFace)(PP_Resource context, GLenum mode); void (*DeleteBuffers)(PP_Resource context, GLsizei n, const GLuint* buffers); - void (*DeleteFramebuffers)( - PP_Resource context, GLsizei n, const GLuint* framebuffers); + void (*DeleteFramebuffers)(PP_Resource context, + GLsizei n, + const GLuint* framebuffers); void (*DeleteProgram)(PP_Resource context, GLuint program); - void (*DeleteRenderbuffers)( - PP_Resource context, GLsizei n, const GLuint* renderbuffers); + void (*DeleteRenderbuffers)(PP_Resource context, + GLsizei n, + const GLuint* renderbuffers); void (*DeleteShader)(PP_Resource context, GLuint shader); - void (*DeleteTextures)( - PP_Resource context, GLsizei n, const GLuint* textures); + void (*DeleteTextures)(PP_Resource context, + GLsizei n, + const GLuint* textures); void (*DepthFunc)(PP_Resource context, GLenum func); void (*DepthMask)(PP_Resource context, GLboolean flag); void (*DepthRangef)(PP_Resource context, GLclampf zNear, GLclampf zFar); void (*DetachShader)(PP_Resource context, GLuint program, GLuint shader); void (*Disable)(PP_Resource context, GLenum cap); void (*DisableVertexAttribArray)(PP_Resource context, GLuint index); - void (*DrawArrays)( - PP_Resource context, GLenum mode, GLint first, GLsizei count); - void (*DrawElements)( - PP_Resource context, GLenum mode, GLsizei count, GLenum type, - const void* indices); + void (*DrawArrays)(PP_Resource context, + GLenum mode, + GLint first, + GLsizei count); + void (*DrawElements)(PP_Resource context, + GLenum mode, + GLsizei count, + GLenum type, + const void* indices); void (*Enable)(PP_Resource context, GLenum cap); void (*EnableVertexAttribArray)(PP_Resource context, GLuint index); void (*Finish)(PP_Resource context); void (*Flush)(PP_Resource context); - void (*FramebufferRenderbuffer)( - PP_Resource context, GLenum target, GLenum attachment, - GLenum renderbuffertarget, GLuint renderbuffer); - void (*FramebufferTexture2D)( - PP_Resource context, GLenum target, GLenum attachment, GLenum textarget, - GLuint texture, GLint level); + void (*FramebufferRenderbuffer)(PP_Resource context, + GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); + void (*FramebufferTexture2D)(PP_Resource context, + GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level); void (*FrontFace)(PP_Resource context, GLenum mode); void (*GenBuffers)(PP_Resource context, GLsizei n, GLuint* buffers); void (*GenerateMipmap)(PP_Resource context, GLenum target); - void (*GenFramebuffers)( - PP_Resource context, GLsizei n, GLuint* framebuffers); - void (*GenRenderbuffers)( - PP_Resource context, GLsizei n, GLuint* renderbuffers); + void (*GenFramebuffers)(PP_Resource context, GLsizei n, GLuint* framebuffers); + void (*GenRenderbuffers)(PP_Resource context, + GLsizei n, + GLuint* renderbuffers); void (*GenTextures)(PP_Resource context, GLsizei n, GLuint* textures); - void (*GetActiveAttrib)( - PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, - GLsizei* length, GLint* size, GLenum* type, char* name); - void (*GetActiveUniform)( - PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, - GLsizei* length, GLint* size, GLenum* type, char* name); - void (*GetAttachedShaders)( - PP_Resource context, GLuint program, GLsizei maxcount, GLsizei* count, - GLuint* shaders); - GLint (*GetAttribLocation)( - PP_Resource context, GLuint program, const char* name); + void (*GetActiveAttrib)(PP_Resource context, + GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name); + void (*GetActiveUniform)(PP_Resource context, + GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name); + void (*GetAttachedShaders)(PP_Resource context, + GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders); + GLint (*GetAttribLocation)(PP_Resource context, + GLuint program, + const char* name); void (*GetBooleanv)(PP_Resource context, GLenum pname, GLboolean* params); - void (*GetBufferParameteriv)( - PP_Resource context, GLenum target, GLenum pname, GLint* params); + void (*GetBufferParameteriv)(PP_Resource context, + GLenum target, + GLenum pname, + GLint* params); GLenum (*GetError)(PP_Resource context); void (*GetFloatv)(PP_Resource context, GLenum pname, GLfloat* params); - void (*GetFramebufferAttachmentParameteriv)( - PP_Resource context, GLenum target, GLenum attachment, GLenum pname, - GLint* params); + void (*GetFramebufferAttachmentParameteriv)(PP_Resource context, + GLenum target, + GLenum attachment, + GLenum pname, + GLint* params); void (*GetIntegerv)(PP_Resource context, GLenum pname, GLint* params); - void (*GetProgramiv)( - PP_Resource context, GLuint program, GLenum pname, GLint* params); - void (*GetProgramInfoLog)( - PP_Resource context, GLuint program, GLsizei bufsize, GLsizei* length, - char* infolog); - void (*GetRenderbufferParameteriv)( - PP_Resource context, GLenum target, GLenum pname, GLint* params); - void (*GetShaderiv)( - PP_Resource context, GLuint shader, GLenum pname, GLint* params); - void (*GetShaderInfoLog)( - PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, - char* infolog); - void (*GetShaderPrecisionFormat)( - PP_Resource context, GLenum shadertype, GLenum precisiontype, - GLint* range, GLint* precision); - void (*GetShaderSource)( - PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, - char* source); + void (*GetProgramiv)(PP_Resource context, + GLuint program, + GLenum pname, + GLint* params); + void (*GetProgramInfoLog)(PP_Resource context, + GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog); + void (*GetRenderbufferParameteriv)(PP_Resource context, + GLenum target, + GLenum pname, + GLint* params); + void (*GetShaderiv)(PP_Resource context, + GLuint shader, + GLenum pname, + GLint* params); + void (*GetShaderInfoLog)(PP_Resource context, + GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog); + void (*GetShaderPrecisionFormat)(PP_Resource context, + GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision); + void (*GetShaderSource)(PP_Resource context, + GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source); const GLubyte* (*GetString)(PP_Resource context, GLenum name); - void (*GetTexParameterfv)( - PP_Resource context, GLenum target, GLenum pname, GLfloat* params); - void (*GetTexParameteriv)( - PP_Resource context, GLenum target, GLenum pname, GLint* params); - void (*GetUniformfv)( - PP_Resource context, GLuint program, GLint location, GLfloat* params); - void (*GetUniformiv)( - PP_Resource context, GLuint program, GLint location, GLint* params); - GLint (*GetUniformLocation)( - PP_Resource context, GLuint program, const char* name); - void (*GetVertexAttribfv)( - PP_Resource context, GLuint index, GLenum pname, GLfloat* params); - void (*GetVertexAttribiv)( - PP_Resource context, GLuint index, GLenum pname, GLint* params); - void (*GetVertexAttribPointerv)( - PP_Resource context, GLuint index, GLenum pname, void** pointer); + void (*GetTexParameterfv)(PP_Resource context, + GLenum target, + GLenum pname, + GLfloat* params); + void (*GetTexParameteriv)(PP_Resource context, + GLenum target, + GLenum pname, + GLint* params); + void (*GetUniformfv)(PP_Resource context, + GLuint program, + GLint location, + GLfloat* params); + void (*GetUniformiv)(PP_Resource context, + GLuint program, + GLint location, + GLint* params); + GLint (*GetUniformLocation)(PP_Resource context, + GLuint program, + const char* name); + void (*GetVertexAttribfv)(PP_Resource context, + GLuint index, + GLenum pname, + GLfloat* params); + void (*GetVertexAttribiv)(PP_Resource context, + GLuint index, + GLenum pname, + GLint* params); + void (*GetVertexAttribPointerv)(PP_Resource context, + GLuint index, + GLenum pname, + void** pointer); void (*Hint)(PP_Resource context, GLenum target, GLenum mode); GLboolean (*IsBuffer)(PP_Resource context, GLuint buffer); GLboolean (*IsEnabled)(PP_Resource context, GLenum cap); @@ -200,165 +300,293 @@ struct PPB_OpenGLES2 { void (*LinkProgram)(PP_Resource context, GLuint program); void (*PixelStorei)(PP_Resource context, GLenum pname, GLint param); void (*PolygonOffset)(PP_Resource context, GLfloat factor, GLfloat units); - void (*ReadPixels)( - PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, void* pixels); + void (*ReadPixels)(PP_Resource context, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels); void (*ReleaseShaderCompiler)(PP_Resource context); - void (*RenderbufferStorage)( - PP_Resource context, GLenum target, GLenum internalformat, GLsizei width, - GLsizei height); - void (*SampleCoverage)( - PP_Resource context, GLclampf value, GLboolean invert); - void (*Scissor)( - PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height); - void (*ShaderBinary)( - PP_Resource context, GLsizei n, const GLuint* shaders, - GLenum binaryformat, const void* binary, GLsizei length); - void (*ShaderSource)( - PP_Resource context, GLuint shader, GLsizei count, const char** str, - const GLint* length); - void (*StencilFunc)( - PP_Resource context, GLenum func, GLint ref, GLuint mask); - void (*StencilFuncSeparate)( - PP_Resource context, GLenum face, GLenum func, GLint ref, GLuint mask); + void (*RenderbufferStorage)(PP_Resource context, + GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height); + void (*SampleCoverage)(PP_Resource context, GLclampf value, GLboolean invert); + void (*Scissor)(PP_Resource context, + GLint x, + GLint y, + GLsizei width, + GLsizei height); + void (*ShaderBinary)(PP_Resource context, + GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length); + void (*ShaderSource)(PP_Resource context, + GLuint shader, + GLsizei count, + const char** str, + const GLint* length); + void (*StencilFunc)(PP_Resource context, GLenum func, GLint ref, GLuint mask); + void (*StencilFuncSeparate)(PP_Resource context, + GLenum face, + GLenum func, + GLint ref, + GLuint mask); void (*StencilMask)(PP_Resource context, GLuint mask); void (*StencilMaskSeparate)(PP_Resource context, GLenum face, GLuint mask); - void (*StencilOp)( - PP_Resource context, GLenum fail, GLenum zfail, GLenum zpass); - void (*StencilOpSeparate)( - PP_Resource context, GLenum face, GLenum fail, GLenum zfail, - GLenum zpass); - void (*TexImage2D)( - PP_Resource context, GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels); - void (*TexParameterf)( - PP_Resource context, GLenum target, GLenum pname, GLfloat param); - void (*TexParameterfv)( - PP_Resource context, GLenum target, GLenum pname, const GLfloat* params); - void (*TexParameteri)( - PP_Resource context, GLenum target, GLenum pname, GLint param); - void (*TexParameteriv)( - PP_Resource context, GLenum target, GLenum pname, const GLint* params); - void (*TexSubImage2D)( - PP_Resource context, GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, - const void* pixels); + void (*StencilOp)(PP_Resource context, + GLenum fail, + GLenum zfail, + GLenum zpass); + void (*StencilOpSeparate)(PP_Resource context, + GLenum face, + GLenum fail, + GLenum zfail, + GLenum zpass); + void (*TexImage2D)(PP_Resource context, + GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels); + void (*TexParameterf)(PP_Resource context, + GLenum target, + GLenum pname, + GLfloat param); + void (*TexParameterfv)(PP_Resource context, + GLenum target, + GLenum pname, + const GLfloat* params); + void (*TexParameteri)(PP_Resource context, + GLenum target, + GLenum pname, + GLint param); + void (*TexParameteriv)(PP_Resource context, + GLenum target, + GLenum pname, + const GLint* params); + void (*TexSubImage2D)(PP_Resource context, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels); void (*Uniform1f)(PP_Resource context, GLint location, GLfloat x); - void (*Uniform1fv)( - PP_Resource context, GLint location, GLsizei count, const GLfloat* v); + void (*Uniform1fv)(PP_Resource context, + GLint location, + GLsizei count, + const GLfloat* v); void (*Uniform1i)(PP_Resource context, GLint location, GLint x); - void (*Uniform1iv)( - PP_Resource context, GLint location, GLsizei count, const GLint* v); + void (*Uniform1iv)(PP_Resource context, + GLint location, + GLsizei count, + const GLint* v); void (*Uniform2f)(PP_Resource context, GLint location, GLfloat x, GLfloat y); - void (*Uniform2fv)( - PP_Resource context, GLint location, GLsizei count, const GLfloat* v); + void (*Uniform2fv)(PP_Resource context, + GLint location, + GLsizei count, + const GLfloat* v); void (*Uniform2i)(PP_Resource context, GLint location, GLint x, GLint y); - void (*Uniform2iv)( - PP_Resource context, GLint location, GLsizei count, const GLint* v); - void (*Uniform3f)( - PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z); - void (*Uniform3fv)( - PP_Resource context, GLint location, GLsizei count, const GLfloat* v); - void (*Uniform3i)( - PP_Resource context, GLint location, GLint x, GLint y, GLint z); - void (*Uniform3iv)( - PP_Resource context, GLint location, GLsizei count, const GLint* v); - void (*Uniform4f)( - PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z, - GLfloat w); - void (*Uniform4fv)( - PP_Resource context, GLint location, GLsizei count, const GLfloat* v); - void (*Uniform4i)( - PP_Resource context, GLint location, GLint x, GLint y, GLint z, GLint w); - void (*Uniform4iv)( - PP_Resource context, GLint location, GLsizei count, const GLint* v); - void (*UniformMatrix2fv)( - PP_Resource context, GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value); - void (*UniformMatrix3fv)( - PP_Resource context, GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value); - void (*UniformMatrix4fv)( - PP_Resource context, GLint location, GLsizei count, GLboolean transpose, - const GLfloat* value); + void (*Uniform2iv)(PP_Resource context, + GLint location, + GLsizei count, + const GLint* v); + void (*Uniform3f)(PP_Resource context, + GLint location, + GLfloat x, + GLfloat y, + GLfloat z); + void (*Uniform3fv)(PP_Resource context, + GLint location, + GLsizei count, + const GLfloat* v); + void (*Uniform3i)(PP_Resource context, + GLint location, + GLint x, + GLint y, + GLint z); + void (*Uniform3iv)(PP_Resource context, + GLint location, + GLsizei count, + const GLint* v); + void (*Uniform4f)(PP_Resource context, + GLint location, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w); + void (*Uniform4fv)(PP_Resource context, + GLint location, + GLsizei count, + const GLfloat* v); + void (*Uniform4i)(PP_Resource context, + GLint location, + GLint x, + GLint y, + GLint z, + GLint w); + void (*Uniform4iv)(PP_Resource context, + GLint location, + GLsizei count, + const GLint* v); + void (*UniformMatrix2fv)(PP_Resource context, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value); + void (*UniformMatrix3fv)(PP_Resource context, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value); + void (*UniformMatrix4fv)(PP_Resource context, + GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value); void (*UseProgram)(PP_Resource context, GLuint program); void (*ValidateProgram)(PP_Resource context, GLuint program); void (*VertexAttrib1f)(PP_Resource context, GLuint indx, GLfloat x); - void (*VertexAttrib1fv)( - PP_Resource context, GLuint indx, const GLfloat* values); - void (*VertexAttrib2f)( - PP_Resource context, GLuint indx, GLfloat x, GLfloat y); - void (*VertexAttrib2fv)( - PP_Resource context, GLuint indx, const GLfloat* values); - void (*VertexAttrib3f)( - PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z); - void (*VertexAttrib3fv)( - PP_Resource context, GLuint indx, const GLfloat* values); - void (*VertexAttrib4f)( - PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z, - GLfloat w); - void (*VertexAttrib4fv)( - PP_Resource context, GLuint indx, const GLfloat* values); - void (*VertexAttribPointer)( - PP_Resource context, GLuint indx, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, const void* ptr); - void (*Viewport)( - PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height); + void (*VertexAttrib1fv)(PP_Resource context, + GLuint indx, + const GLfloat* values); + void (*VertexAttrib2f)(PP_Resource context, + GLuint indx, + GLfloat x, + GLfloat y); + void (*VertexAttrib2fv)(PP_Resource context, + GLuint indx, + const GLfloat* values); + void (*VertexAttrib3f)(PP_Resource context, + GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z); + void (*VertexAttrib3fv)(PP_Resource context, + GLuint indx, + const GLfloat* values); + void (*VertexAttrib4f)(PP_Resource context, + GLuint indx, + GLfloat x, + GLfloat y, + GLfloat z, + GLfloat w); + void (*VertexAttrib4fv)(PP_Resource context, + GLuint indx, + const GLfloat* values); + void (*VertexAttribPointer)(PP_Resource context, + GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr); + void (*Viewport)(PP_Resource context, + GLint x, + GLint y, + GLsizei width, + GLsizei height); }; -#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 "PPB_OpenGLES2InstancedArrays;1.0" // NOLINT -#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 // NOLINT +#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 \ + "PPB_OpenGLES2InstancedArrays;1.0" // NOLINT +#define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE \ + PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 // NOLINT struct PPB_OpenGLES2InstancedArrays { - void (*DrawArraysInstancedANGLE)( - PP_Resource context, GLenum mode, GLint first, GLsizei count, - GLsizei primcount); - void (*DrawElementsInstancedANGLE)( - PP_Resource context, GLenum mode, GLsizei count, GLenum type, - const void* indices, GLsizei primcount); - void (*VertexAttribDivisorANGLE)( - PP_Resource context, GLuint index, GLuint divisor); + void (*DrawArraysInstancedANGLE)(PP_Resource context, + GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount); + void (*DrawElementsInstancedANGLE)(PP_Resource context, + GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount); + void (*VertexAttribDivisorANGLE)(PP_Resource context, + GLuint index, + GLuint divisor); }; -#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 "PPB_OpenGLES2FramebufferBlit;1.0" // NOLINT -#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 // NOLINT +#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 \ + "PPB_OpenGLES2FramebufferBlit;1.0" // NOLINT +#define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE \ + PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 // NOLINT struct PPB_OpenGLES2FramebufferBlit { - void (*BlitFramebufferEXT)( - PP_Resource context, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, - GLenum filter); + void (*BlitFramebufferEXT)(PP_Resource context, + GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter); }; -#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 "PPB_OpenGLES2FramebufferMultisample;1.0" // NOLINT -#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 // NOLINT +#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 \ + "PPB_OpenGLES2FramebufferMultisample;1.0" // NOLINT +#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE \ + PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 // NOLINT struct PPB_OpenGLES2FramebufferMultisample { - void (*RenderbufferStorageMultisampleEXT)( - PP_Resource context, GLenum target, GLsizei samples, - GLenum internalformat, GLsizei width, GLsizei height); + void (*RenderbufferStorageMultisampleEXT)(PP_Resource context, + GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height); }; -#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 "PPB_OpenGLES2ChromiumEnableFeature;1.0" // NOLINT -#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 // NOLINT +#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 \ + "PPB_OpenGLES2ChromiumEnableFeature;1.0" // NOLINT +#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE \ + PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 // NOLINT struct PPB_OpenGLES2ChromiumEnableFeature { GLboolean (*EnableFeatureCHROMIUM)(PP_Resource context, const char* feature); }; -#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 "PPB_OpenGLES2ChromiumMapSub;1.0" // NOLINT -#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 // NOLINT +#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 \ + "PPB_OpenGLES2ChromiumMapSub;1.0" // NOLINT +#define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE \ + PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 // NOLINT struct PPB_OpenGLES2ChromiumMapSub { - void* (*MapBufferSubDataCHROMIUM)( - PP_Resource context, GLuint target, GLintptr offset, GLsizeiptr size, - GLenum access); + void* (*MapBufferSubDataCHROMIUM)(PP_Resource context, + GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access); void (*UnmapBufferSubDataCHROMIUM)(PP_Resource context, const void* mem); - void* (*MapTexSubImage2DCHROMIUM)( - PP_Resource context, GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, - GLenum access); + void* (*MapTexSubImage2DCHROMIUM)(PP_Resource context, + GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access); void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem); }; @@ -367,16 +595,20 @@ struct PPB_OpenGLES2ChromiumMapSub { struct PPB_OpenGLES2Query { void (*GenQueriesEXT)(PP_Resource context, GLsizei n, GLuint* queries); - void (*DeleteQueriesEXT)( - PP_Resource context, GLsizei n, const GLuint* queries); + void (*DeleteQueriesEXT)(PP_Resource context, + GLsizei n, + const GLuint* queries); GLboolean (*IsQueryEXT)(PP_Resource context, GLuint id); void (*BeginQueryEXT)(PP_Resource context, GLenum target, GLuint id); void (*EndQueryEXT)(PP_Resource context, GLenum target); - void (*GetQueryivEXT)( - PP_Resource context, GLenum target, GLenum pname, GLint* params); - void (*GetQueryObjectuivEXT)( - PP_Resource context, GLuint id, GLenum pname, GLuint* params); + void (*GetQueryivEXT)(PP_Resource context, + GLenum target, + GLenum pname, + GLint* params); + void (*GetQueryObjectuivEXT)(PP_Resource context, + GLuint id, + GLenum pname, + GLuint* params); }; #endif // PPAPI_C_PPB_OPENGLES2_H_ - diff --git a/ppapi/lib/gl/gles2/gles2.c b/ppapi/lib/gl/gles2/gles2.c index ddb44d5..dabb20c 100644 --- a/ppapi/lib/gl/gles2/gles2.c +++ b/ppapi/lib/gl/gles2/gles2.c @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #ifndef GL_GLEXT_PROTOTYPES @@ -22,15 +24,14 @@ void GL_APIENTRY glAttachShader(GLuint program, GLuint shader) { glGetCurrentContextPPAPI(), program, shader); } -void GL_APIENTRY glBindAttribLocation( - GLuint program, GLuint index, const char* name) { +void GL_APIENTRY +glBindAttribLocation(GLuint program, GLuint index, const char* name) { glGetInterfacePPAPI()->BindAttribLocation( glGetCurrentContextPPAPI(), program, index, name); } void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer) { - glGetInterfacePPAPI()->BindBuffer( - glGetCurrentContextPPAPI(), target, buffer); + glGetInterfacePPAPI()->BindBuffer(glGetCurrentContextPPAPI(), target, buffer); } void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer) { @@ -48,8 +49,8 @@ void GL_APIENTRY glBindTexture(GLenum target, GLuint texture) { glGetCurrentContextPPAPI(), target, texture); } -void GL_APIENTRY glBlendColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GL_APIENTRY +glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { glGetInterfacePPAPI()->BlendColor( glGetCurrentContextPPAPI(), red, green, blue, alpha); } @@ -68,20 +69,24 @@ void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor) { glGetCurrentContextPPAPI(), sfactor, dfactor); } -void GL_APIENTRY glBlendFuncSeparate( - GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { +void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB, + GLenum dstRGB, + GLenum srcAlpha, + GLenum dstAlpha) { glGetInterfacePPAPI()->BlendFuncSeparate( glGetCurrentContextPPAPI(), srcRGB, dstRGB, srcAlpha, dstAlpha); } -void GL_APIENTRY glBufferData( - GLenum target, GLsizeiptr size, const void* data, GLenum usage) { +void GL_APIENTRY +glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { glGetInterfacePPAPI()->BufferData( glGetCurrentContextPPAPI(), target, size, data, usage); } -void GL_APIENTRY glBufferSubData( - GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { +void GL_APIENTRY glBufferSubData(GLenum target, + GLintptr offset, + GLsizeiptr size, + const void* data) { glGetInterfacePPAPI()->BufferSubData( glGetCurrentContextPPAPI(), target, offset, size, data); } @@ -95,8 +100,8 @@ void GL_APIENTRY glClear(GLbitfield mask) { glGetInterfacePPAPI()->Clear(glGetCurrentContextPPAPI(), mask); } -void GL_APIENTRY glClearColor( - GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GL_APIENTRY +glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { glGetInterfacePPAPI()->ClearColor( glGetCurrentContextPPAPI(), red, green, blue, alpha); } @@ -109,8 +114,8 @@ void GL_APIENTRY glClearStencil(GLint s) { glGetInterfacePPAPI()->ClearStencil(glGetCurrentContextPPAPI(), s); } -void GL_APIENTRY glColorMask( - GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { +void GL_APIENTRY +glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { glGetInterfacePPAPI()->ColorMask( glGetCurrentContextPPAPI(), red, green, blue, alpha); } @@ -119,36 +124,82 @@ void GL_APIENTRY glCompileShader(GLuint shader) { glGetInterfacePPAPI()->CompileShader(glGetCurrentContextPPAPI(), shader); } -void GL_APIENTRY glCompressedTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, const void* data) { - glGetInterfacePPAPI()->CompressedTexImage2D( - glGetCurrentContextPPAPI(), target, level, internalformat, width, height, - border, imageSize, data); -} - -void GL_APIENTRY glCompressedTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLsizei imageSize, const void* data) { - glGetInterfacePPAPI()->CompressedTexSubImage2D( - glGetCurrentContextPPAPI(), target, level, xoffset, yoffset, width, - height, format, imageSize, data); -} - -void GL_APIENTRY glCopyTexImage2D( - GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border) { - glGetInterfacePPAPI()->CopyTexImage2D( - glGetCurrentContextPPAPI(), target, level, internalformat, x, y, width, - height, border); -} - -void GL_APIENTRY glCopyTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, - GLsizei width, GLsizei height) { - glGetInterfacePPAPI()->CopyTexSubImage2D( - glGetCurrentContextPPAPI(), target, level, xoffset, yoffset, x, y, width, - height); +void GL_APIENTRY glCompressedTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLsizei imageSize, + const void* data) { + glGetInterfacePPAPI()->CompressedTexImage2D(glGetCurrentContextPPAPI(), + target, + level, + internalformat, + width, + height, + border, + imageSize, + data); +} + +void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLsizei imageSize, + const void* data) { + glGetInterfacePPAPI()->CompressedTexSubImage2D(glGetCurrentContextPPAPI(), + target, + level, + xoffset, + yoffset, + width, + height, + format, + imageSize, + data); +} + +void GL_APIENTRY glCopyTexImage2D(GLenum target, + GLint level, + GLenum internalformat, + GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLint border) { + glGetInterfacePPAPI()->CopyTexImage2D(glGetCurrentContextPPAPI(), + target, + level, + internalformat, + x, + y, + width, + height, + border); +} + +void GL_APIENTRY glCopyTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLint x, + GLint y, + GLsizei width, + GLsizei height) { + glGetInterfacePPAPI()->CopyTexSubImage2D(glGetCurrentContextPPAPI(), + target, + level, + xoffset, + yoffset, + x, + y, + width, + height); } GLuint GL_APIENTRY glCreateProgram() { @@ -176,8 +227,7 @@ void GL_APIENTRY glDeleteProgram(GLuint program) { glGetInterfacePPAPI()->DeleteProgram(glGetCurrentContextPPAPI(), program); } -void GL_APIENTRY glDeleteRenderbuffers( - GLsizei n, const GLuint* renderbuffers) { +void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { glGetInterfacePPAPI()->DeleteRenderbuffers( glGetCurrentContextPPAPI(), n, renderbuffers); } @@ -213,8 +263,8 @@ void GL_APIENTRY glDisable(GLenum cap) { } void GL_APIENTRY glDisableVertexAttribArray(GLuint index) { - glGetInterfacePPAPI()->DisableVertexAttribArray( - glGetCurrentContextPPAPI(), index); + glGetInterfacePPAPI()->DisableVertexAttribArray(glGetCurrentContextPPAPI(), + index); } void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) { @@ -222,8 +272,8 @@ void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) { glGetCurrentContextPPAPI(), mode, first, count); } -void GL_APIENTRY glDrawElements( - GLenum mode, GLsizei count, GLenum type, const void* indices) { +void GL_APIENTRY +glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) { glGetInterfacePPAPI()->DrawElements( glGetCurrentContextPPAPI(), mode, count, type, indices); } @@ -233,8 +283,8 @@ void GL_APIENTRY glEnable(GLenum cap) { } void GL_APIENTRY glEnableVertexAttribArray(GLuint index) { - glGetInterfacePPAPI()->EnableVertexAttribArray( - glGetCurrentContextPPAPI(), index); + glGetInterfacePPAPI()->EnableVertexAttribArray(glGetCurrentContextPPAPI(), + index); } void GL_APIENTRY glFinish() { @@ -245,20 +295,28 @@ void GL_APIENTRY glFlush() { glGetInterfacePPAPI()->Flush(glGetCurrentContextPPAPI()); } -void GL_APIENTRY glFramebufferRenderbuffer( - GLenum target, GLenum attachment, GLenum renderbuffertarget, - GLuint renderbuffer) { - glGetInterfacePPAPI()->FramebufferRenderbuffer( - glGetCurrentContextPPAPI(), target, attachment, renderbuffertarget, - renderbuffer); +void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, + GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) { + glGetInterfacePPAPI()->FramebufferRenderbuffer(glGetCurrentContextPPAPI(), + target, + attachment, + renderbuffertarget, + renderbuffer); } -void GL_APIENTRY glFramebufferTexture2D( - GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level) { - glGetInterfacePPAPI()->FramebufferTexture2D( - glGetCurrentContextPPAPI(), target, attachment, textarget, texture, - level); +void GL_APIENTRY glFramebufferTexture2D(GLenum target, + GLenum attachment, + GLenum textarget, + GLuint texture, + GLint level) { + glGetInterfacePPAPI()->FramebufferTexture2D(glGetCurrentContextPPAPI(), + target, + attachment, + textarget, + texture, + level); } void GL_APIENTRY glFrontFace(GLenum mode) { @@ -287,24 +345,44 @@ void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures) { glGetInterfacePPAPI()->GenTextures(glGetCurrentContextPPAPI(), n, textures); } -void GL_APIENTRY glGetActiveAttrib( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) { - glGetInterfacePPAPI()->GetActiveAttrib( - glGetCurrentContextPPAPI(), program, index, bufsize, length, size, type, - name); -} - -void GL_APIENTRY glGetActiveUniform( - GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, - GLenum* type, char* name) { - glGetInterfacePPAPI()->GetActiveUniform( - glGetCurrentContextPPAPI(), program, index, bufsize, length, size, type, - name); -} - -void GL_APIENTRY glGetAttachedShaders( - GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { +void GL_APIENTRY glGetActiveAttrib(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) { + glGetInterfacePPAPI()->GetActiveAttrib(glGetCurrentContextPPAPI(), + program, + index, + bufsize, + length, + size, + type, + name); +} + +void GL_APIENTRY glGetActiveUniform(GLuint program, + GLuint index, + GLsizei bufsize, + GLsizei* length, + GLint* size, + GLenum* type, + char* name) { + glGetInterfacePPAPI()->GetActiveUniform(glGetCurrentContextPPAPI(), + program, + index, + bufsize, + length, + size, + type, + name); +} + +void GL_APIENTRY glGetAttachedShaders(GLuint program, + GLsizei maxcount, + GLsizei* count, + GLuint* shaders) { glGetInterfacePPAPI()->GetAttachedShaders( glGetCurrentContextPPAPI(), program, maxcount, count, shaders); } @@ -315,12 +393,11 @@ GLint GL_APIENTRY glGetAttribLocation(GLuint program, const char* name) { } void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params) { - glGetInterfacePPAPI()->GetBooleanv( - glGetCurrentContextPPAPI(), pname, params); + glGetInterfacePPAPI()->GetBooleanv(glGetCurrentContextPPAPI(), pname, params); } -void GL_APIENTRY glGetBufferParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GL_APIENTRY +glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { glGetInterfacePPAPI()->GetBufferParameteriv( glGetCurrentContextPPAPI(), target, pname, params); } @@ -333,15 +410,16 @@ void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params) { glGetInterfacePPAPI()->GetFloatv(glGetCurrentContextPPAPI(), pname, params); } -void GL_APIENTRY glGetFramebufferAttachmentParameteriv( - GLenum target, GLenum attachment, GLenum pname, GLint* params) { +void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, + GLenum attachment, + GLenum pname, + GLint* params) { glGetInterfacePPAPI()->GetFramebufferAttachmentParameteriv( glGetCurrentContextPPAPI(), target, attachment, pname, params); } void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params) { - glGetInterfacePPAPI()->GetIntegerv( - glGetCurrentContextPPAPI(), pname, params); + glGetInterfacePPAPI()->GetIntegerv(glGetCurrentContextPPAPI(), pname, params); } void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params) { @@ -349,14 +427,16 @@ void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params) { glGetCurrentContextPPAPI(), program, pname, params); } -void GL_APIENTRY glGetProgramInfoLog( - GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { +void GL_APIENTRY glGetProgramInfoLog(GLuint program, + GLsizei bufsize, + GLsizei* length, + char* infolog) { glGetInterfacePPAPI()->GetProgramInfoLog( glGetCurrentContextPPAPI(), program, bufsize, length, infolog); } -void GL_APIENTRY glGetRenderbufferParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GL_APIENTRY +glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) { glGetInterfacePPAPI()->GetRenderbufferParameteriv( glGetCurrentContextPPAPI(), target, pname, params); } @@ -366,20 +446,26 @@ void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params) { glGetCurrentContextPPAPI(), shader, pname, params); } -void GL_APIENTRY glGetShaderInfoLog( - GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { +void GL_APIENTRY glGetShaderInfoLog(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* infolog) { glGetInterfacePPAPI()->GetShaderInfoLog( glGetCurrentContextPPAPI(), shader, bufsize, length, infolog); } -void GL_APIENTRY glGetShaderPrecisionFormat( - GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { +void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, + GLenum precisiontype, + GLint* range, + GLint* precision) { glGetInterfacePPAPI()->GetShaderPrecisionFormat( glGetCurrentContextPPAPI(), shadertype, precisiontype, range, precision); } -void GL_APIENTRY glGetShaderSource( - GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { +void GL_APIENTRY glGetShaderSource(GLuint shader, + GLsizei bufsize, + GLsizei* length, + char* source) { glGetInterfacePPAPI()->GetShaderSource( glGetCurrentContextPPAPI(), shader, bufsize, length, source); } @@ -388,26 +474,25 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name) { return glGetInterfacePPAPI()->GetString(glGetCurrentContextPPAPI(), name); } -void GL_APIENTRY glGetTexParameterfv( - GLenum target, GLenum pname, GLfloat* params) { +void GL_APIENTRY +glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) { glGetInterfacePPAPI()->GetTexParameterfv( glGetCurrentContextPPAPI(), target, pname, params); } -void GL_APIENTRY glGetTexParameteriv( - GLenum target, GLenum pname, GLint* params) { +void GL_APIENTRY +glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) { glGetInterfacePPAPI()->GetTexParameteriv( glGetCurrentContextPPAPI(), target, pname, params); } -void GL_APIENTRY glGetUniformfv( - GLuint program, GLint location, GLfloat* params) { +void GL_APIENTRY +glGetUniformfv(GLuint program, GLint location, GLfloat* params) { glGetInterfacePPAPI()->GetUniformfv( glGetCurrentContextPPAPI(), program, location, params); } -void GL_APIENTRY glGetUniformiv( - GLuint program, GLint location, GLint* params) { +void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params) { glGetInterfacePPAPI()->GetUniformiv( glGetCurrentContextPPAPI(), program, location, params); } @@ -417,20 +502,20 @@ GLint GL_APIENTRY glGetUniformLocation(GLuint program, const char* name) { glGetCurrentContextPPAPI(), program, name); } -void GL_APIENTRY glGetVertexAttribfv( - GLuint index, GLenum pname, GLfloat* params) { +void GL_APIENTRY +glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) { glGetInterfacePPAPI()->GetVertexAttribfv( glGetCurrentContextPPAPI(), index, pname, params); } -void GL_APIENTRY glGetVertexAttribiv( - GLuint index, GLenum pname, GLint* params) { +void GL_APIENTRY +glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) { glGetInterfacePPAPI()->GetVertexAttribiv( glGetCurrentContextPPAPI(), index, pname, params); } -void GL_APIENTRY glGetVertexAttribPointerv( - GLuint index, GLenum pname, void** pointer) { +void GL_APIENTRY +glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) { glGetInterfacePPAPI()->GetVertexAttribPointerv( glGetCurrentContextPPAPI(), index, pname, pointer); } @@ -448,8 +533,8 @@ GLboolean GL_APIENTRY glIsEnabled(GLenum cap) { } GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer) { - return glGetInterfacePPAPI()->IsFramebuffer( - glGetCurrentContextPPAPI(), framebuffer); + return glGetInterfacePPAPI()->IsFramebuffer(glGetCurrentContextPPAPI(), + framebuffer); } GLboolean GL_APIENTRY glIsProgram(GLuint program) { @@ -457,8 +542,8 @@ GLboolean GL_APIENTRY glIsProgram(GLuint program) { } GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer) { - return glGetInterfacePPAPI()->IsRenderbuffer( - glGetCurrentContextPPAPI(), renderbuffer); + return glGetInterfacePPAPI()->IsRenderbuffer(glGetCurrentContextPPAPI(), + renderbuffer); } GLboolean GL_APIENTRY glIsShader(GLuint shader) { @@ -486,9 +571,13 @@ void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units) { glGetCurrentContextPPAPI(), factor, units); } -void GL_APIENTRY glReadPixels( - GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - void* pixels) { +void GL_APIENTRY glReadPixels(GLint x, + GLint y, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + void* pixels) { glGetInterfacePPAPI()->ReadPixels( glGetCurrentContextPPAPI(), x, y, width, height, format, type, pixels); } @@ -497,8 +586,10 @@ void GL_APIENTRY glReleaseShaderCompiler() { glGetInterfacePPAPI()->ReleaseShaderCompiler(glGetCurrentContextPPAPI()); } -void GL_APIENTRY glRenderbufferStorage( - GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { +void GL_APIENTRY glRenderbufferStorage(GLenum target, + GLenum internalformat, + GLsizei width, + GLsizei height) { glGetInterfacePPAPI()->RenderbufferStorage( glGetCurrentContextPPAPI(), target, internalformat, width, height); } @@ -513,15 +604,19 @@ void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { glGetCurrentContextPPAPI(), x, y, width, height); } -void GL_APIENTRY glShaderBinary( - GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, - GLsizei length) { +void GL_APIENTRY glShaderBinary(GLsizei n, + const GLuint* shaders, + GLenum binaryformat, + const void* binary, + GLsizei length) { glGetInterfacePPAPI()->ShaderBinary( glGetCurrentContextPPAPI(), n, shaders, binaryformat, binary, length); } -void GL_APIENTRY glShaderSource( - GLuint shader, GLsizei count, const char** str, const GLint* length) { +void GL_APIENTRY glShaderSource(GLuint shader, + GLsizei count, + const char** str, + const GLint* length) { glGetInterfacePPAPI()->ShaderSource( glGetCurrentContextPPAPI(), shader, count, str, length); } @@ -531,8 +626,8 @@ void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask) { glGetCurrentContextPPAPI(), func, ref, mask); } -void GL_APIENTRY glStencilFuncSeparate( - GLenum face, GLenum func, GLint ref, GLuint mask) { +void GL_APIENTRY +glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { glGetInterfacePPAPI()->StencilFuncSeparate( glGetCurrentContextPPAPI(), face, func, ref, mask); } @@ -551,19 +646,31 @@ void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) { glGetCurrentContextPPAPI(), fail, zfail, zpass); } -void GL_APIENTRY glStencilOpSeparate( - GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { +void GL_APIENTRY +glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { glGetInterfacePPAPI()->StencilOpSeparate( glGetCurrentContextPPAPI(), face, fail, zfail, zpass); } -void GL_APIENTRY glTexImage2D( - GLenum target, GLint level, GLint internalformat, GLsizei width, - GLsizei height, GLint border, GLenum format, GLenum type, - const void* pixels) { - glGetInterfacePPAPI()->TexImage2D( - glGetCurrentContextPPAPI(), target, level, internalformat, width, height, - border, format, type, pixels); +void GL_APIENTRY glTexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void* pixels) { + glGetInterfacePPAPI()->TexImage2D(glGetCurrentContextPPAPI(), + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param) { @@ -571,8 +678,8 @@ void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param) { glGetCurrentContextPPAPI(), target, pname, param); } -void GL_APIENTRY glTexParameterfv( - GLenum target, GLenum pname, const GLfloat* params) { +void GL_APIENTRY +glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) { glGetInterfacePPAPI()->TexParameterfv( glGetCurrentContextPPAPI(), target, pname, params); } @@ -582,26 +689,38 @@ void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param) { glGetCurrentContextPPAPI(), target, pname, param); } -void GL_APIENTRY glTexParameteriv( - GLenum target, GLenum pname, const GLint* params) { +void GL_APIENTRY +glTexParameteriv(GLenum target, GLenum pname, const GLint* params) { glGetInterfacePPAPI()->TexParameteriv( glGetCurrentContextPPAPI(), target, pname, params); } -void GL_APIENTRY glTexSubImage2D( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, const void* pixels) { - glGetInterfacePPAPI()->TexSubImage2D( - glGetCurrentContextPPAPI(), target, level, xoffset, yoffset, width, - height, format, type, pixels); +void GL_APIENTRY glTexSubImage2D(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + const void* pixels) { + glGetInterfacePPAPI()->TexSubImage2D(glGetCurrentContextPPAPI(), + target, + level, + xoffset, + yoffset, + width, + height, + format, + type, + pixels); } void GL_APIENTRY glUniform1f(GLint location, GLfloat x) { glGetInterfacePPAPI()->Uniform1f(glGetCurrentContextPPAPI(), location, x); } -void GL_APIENTRY glUniform1fv( - GLint location, GLsizei count, const GLfloat* v) { +void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v) { glGetInterfacePPAPI()->Uniform1fv( glGetCurrentContextPPAPI(), location, count, v); } @@ -619,8 +738,7 @@ void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y) { glGetInterfacePPAPI()->Uniform2f(glGetCurrentContextPPAPI(), location, x, y); } -void GL_APIENTRY glUniform2fv( - GLint location, GLsizei count, const GLfloat* v) { +void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v) { glGetInterfacePPAPI()->Uniform2fv( glGetCurrentContextPPAPI(), location, count, v); } @@ -639,8 +757,7 @@ void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) { glGetCurrentContextPPAPI(), location, x, y, z); } -void GL_APIENTRY glUniform3fv( - GLint location, GLsizei count, const GLfloat* v) { +void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v) { glGetInterfacePPAPI()->Uniform3fv( glGetCurrentContextPPAPI(), location, count, v); } @@ -655,20 +772,19 @@ void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v) { glGetCurrentContextPPAPI(), location, count, v); } -void GL_APIENTRY glUniform4f( - GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GL_APIENTRY +glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { glGetInterfacePPAPI()->Uniform4f( glGetCurrentContextPPAPI(), location, x, y, z, w); } -void GL_APIENTRY glUniform4fv( - GLint location, GLsizei count, const GLfloat* v) { +void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v) { glGetInterfacePPAPI()->Uniform4fv( glGetCurrentContextPPAPI(), location, count, v); } -void GL_APIENTRY glUniform4i( - GLint location, GLint x, GLint y, GLint z, GLint w) { +void GL_APIENTRY +glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { glGetInterfacePPAPI()->Uniform4i( glGetCurrentContextPPAPI(), location, x, y, z, w); } @@ -678,20 +794,26 @@ void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v) { glGetCurrentContextPPAPI(), location, count, v); } -void GL_APIENTRY glUniformMatrix2fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GL_APIENTRY glUniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { glGetInterfacePPAPI()->UniformMatrix2fv( glGetCurrentContextPPAPI(), location, count, transpose, value); } -void GL_APIENTRY glUniformMatrix3fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GL_APIENTRY glUniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { glGetInterfacePPAPI()->UniformMatrix3fv( glGetCurrentContextPPAPI(), location, count, transpose, value); } -void GL_APIENTRY glUniformMatrix4fv( - GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +void GL_APIENTRY glUniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat* value) { glGetInterfacePPAPI()->UniformMatrix4fv( glGetCurrentContextPPAPI(), location, count, transpose, value); } @@ -714,8 +836,7 @@ void GL_APIENTRY glVertexAttrib1fv(GLuint indx, const GLfloat* values) { } void GL_APIENTRY glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { - glGetInterfacePPAPI()->VertexAttrib2f( - glGetCurrentContextPPAPI(), indx, x, y); + glGetInterfacePPAPI()->VertexAttrib2f(glGetCurrentContextPPAPI(), indx, x, y); } void GL_APIENTRY glVertexAttrib2fv(GLuint indx, const GLfloat* values) { @@ -723,8 +844,8 @@ void GL_APIENTRY glVertexAttrib2fv(GLuint indx, const GLfloat* values) { glGetCurrentContextPPAPI(), indx, values); } -void GL_APIENTRY glVertexAttrib3f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z) { +void GL_APIENTRY +glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { glGetInterfacePPAPI()->VertexAttrib3f( glGetCurrentContextPPAPI(), indx, x, y, z); } @@ -734,8 +855,8 @@ void GL_APIENTRY glVertexAttrib3fv(GLuint indx, const GLfloat* values) { glGetCurrentContextPPAPI(), indx, values); } -void GL_APIENTRY glVertexAttrib4f( - GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +void GL_APIENTRY +glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { glGetInterfacePPAPI()->VertexAttrib4f( glGetCurrentContextPPAPI(), indx, x, y, z, w); } @@ -745,9 +866,12 @@ void GL_APIENTRY glVertexAttrib4fv(GLuint indx, const GLfloat* values) { glGetCurrentContextPPAPI(), indx, values); } -void GL_APIENTRY glVertexAttribPointer( - GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, - const void* ptr) { +void GL_APIENTRY glVertexAttribPointer(GLuint indx, + GLint size, + GLenum type, + GLboolean normalized, + GLsizei stride, + const void* ptr) { glGetInterfacePPAPI()->VertexAttribPointer( glGetCurrentContextPPAPI(), indx, size, type, normalized, stride, ptr); } @@ -757,26 +881,46 @@ void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { glGetCurrentContextPPAPI(), x, y, width, height); } -void GL_APIENTRY glBlitFramebufferEXT( - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, - GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { +void GL_APIENTRY glBlitFramebufferEXT(GLint srcX0, + GLint srcY0, + GLint srcX1, + GLint srcY1, + GLint dstX0, + GLint dstY0, + GLint dstX1, + GLint dstY1, + GLbitfield mask, + GLenum filter) { const struct PPB_OpenGLES2FramebufferBlit* ext = glGetFramebufferBlitInterfacePPAPI(); if (ext) - ext->BlitFramebufferEXT( - glGetCurrentContextPPAPI(), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, - dstX1, dstY1, mask, filter); -} - -void GL_APIENTRY glRenderbufferStorageMultisampleEXT( - GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, - GLsizei height) { + ext->BlitFramebufferEXT(glGetCurrentContextPPAPI(), + srcX0, + srcY0, + srcX1, + srcY1, + dstX0, + dstY0, + dstX1, + dstY1, + mask, + filter); +} + +void GL_APIENTRY glRenderbufferStorageMultisampleEXT(GLenum target, + GLsizei samples, + GLenum internalformat, + GLsizei width, + GLsizei height) { const struct PPB_OpenGLES2FramebufferMultisample* ext = glGetFramebufferMultisampleInterfacePPAPI(); if (ext) - ext->RenderbufferStorageMultisampleEXT( - glGetCurrentContextPPAPI(), target, samples, internalformat, width, - height); + ext->RenderbufferStorageMultisampleEXT(glGetCurrentContextPPAPI(), + target, + samples, + internalformat, + width, + height); } void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* queries) { @@ -816,8 +960,8 @@ void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) { ext->GetQueryivEXT(glGetCurrentContextPPAPI(), target, pname, params); } -void GL_APIENTRY glGetQueryObjectuivEXT( - GLuint id, GLenum pname, GLuint* params) { +void GL_APIENTRY +glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) { const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI(); if (ext) ext->GetQueryObjectuivEXT(glGetCurrentContextPPAPI(), id, pname, params); @@ -831,8 +975,10 @@ GLboolean GL_APIENTRY glEnableFeatureCHROMIUM(const char* feature) { return 0; } -void* GL_APIENTRY glMapBufferSubDataCHROMIUM( - GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) { +void* GL_APIENTRY glMapBufferSubDataCHROMIUM(GLuint target, + GLintptr offset, + GLsizeiptr size, + GLenum access) { const struct PPB_OpenGLES2ChromiumMapSub* ext = glGetChromiumMapSubInterfacePPAPI(); if (ext) @@ -848,15 +994,28 @@ void GL_APIENTRY glUnmapBufferSubDataCHROMIUM(const void* mem) { ext->UnmapBufferSubDataCHROMIUM(glGetCurrentContextPPAPI(), mem); } -void* GL_APIENTRY glMapTexSubImage2DCHROMIUM( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLenum access) { +void* GL_APIENTRY glMapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) { const struct PPB_OpenGLES2ChromiumMapSub* ext = glGetChromiumMapSubInterfacePPAPI(); if (ext) - return ext->MapTexSubImage2DCHROMIUM( - glGetCurrentContextPPAPI(), target, level, xoffset, yoffset, width, - height, format, type, access); + return ext->MapTexSubImage2DCHROMIUM(glGetCurrentContextPPAPI(), + target, + level, + xoffset, + yoffset, + width, + height, + format, + type, + access); return 0; } @@ -867,8 +1026,10 @@ void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM(const void* mem) { ext->UnmapTexSubImage2DCHROMIUM(glGetCurrentContextPPAPI(), mem); } -void GL_APIENTRY glDrawArraysInstancedANGLE( - GLenum mode, GLint first, GLsizei count, GLsizei primcount) { +void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) { const struct PPB_OpenGLES2InstancedArrays* ext = glGetInstancedArraysInterfacePPAPI(); if (ext) @@ -876,9 +1037,11 @@ void GL_APIENTRY glDrawArraysInstancedANGLE( glGetCurrentContextPPAPI(), mode, first, count, primcount); } -void GL_APIENTRY glDrawElementsInstancedANGLE( - GLenum mode, GLsizei count, GLenum type, const void* indices, - GLsizei primcount) { +void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, + GLsizei count, + GLenum type, + const void* indices, + GLsizei primcount) { const struct PPB_OpenGLES2InstancedArrays* ext = glGetInstancedArraysInterfacePPAPI(); if (ext) @@ -892,4 +1055,3 @@ void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) { if (ext) ext->VertexAttribDivisorANGLE(glGetCurrentContextPPAPI(), index, divisor); } - diff --git a/ppapi/shared_impl/ppb_opengles2_shared.cc b/ppapi/shared_impl/ppb_opengles2_shared.cc index 66af5d2..6d291c4 100644 --- a/ppapi/shared_impl/ppb_opengles2_shared.cc +++ b/ppapi/shared_impl/ppb_opengles2_shared.cc @@ -4,6 +4,8 @@ // This file is auto-generated from // gpu/command_buffer/build_gles2_cmd_buffer.py +// It's formatted by clang-format using chromium coding style: +// clang-format -i -style=chromium filename // DO NOT EDIT! #include "ppapi/shared_impl/ppb_opengles2_shared.h" |