diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-23 22:21:46 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-23 22:21:46 +0000 |
commit | e51bdf3d4f7bb89497344af0b4a99ff10512c0d5 (patch) | |
tree | f8ea1734e59c778c3acc8b9a4454789c526f15bd /gpu/GLES2 | |
parent | b898f0108b4e39bb86577455470dd42490ff1b7b (diff) | |
download | chromium_src-e51bdf3d4f7bb89497344af0b4a99ff10512c0d5.zip chromium_src-e51bdf3d4f7bb89497344af0b4a99ff10512c0d5.tar.gz chromium_src-e51bdf3d4f7bb89497344af0b4a99ff10512c0d5.tar.bz2 |
Added minimal support to command buffer for GL_ARB_texture_rectangle
textures, and added Mac OS X-specific extension for binding IOSurfaces
to textures. This is infrastructure work for rendering Core Animation
plugins via Chrome's compositor.
Refactored the texture initialization in the command buffer and
associated unit tests. Added unit tests for rectangular textures.
These changes will be hooked up in a subsequent CL. They were split
off for easier review.
There are ongoing discussions about unifying the various mechanisms
for sharing textures across processes, but it's been agreed that those
should not block this work.
BUG=38967
TEST=GPU unit tests; manual testing with forthcoming changes
Review URL: http://codereview.chromium.org/8680002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/GLES2')
-rw-r--r-- | gpu/GLES2/gl2ext.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gpu/GLES2/gl2ext.h b/gpu/GLES2/gl2ext.h index 0d4f788..4ddf729 100644 --- a/gpu/GLES2/gl2ext.h +++ b/gpu/GLES2/gl2ext.h @@ -1401,6 +1401,41 @@ GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLs typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); #endif +/* GL_ARB_texture_rectangle */ +/* Exposes only the subset necessary to support GL_CHROMIUM_iosurface. + */ +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 +#ifndef GL_TEXTURE_RECTANGLE_ARB +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#endif +#ifndef GL_TEXTURE_BINDING_RECTANGLE_ARB +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#endif +#ifndef GL_SAMPLER_2D_RECT_ARB +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#endif +#endif + +/* GL_CHROMIUM_iosurface */ +/* Exposes the Mac OS-specfic CGLTexImageIOSurface2D entry point as a + * Chromium extension in the cross-platform API. Binds the IOSurface with + * the given ID (an IOSurfaceID) to the texture bound to the given target. + * To avoid needing to expose extraneous enums, assumes internal format + * RGBA, format BGRA, and type UNSIGNED_INT_8_8_8_8_REV. + */ +#ifndef GL_CHROMIUM_iosurface +#define GL_CHROMIUM_iosurface 1 +#ifdef GL_GLEXT_PROTOTYPES +#define glTexImageIOSurface2DCHROMIUM GLES2_GET_FUN(TexImageIOSurface2DCHROMIUM) +#if !defined(GLES2_USE_CPP_BINDINGS) +GL_APICALL void GL_APIENTRY glTexImageIOSurface2DCHROMIUM (GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, GLuint plane); +#endif +#else +typedef void (GL_APIENTRYP PFNGLTEXIMAGEIOSURFACE2DCHROMIUM) (GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, GLuint plane); +#endif +#endif + #ifdef __cplusplus } #endif |