diff options
author | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-02 14:28:32 +0000 |
---|---|---|
committer | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-02 14:28:32 +0000 |
commit | 3359ab1e39cf21a7f624bee9aa822c9647d15aba (patch) | |
tree | 996a2ef2f2ec7e9686a9b74b99adb9bfda10b111 /android_webview/public | |
parent | 61847e380602561fc40598e47d2523278e71b2b5 (diff) | |
download | chromium_src-3359ab1e39cf21a7f624bee9aa822c9647d15aba.zip chromium_src-3359ab1e39cf21a7f624bee9aa822c9647d15aba.tar.gz chromium_src-3359ab1e39cf21a7f624bee9aa822c9647d15aba.tar.bz2 |
[Android] Introduce the information required in WebView to trigger GL drawing operations.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11368032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/public')
-rw-r--r-- | android_webview/public/browser/gl_draw.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/android_webview/public/browser/gl_draw.h b/android_webview/public/browser/gl_draw.h new file mode 100644 index 0000000..e494ab4 --- /dev/null +++ b/android_webview/public/browser/gl_draw.h @@ -0,0 +1,52 @@ +// Copyright (c) 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. + +#ifndef ANDROID_WEBVIEW_PUBLIC_BROWSER_GL_DRAW_H_ +#define ANDROID_WEBVIEW_PUBLIC_BROWSER_GL_DRAW_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +// Holds the information required to trigger an OpenGL drawing operation. +struct AwGLDrawInfo { + + // Input: current clip rect. + int clip_left; + int clip_top; + int clip_right; + int clip_bottom; + + // Input: current width/height of destination surface. + int width; + int height; + + // Input: is the render target an FBO. + bool is_layer; + + // Input: current transform matrix, in OpenGL format. + float transform[16]; + + // Output: dirty region to redraw. + float dirty_left; + float dirty_top; + float dirty_right; + float dirty_bottom; +}; + +// 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(). +// |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); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_GL_DRAW_H_ |