diff options
author | kaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-21 05:09:13 +0000 |
---|---|---|
committer | kaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-21 05:09:13 +0000 |
commit | 263f15d8495dd3c973ba68b8391d48abeb8a50f7 (patch) | |
tree | 299669f9a7ec2bcdf107fa5aed9b93e1840a1c05 /android_webview/public | |
parent | 5fce201d6f88bb79b0c5ccee7870bff21179c0dd (diff) | |
download | chromium_src-263f15d8495dd3c973ba68b8391d48abeb8a50f7.zip chromium_src-263f15d8495dd3c973ba68b8391d48abeb8a50f7.tar.gz chromium_src-263f15d8495dd3c973ba68b8391d48abeb8a50f7.tar.bz2 |
Change lock/unlock to map/unmap in DrawGL methods. It also changes the API to take the map mode as a public enum rather than an int.
BUG=175012
Review URL: https://chromiumcodereview.appspot.com/15268007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/public')
-rw-r--r-- | android_webview/public/browser/draw_gl.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/android_webview/public/browser/draw_gl.h b/android_webview/public/browser/draw_gl.h index 1d124c8..e3108d5 100644 --- a/android_webview/public/browser/draw_gl.h +++ b/android_webview/public/browser/draw_gl.h @@ -77,16 +77,20 @@ struct AwDrawGLInfo { typedef void (AwDrawGLFunction)(int view_context, AwDrawGLInfo* draw_info, void* spare); +enum AwMapMode { + MAP_READ_ONLY, + MAP_WRITE_ONLY, + MAP_READ_WRITE, +}; // Called to create a GraphicBuffer typedef int AwCreateGraphicBufferFunction(int w, int h); // Called to release a GraphicBuffer typedef void AwReleaseGraphicBufferFunction(int buffer_id); -// Called to lock a GraphicBuffer in |mode|, which is -// defined in AccessMode enum in gpu/command_buffer/client/gpu_memory_buffer.h -typedef int AwLockFunction(int buffer_id, int mode, void** vaddr); -// Called to unlock a GraphicBuffer -typedef int AwUnlockFunction(int buffer_id); +// Called to map a GraphicBuffer in |mode|. +typedef int AwMapFunction(int buffer_id, AwMapMode mode, void** vaddr); +// Called to unmap a GraphicBuffer +typedef int AwUnmapFunction(int buffer_id); // Called to get a native buffer pointer typedef void* AwGetNativeBufferFunction(int buffer_id); // Called to get the stride of the buffer @@ -96,8 +100,8 @@ typedef unsigned int AwGetStrideFunction(int buffer_id); struct AwDrawGLFunctionTable { AwCreateGraphicBufferFunction* create_graphic_buffer; AwReleaseGraphicBufferFunction* release_graphic_buffer; - AwLockFunction* lock; - AwUnlockFunction* unlock; + AwMapFunction* map; + AwUnmapFunction* unmap; AwGetNativeBufferFunction* get_native_buffer; AwGetStrideFunction* get_stride; }; |