From de43f08cb12255fd51a270258c52148b2d12e781 Mon Sep 17 00:00:00 2001 From: "hubbe@chromium.org" Date: Tue, 2 Apr 2013 01:16:10 +0000 Subject: Implement client side PBOs for glReadPixel Use PBOs in gl_helper swizzle bytes on gpu flip vertically on gpu remove gl_helper_thread Implements GLHelper::CropScaleReadbackAndCleanTexture() to be non-blocking in the client by using shared memory combined with a query (not requiring actual GL PBO support, which would not be available on Android). Review URL: https://chromiumcodereview.appspot.com/12892005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191737 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/GLES2/gl2extchromium.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gpu/GLES2') diff --git a/gpu/GLES2/gl2extchromium.h b/gpu/GLES2/gl2extchromium.h index dcb355a..4218406 100644 --- a/gpu/GLES2/gl2extchromium.h +++ b/gpu/GLES2/gl2extchromium.h @@ -70,7 +70,9 @@ typedef void (GL_APIENTRYP PFNGLCONSUMETEXTURECHROMIUMPROC) ( #define GL_CHROMIUM_pixel_transfer_buffer_object 1 #ifndef GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM +// TODO(reveman): Get official numbers for this constants. #define GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM 0x78EC +#define GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM 0x78ED #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void* GL_APIENTRY glMapBufferCHROMIUM(GLuint target,GLenum access); @@ -82,7 +84,13 @@ typedef GLboolean (GL_APIENTRY PFNGLUNMAPBUFFERCHROMIUM) (GLuint target); #endif /* GL_CHROMIUM_pixel_transfer_buffer_object */ #ifndef GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM +// TODO(reveman): Get official numbers for this constants. #define GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM 0x78EF +#define GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM 0x78EE +#endif + +#ifndef GL_STREAM_READ +#define GL_STREAM_READ 0x88E1 #endif #endif /* GL_CHROMIUM_pixel_transfer_buffer_object */ @@ -576,4 +584,3 @@ typedef void (GL_APIENTRYP PFNGLWAITSYNCPOINTCHROMIUMPROC) (GLuint sync_point); #endif #endif // GPU_GLES2_GL2EXTCHROMIUM_H_ - -- cgit v1.1