forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
leandrogracia@chromium.org
committed
Nov 2, 2012
1 parent
61847e3
commit 3359ab1
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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_ |