diff options
author | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-19 03:20:27 +0000 |
---|---|---|
committer | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-19 03:20:27 +0000 |
commit | b64c2495b3b3ac66edcb31667e17942dd7888b1a (patch) | |
tree | 1c18d654caa67a8d99cbd81a16679c2ee36f9ba9 /third_party | |
parent | 7e1942af8a3fd104735e9c3b7b8800772b8c13b6 (diff) | |
download | chromium_src-b64c2495b3b3ac66edcb31667e17942dd7888b1a.zip chromium_src-b64c2495b3b3ac66edcb31667e17942dd7888b1a.tar.gz chromium_src-b64c2495b3b3ac66edcb31667e17942dd7888b1a.tar.bz2 |
Introduction of CHROMIUM_copy_texture extension that respects pixel-store semantics, and allows copying of BGRA textures.
OpenGL ES does not natively allow for copying textures with a BGRA format. The EXT_texture_format_BGRA8888 extension does not specify support for glCopyTexImage calls on these textures.
This extension provides a routine to perform texture copies to/from BGRA-backed textures that also respects the following CHROMIUM pixel storage modifiers:
UNPACK_FLIP_Y_CHROMIUM
UNPACK_PREMULTIPLY_ALPHA_CHROMIUM
This extension will be useful for the following purposes:
- Copying accelerated Canvas2D contents to WebGL textures without a software readback. (And potentially the same for video-webgl texture copies.)
- Copying Canvas2D contents to the compositor backing store.
BUG=101051
TEST=none
Review URL: http://codereview.chromium.org/9968113
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/khronos/GLES2/gl2ext.h | 18 | ||||
-rw-r--r-- | third_party/khronos/README.chromium | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/third_party/khronos/GLES2/gl2ext.h b/third_party/khronos/GLES2/gl2ext.h index 04fa4e0..8effd30 100644 --- a/third_party/khronos/GLES2/gl2ext.h +++ b/third_party/khronos/GLES2/gl2ext.h @@ -1955,6 +1955,24 @@ typedef void (GL_APIENTRYP PFNGLTEXIMAGEIOSURFACE2DCHROMIUM) (GLenum target, GLs #endif #endif +/* GL_CHROMIUM_copy_texture */ +#ifndef GL_CHROMIUM_copy_texture +#ifndef GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM +#define GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM 0x9241 +#endif +#ifndef GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM +#define GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM 0x9243 +#endif +#ifdef GL_GLEXT_PROTOTYPES +#define glCopyTextureCHROMIUM GLES2_GET_FUN(CopyTextureCHROMIUM) +#if !defined(GLES2_USE_CPP_BINDINGS) +GL_APICALL void GL_APIENTRY glCopyTextureCHROMIUM (GLenum target, GLenum source_id, GLenum dest_id, GLint level); +#endif +#else +typedef void (GL_APIENTRYP PFNGLCOPYTEXTURECHROMIUM) (GLenum target, GLenum source_id, GLenum dest_id, GLint level); +#endif +#endif + /* GL_CHROMIUM_command_buffer_query */ /* Exposes GL_CHROMIUM_command_buffer_query. */ diff --git a/third_party/khronos/README.chromium b/third_party/khronos/README.chromium index fb7daee..5a67f08 100644 --- a/third_party/khronos/README.chromium +++ b/third_party/khronos/README.chromium @@ -21,5 +21,6 @@ GLES2/gl2ext.h - Added ANGLE_instanced_arrays - Added GL_EXT_framebuffer_multisample - Added GL_CHROMIUM_command_buffer_query + - Added GL_CHROMIUM_copy_texture EGL/eglplatform.h - Added EGLNative*Type for Mac. |