summaryrefslogtreecommitdiffstats
path: root/android_webview/public
diff options
context:
space:
mode:
authorkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 20:38:15 +0000
committerkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 20:38:15 +0000
commit73ae0f3ea90c5913d66f88b69b4c0c62bec48781 (patch)
tree0037c030e2b2761cd1dc907692a6a9f6d366ffd2 /android_webview/public
parent95051d774a3f4e8266bb75310db5d9e053134a0a (diff)
downloadchromium_src-73ae0f3ea90c5913d66f88b69b4c0c62bec48781.zip
chromium_src-73ae0f3ea90c5913d66f88b69b4c0c62bec48781.tar.gz
chromium_src-73ae0f3ea90c5913d66f88b69b4c0c62bec48781.tar.bz2
android_webview: changes to support Android GraphicBuffers
BUG=175012 Review URL: https://chromiumcodereview.appspot.com/13135004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/public')
-rw-r--r--android_webview/public/browser/draw_gl.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/android_webview/public/browser/draw_gl.h b/android_webview/public/browser/draw_gl.h
index 441793e..bfbf8a4 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