diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-07 19:05:14 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-07 19:05:14 +0000 |
commit | 3e89600cff82761ccf4cad606b6ea6c12148fd65 (patch) | |
tree | ba65f86fe6d4de1147114aede1503c2523049e52 /android_webview/public | |
parent | 0c719374f8228f5615005cdd9fa4fc7cbc7554f2 (diff) | |
download | chromium_src-3e89600cff82761ccf4cad606b6ea6c12148fd65.zip chromium_src-3e89600cff82761ccf4cad606b6ea6c12148fd65.tar.gz chromium_src-3e89600cff82761ccf4cad606b6ea6c12148fd65.tar.bz2 |
Plumbing to support AwContents direct GLDraw api.
This will allow the embedder to invoke a GL draw of the content, into an externally
managed GL context.
Still todo: the actual draw implementation.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11358118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/public')
-rw-r--r-- | android_webview/public/browser/gl_draw.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/android_webview/public/browser/gl_draw.h b/android_webview/public/browser/gl_draw.h index e494ab4..15447aa 100644 --- a/android_webview/public/browser/gl_draw.h +++ b/android_webview/public/browser/gl_draw.h @@ -11,6 +11,11 @@ extern "C" { // Holds the information required to trigger an OpenGL drawing operation. struct AwGLDrawInfo { + // Input: Tells the Draw function what action to perform. + enum Mode { + kModeDraw, + kModeProcess, + } mode; // Input: current clip rect. int clip_left; @@ -28,6 +33,14 @@ struct AwGLDrawInfo { // Input: current transform matrix, in OpenGL format. float transform[16]; + // Output: tells the caller what to do next. + enum StatusMask { + kStatusMaskDone = 0x0, + kStatusMaskDraw = 0x1, + kStatusMaskInvoke = 0x2, + kStatusMaskDrew = 0x4, + } status_mask; + // Output: dirty region to redraw. float dirty_left; float dirty_top; @@ -37,13 +50,13 @@ struct AwGLDrawInfo { // Function to invoke a direct GL draw into the client's pre-configured // GL context. Obtained via AwContents.getGLDrawFunction() (static). -// |view_context| is an opaque pointer that was returned by the corresponding -// call to AwContents.onPrepareGlDraw(). +// |view_context| is an opaque identifier that was returned by the corresponding +// call to AwContents.getAwGLDrawViewContext(). // |draw_info| carries the in and out parameters for this draw. // |spare| ignored; pass NULL. -typedef void (*AwGLDrawFunction)(void* view_context, - const GLDrawInfo* draw_info, - void* spare); +typedef void (AwGLDrawFunction)(int view_context, + AwGLDrawInfo* draw_info, + void* spare); #ifdef __cplusplus } // extern "C" |