diff options
author | alexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 17:16:54 +0000 |
---|---|---|
committer | alexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 17:16:54 +0000 |
commit | d0eed26269fb7026938db68094e1e30077a044e5 (patch) | |
tree | 2971bd9c2bf6339437c729ea29295ce3a7ee8ce9 /gpu/GLES2 | |
parent | 9af439a537208fc73a8b513c6f2440606890ad44 (diff) | |
download | chromium_src-d0eed26269fb7026938db68094e1e30077a044e5.zip chromium_src-d0eed26269fb7026938db68094e1e30077a044e5.tar.gz chromium_src-d0eed26269fb7026938db68094e1e30077a044e5.tar.bz2 |
Rearrange GLImage API to create them with a usage type
instead of using usage type while mapping the buffer.
BUG=
Review URL: https://codereview.chromium.org/255713008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/GLES2')
-rw-r--r-- | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt (renamed from gpu/GLES2/extensions/CHROMIUM/CHROMIUM_map_image.txt) | 40 | ||||
-rw-r--r-- | gpu/GLES2/gl2extchromium.h | 24 |
2 files changed, 41 insertions, 23 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_map_image.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt index 6304fda..154f91e 100644 --- a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_map_image.txt +++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt @@ -1,14 +1,14 @@ Name - CHROMIUM_map_image + CHROMIUM_image Name Strings - GL_CHROMIUM_map_image + GL_CHROMIUM_image Version - Last Modifed Date: May 9, 2013 + Last Modifed Date: Apr 30, 2014 Dependencies @@ -17,7 +17,9 @@ Dependencies Overview This extension allows for more efficient uploading of texture data through - Chromium's OpenGL ES 2.0 implementation. + Chromium's OpenGL ES 2.0 implementation as well as enable hardware overlay + support by providing ability to create buffers capable of being scanned out + directly by the display controller. For security reasons Chromium accesses the GPU from a separate process. User processes are not allowed to access the GPU directly. This multi-process @@ -34,12 +36,19 @@ Issues New Tokens - None + Accepted by the <pname> parameter of GetImageParameterivCHROMIUM: + + IMAGE_ROWBYTES_CHROMIUM 0x78F0 + + Accepted by the <usage> parameter of CreateImageCHROMIUM: + + IMAGE_MAP_CHROMIUM 0x78F1 + IMAGE_SCANOUT_CHROMIUM 0x78F2 New Procedures and Functions - GLuint CreateImageCHROMIUM (GLsizei width, GLsizei height, - GLenum internalformat) + GLuint CreateImageCHROMIUM(GLsizei width, GLsizei height, + GLenum internalformat, GLenum usage) Allocate an image with width equal to <width> and height equal to <height> stored in format <internalformat>. @@ -49,27 +58,27 @@ New Procedures and Functions INVALID_VALUE is generated if <width> or <height> is nonpositive. - void DestroyImageCHROMIUM (GLuint image_id) + INVALID_ENUM is generated if <usage> is not one of + IMAGE_MAP_CHROMIUM and IMAGE_SCANOUT_CHROMIUM. + + void DestroyImageCHROMIUM(GLuint image_id) Frees the image previously allocated by a call to CreateImageCHROMIUM. INVALID_OPERATION is generated if <image_id> is not a valid image id. - void* MapImageCHROMIUM (GLuint image_id, GLenum access) + void* MapImageCHROMIUM(GLuint image_id) Returns a pointer to in the user memory for the application to modify - the image. <access> parameter defines if the user will read or write the - pixels. + the image. It is illegal to call this function on an image not created + with IMAGE_MAP_CHROMIUM usage. INVALID_OPERATION is generated if <image_id> is not a valid image id. INVALID_OPERATION is generated if the image was already mapped by a previous call to this method. - INVALID_ENUM is generated if <access> is not one of WRITE_ONLY, READ_ONLY - and READ_WRITE. - - void UnmapImageCHROMIUM (GLuint image_id) + void UnmapImageCHROMIUM(GLuint image_id) Removes the mapping created by a call to MapImageCHROMIUM. @@ -105,3 +114,4 @@ New State Revision History 5/9/2013 Documented the extension + 4/30/2014 Moved usage flag to creation function. diff --git a/gpu/GLES2/gl2extchromium.h b/gpu/GLES2/gl2extchromium.h index 0bdf717..d78f8ef 100644 --- a/gpu/GLES2/gl2extchromium.h +++ b/gpu/GLES2/gl2extchromium.h @@ -94,7 +94,7 @@ typedef GLboolean (GL_APIENTRY PFNGLUNMAPBUFFERCHROMIUM) (GLuint target); #endif #endif /* GL_CHROMIUM_pixel_transfer_buffer_object */ -/* GL_CHROMIUM_map_image */ +/* GL_CHROMIUM_image */ #ifndef GL_CHROMIUM_map_image #define GL_CHROMIUM_map_image 1 @@ -102,21 +102,29 @@ typedef GLboolean (GL_APIENTRY PFNGLUNMAPBUFFERCHROMIUM) (GLuint target); #define GL_IMAGE_ROWBYTES_CHROMIUM 0x78F0 #endif -#ifndef GL_READ_WRITE -#define GL_READ_WRITE 0x88BA +#ifndef GL_IMAGE_MAP_CHROMIUM +#define GL_IMAGE_MAP_CHROMIUM 0x78F1 +#endif + +#ifndef GL_IMAGE_SCANOUT_CHROMIUM +#define GL_IMAGE_SCANOUT_CHROMIUM 0x78F2 #endif #ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLuint GL_APIENTRY glCreateImageCHROMIUM( - GLsizei width, GLsizei height, GLenum internalformat); +GL_APICALL GLuint GL_APIENTRY glCreateImageCHROMIUM(GLsizei width, + GLsizei height, + GLenum internalformat, + GLenum usage); GL_APICALL void GL_APIENTRY glDestroyImageCHROMIUM(GLuint image_id); GL_APICALL void GL_APIENTRY glGetImageParameterivCHROMIUM( GLuint image_id, GLenum pname, GLint* params); -GL_APICALL void* GL_APIENTRY glMapImageCHROMIUM(GLuint image_id, GLenum access); +GL_APICALL void* GL_APIENTRY glMapImageCHROMIUM(GLuint image_id); GL_APICALL void GL_APIENTRY glUnmapImageCHROMIUM(GLuint image_id); #endif -typedef GLuint (GL_APIENTRYP PFNGLCREATEIMAGECHROMIUMPROC) ( - GLsizei width, GLsizei height, GLenum internalformat); +typedef GLuint(GL_APIENTRYP PFNGLCREATEIMAGECHROMIUMPROC)( + GLsizei width, + GLsizei height, + GLenum internalformat); typedef void ( GL_APIENTRYP PFNGLDESTROYIMAGECHROMIUMPROC) (GLuint image_id); typedef void ( |