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

Side by Side 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: Fixing a few cases where GraphicBuffer was used Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ 5 #ifndef ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_
6 #define ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ 6 #define ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_
7 7
8 #ifdef __cplusplus 8 #ifdef __cplusplus
9 extern "C" { 9 extern "C" {
10 #endif 10 #endif
11 11
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Function to invoke a direct GL draw into the client's pre-configured 71 // Function to invoke a direct GL draw into the client's pre-configured
72 // GL context. Obtained via AwContents.getDrawGLFunction() (static). 72 // GL context. Obtained via AwContents.getDrawGLFunction() (static).
73 // |view_context| is an opaque identifier that was returned by the corresponding 73 // |view_context| is an opaque identifier that was returned by the corresponding
74 // call to AwContents.getAwDrawGLViewContext(). 74 // call to AwContents.getAwDrawGLViewContext().
75 // |draw_info| carries the in and out parameters for this draw. 75 // |draw_info| carries the in and out parameters for this draw.
76 // |spare| ignored; pass NULL. 76 // |spare| ignored; pass NULL.
77 typedef void (AwDrawGLFunction)(int view_context, 77 typedef void (AwDrawGLFunction)(int view_context,
78 AwDrawGLInfo* draw_info, 78 AwDrawGLInfo* draw_info,
79 void* spare); 79 void* spare);
80 80
81 // Called to create a GraphicBuffer
82 typedef int AwCreateGraphicBufferFunction(int w, int h);
83 // Called to release a GraphicBuffer
84 typedef void AwReleaseGraphicBufferFunction(int buffer_id);
85 // Called to lock a GraphicBuffer for writing
86 typedef int AwLockForWriteFunction(int buffer_id, void** vaddr);
87 // Called to unlock a GraphicBuffer
88 typedef int AwUnlockFunction(int buffer_id);
89 // Called to get a native buffer pointer
90 typedef void* AwGetNativeBufferFunction(int buffer_id);
91 // Called to get the stride of the buffer
92 typedef unsigned int AwGetStrideFunction(int buffer_id);
93
94 // Set of functions used in rendering in hardware mode
95 struct AwDrawGLFunctionTable {
96 AwCreateGraphicBufferFunction* create_graphic_buffer;
97 AwReleaseGraphicBufferFunction* release_graphic_buffer;
98 AwLockForWriteFunction* lock_for_write;
99 AwUnlockFunction* unlock;
100 AwGetNativeBufferFunction* get_native_buffer;
101 AwGetStrideFunction* get_stride;
102 };
103
81 #ifdef __cplusplus 104 #ifdef __cplusplus
82 } // extern "C" 105 } // extern "C"
83 #endif 106 #endif
84 107
85 #endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ 108 #endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_
OLDNEW
« 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