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 |