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

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: Fix comments in ui/gl/pixel_buffer.h 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..bfbf8a4575351f0b0e057c9af88a1a9dd534b09b 100644
--- a/android_webview/public/browser/draw_gl.h
+++ b/android_webview/public/browser/draw_gl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -78,6 +78,29 @@ 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 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;
+ AwLockForWriteFunction* lock_for_write;
+ AwUnlockFunction* unlock;
+ AwGetNativeBufferFunction* get_native_buffer;
+ AwGetStrideFunction* get_stride;
+};
+
#ifdef __cplusplus
} // extern "C"
#endif
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | android_webview/renderer/DEPS » ('j') | cc/cc.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698