Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2303)

Unified Diff: android_webview/public/browser/draw_gl.h

Issue 13135004: android_webview: changes to support Android GraphicBuffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add GetStride() API on the GraphicBuffer Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/public/browser/draw_gl.h
diff --git a/android_webview/public/browser/draw_gl.h b/android_webview/public/browser/draw_gl.h
index 441793e2b57f6127c7b569430a2e39dcf7338640..a88a72c32015d3d695118e0a723b2e58172200eb 100644
--- a/android_webview/public/browser/draw_gl.h
+++ b/android_webview/public/browser/draw_gl.h
@@ -78,6 +78,32 @@ typedef void (AwDrawGLFunction)(int view_context,
AwDrawGLInfo* draw_info,
void* spare);
+// 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 for reading
+typedef int AwLockForReadFunction(int buffer_id, void** vaddr);
+// Called to lock a GraphicBuffer for writing
+typedef int AwLockForWriteFunction(int buffer_id, void** vaddr);
+// Called to unlock a GraphicBuffer
+typedef int AwUnlockFunction(int buffer_id);
+// Called to get a native buffer pointer
+typedef void* AwGetNativeBufferFunction(int buffer_id);
+// Called to get the stride of the buffer
+typedef unsigned int AwGetStrideFunction(int buffer_id);
+
+// Set of functions used in rendering in hardware mode
+struct AwDrawGLFunctionTable {
+ AwCreateGraphicBufferFunction* create_graphic_buffer;
+ AwReleaseGraphicBufferFunction* release_graphic_buffer;
+ AwLockForReadFunction* lock_for_read;
+ AwLockForWriteFunction* lock_for_write;
+ AwUnlockFunction* unlock;
+ AwGetNativeBufferFunction* get_native_buffer;
+ AwGetStrideFunction* get_stride;
+};
+
#ifdef __cplusplus
} // extern "C"
#endif

Powered by Google App Engine
This is Rietveld 408576698