diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 18:43:13 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 18:43:13 +0000 |
commit | 6965d7dcbce91c55c492ff34983a8a3a35f14740 (patch) | |
tree | a04a41b2c2db8eaa2ce5877e2f8869d5d9cf3336 /ppapi/c | |
parent | 866fdd9219e015f582095faf35129a3d9f26be8c (diff) | |
download | chromium_src-6965d7dcbce91c55c492ff34983a8a3a35f14740.zip chromium_src-6965d7dcbce91c55c492ff34983a8a3a35f14740.tar.gz chromium_src-6965d7dcbce91c55c492ff34983a8a3a35f14740.tar.bz2 |
Add Pepper support for several GL extensions
Add support to the command buffer code generator to generate multiple pepper interfaces, and use that to generate interfaces for ANGLE_instanced_arrays, ANGLE_framebuffer_blit, ANGLE_framebuffer_multisample, CHROMIUM_enable_feature, and CHROMIUM_map_sub.
BUG=93148
TEST=
Review URL: https://chromiumcodereview.appspot.com/9420017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h | 47 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_opengles2ext_dev.h | 82 |
2 files changed, 82 insertions, 47 deletions
diff --git a/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h b/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h deleted file mode 100644 index 8ad0093..0000000 --- a/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ -#define PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ - -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/ppb_opengles2.h" - -#define PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE_0_1 \ - "PPB_GLESChromiumTextureMapping(Dev);0.1" -#define PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE \ - PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE_0_1 - -struct PPB_GLESChromiumTextureMapping_Dev_0_1 { - // Maps the sub-image of a texture. 'level', 'xoffset', 'yoffset', 'width', - // 'height', 'format' and 'type' correspond to the similarly named parameters - // of TexSubImage2D, and define the sub-image region, as well as the format of - // the data. 'access' must be one of GL_READ_ONLY, GL_WRITE_ONLY or - // GL_READ_WRITE. If READ is included, the returned buffer will contain the - // pixel data for the sub-image. If WRITE is included, the pixel data for the - // sub-image will be updated to the contents of the buffer when - // UnmapTexSubImage2DCHROMIUM is called. NOTE: for a GL_WRITE_ONLY map, it - // means that all the values of the buffer must be written. - void* (*MapTexSubImage2DCHROMIUM)( - PP_Resource context, - GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLenum access); - - // Unmaps the sub-image of a texture. If the sub-image was mapped with one of - // the WRITE accesses, the pixels are updated at this time to the contents of - // the buffer. 'mem' must be the pointer returned by MapTexSubImage2DCHROMIUM. - void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem); -}; - -typedef struct PPB_GLESChromiumTextureMapping_Dev_0_1 - PPB_GLESChromiumTextureMapping_Dev; - -#endif // PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ diff --git a/ppapi/c/dev/ppb_opengles2ext_dev.h b/ppapi/c/dev/ppb_opengles2ext_dev.h new file mode 100644 index 0000000..2aa172f --- /dev/null +++ b/ppapi/c/dev/ppb_opengles2ext_dev.h @@ -0,0 +1,82 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This file is auto-generated from +// gpu/command_buffer/build_gles2_cmd_buffer.py +// DO NOT EDIT! + +// OpenGL ES interface. +#ifndef C_DEV_PPB_OPENGLES2EXT_DEV_H_ +#define C_DEV_PPB_OPENGLES2EXT_DEV_H_ + +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/ppb_opengles2.h" + +#define PPB_OPENGLES2_INSTANCEDARRAYS_DEV_INTERFACE_1_0 \ + "PPB_OpenGLES2InstancedArrays(Dev);1.0" +#define PPB_OPENGLES2_INSTANCEDARRAYS_DEV_INTERFACE \ + PPB_OPENGLES2_INSTANCEDARRAYS_DEV_INTERFACE_1_0 + +struct PPB_OpenGLES2InstancedArrays_Dev { + 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_DEV_INTERFACE_1_0 \ + "PPB_OpenGLES2FramebufferBlit(Dev);1.0" +#define PPB_OPENGLES2_FRAMEBUFFERBLIT_DEV_INTERFACE \ + PPB_OPENGLES2_FRAMEBUFFERBLIT_DEV_INTERFACE_1_0 + +struct PPB_OpenGLES2FramebufferBlit_Dev { + 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_DEV_INTERFACE_1_0 \ + "PPB_OpenGLES2FramebufferMultisample(Dev);1.0" +#define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_DEV_INTERFACE \ + PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_DEV_INTERFACE_1_0 + +struct PPB_OpenGLES2FramebufferMultisample_Dev { + void (*RenderbufferStorageMultisampleEXT)( + PP_Resource context, GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height); +}; + +#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_DEV_INTERFACE_1_0 \ + "PPB_OpenGLES2ChromiumEnableFeature(Dev);1.0" +#define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_DEV_INTERFACE \ + PPB_OPENGLES2_CHROMIUMENABLEFEATURE_DEV_INTERFACE_1_0 + +struct PPB_OpenGLES2ChromiumEnableFeature_Dev { + GLboolean (*EnableFeatureCHROMIUM)(PP_Resource context, const char* feature); +}; + +#define PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0 \ + "PPB_OpenGLES2ChromiumMapSub(Dev);1.0" +#define PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE \ + PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0 + +struct PPB_OpenGLES2ChromiumMapSub_Dev { + 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 (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem); +}; + +#endif // C_DEV_PPB_OPENGLES2EXT_DEV_H_ + |