summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 11:31:17 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 11:31:17 +0000
commita978921b65ea85602254880f33b59175a5543fae (patch)
tree58e65152dfbe8979d76623781218a094783e1ee5
parent927a9d67ceaddc3811fdeb4e25622aae59819f0b (diff)
downloadchromium_src-a978921b65ea85602254880f33b59175a5543fae.zip
chromium_src-a978921b65ea85602254880f33b59175a5543fae.tar.gz
chromium_src-a978921b65ea85602254880f33b59175a5543fae.tar.bz2
Rename GLDraw to DrawGL.
We were using both before and it was getting confusing. Also removed unneeded kStatusMaskDrew BUG= Review URL: https://codereview.chromium.org/11293166 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166896 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--android_webview/android_webview.gyp2
-rw-r--r--android_webview/java/src/org/chromium/android_webview/AwContents.java14
-rw-r--r--android_webview/native/aw_contents.cc16
-rw-r--r--android_webview/native/aw_contents.h4
-rw-r--r--android_webview/public/browser/draw_gl.h (renamed from android_webview/public/browser/gl_draw.h)17
5 files changed, 26 insertions, 27 deletions
diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp
index 99f1e05..10113c9 100644
--- a/android_webview/android_webview.gyp
+++ b/android_webview/android_webview.gyp
@@ -91,7 +91,7 @@
'lib/aw_browser_dependency_factory_impl.h',
'lib/main/aw_main_delegate.cc',
'lib/main/aw_main_delegate.h',
- 'public/browser/gl_draw.h',
+ 'public/browser/draw_gl.h',
'renderer/aw_content_renderer_client.cc',
'renderer/aw_content_renderer_client.h',
'renderer/aw_render_process_observer.cc',
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 3c018d5..c5e38c3 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -233,19 +233,19 @@ public class AwContents {
mCleanupReference.cleanupNow();
}
- public static int getAwGLDrawFunction() {
- return nativeGetAwGLDrawFunction();
+ public static int getAwDrawGLFunction() {
+ return nativeGetAwDrawGLFunction();
}
- public int getAwGLDrawViewContext() {
+ public int getAwDrawGLViewContext() {
// Using the native pointer as the returned viewContext. This is matched by the
- // reinterpret_cast back to AwContents pointer in the native GLDrawFunction.
+ // reinterpret_cast back to AwContents pointer in the native DrawGLFunction.
return mNativeAwContents;
}
- public boolean onPrepareGLDraw(Canvas canvas) {
+ public boolean onPrepareDrawGL(Canvas canvas) {
// TODO(joth): Ensure the HW path is setup and read any required params out of canvas.
- Log.e(TAG, "Not implemented: AwContents.onPrepareGlDraw()");
+ Log.e(TAG, "Not implemented: AwContents.onPrepareDrawGL()");
// returning false will cause a fallback to SW path.
return true;
@@ -565,7 +565,7 @@ public class AwContents {
private native int nativeInit(AwWebContentsDelegate webViewWebContentsDelegate,
boolean privateBrowsing);
private static native void nativeDestroy(int nativeAwContents);
- private static native int nativeGetAwGLDrawFunction();
+ private static native int nativeGetAwDrawGLFunction();
private native int nativeGetWebContents(int nativeAwContents);
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 1419646..7e28fdd 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -40,13 +40,13 @@ using content::InterceptNavigationDelegate;
using content::WebContents;
extern "C" {
-static AwGLDrawFunction GLDrawFunction;
-static void GLDrawFunction(int view_context,
- AwGLDrawInfo* draw_info,
+static AwDrawGLFunction DrawGLFunction;
+static void DrawGLFunction(int view_context,
+ AwDrawGLInfo* draw_info,
void* spare) {
// |view_context| is the value that was returned from the java
- // AwContents.onPrepareGlDraw; this cast must match the code there.
- reinterpret_cast<android_webview::AwContents*>(view_context)->GLDraw(
+ // AwContents.onPrepareDrawGL; this cast must match the code there.
+ reinterpret_cast<android_webview::AwContents*>(view_context)->DrawGL(
draw_info);
}
}
@@ -107,7 +107,7 @@ AwContents::~AwContents() {
find_helper_->SetListener(NULL);
}
-void AwContents::GLDraw(AwGLDrawInfo* draw_info) {
+void AwContents::DrawGL(AwDrawGLInfo* draw_info) {
// TODO(joth): Do some drawing.
}
@@ -120,8 +120,8 @@ void AwContents::Destroy(JNIEnv* env, jobject obj) {
}
// static
-jint GetAwGLDrawFunction(JNIEnv* env, jclass) {
- return reinterpret_cast<jint>(&GLDrawFunction);
+jint GetAwDrawGLFunction(JNIEnv* env, jclass) {
+ return reinterpret_cast<jint>(&DrawGLFunction);
}
namespace {
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
index 8728192..2011dc8 100644
--- a/android_webview/native/aw_contents.h
+++ b/android_webview/native/aw_contents.h
@@ -9,7 +9,7 @@
#include <string>
#include "android_webview/browser/find_helper.h"
-#include "android_webview/public/browser/gl_draw.h"
+#include "android_webview/public/browser/draw_gl.h"
#include "base/android/scoped_java_ref.h"
#include "base/android/jni_helper.h"
#include "base/memory/scoped_ptr.h"
@@ -42,7 +42,7 @@ class AwContents : public FindHelper::Listener {
bool private_browsing);
virtual ~AwContents();
- void GLDraw(AwGLDrawInfo* draw_info);
+ void DrawGL(AwDrawGLInfo* draw_info);
void RunJavaScriptDialog(
content::JavaScriptMessageType message_type,
diff --git a/android_webview/public/browser/gl_draw.h b/android_webview/public/browser/draw_gl.h
index 15447aa..75a3a61 100644
--- a/android_webview/public/browser/gl_draw.h
+++ b/android_webview/public/browser/draw_gl.h
@@ -2,15 +2,15 @@
// 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_
+#ifndef ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_
+#define ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_
#ifdef __cplusplus
extern "C" {
#endif
// Holds the information required to trigger an OpenGL drawing operation.
-struct AwGLDrawInfo {
+struct AwDrawGLInfo {
// Input: Tells the Draw function what action to perform.
enum Mode {
kModeDraw,
@@ -38,7 +38,6 @@ struct AwGLDrawInfo {
kStatusMaskDone = 0x0,
kStatusMaskDraw = 0x1,
kStatusMaskInvoke = 0x2,
- kStatusMaskDrew = 0x4,
} status_mask;
// Output: dirty region to redraw.
@@ -49,17 +48,17 @@ struct AwGLDrawInfo {
};
// Function to invoke a direct GL draw into the client's pre-configured
-// GL context. Obtained via AwContents.getGLDrawFunction() (static).
+// GL context. Obtained via AwContents.getDrawGLFunction() (static).
// |view_context| is an opaque identifier that was returned by the corresponding
-// call to AwContents.getAwGLDrawViewContext().
+// call to AwContents.getAwDrawGLViewContext().
// |draw_info| carries the in and out parameters for this draw.
// |spare| ignored; pass NULL.
-typedef void (AwGLDrawFunction)(int view_context,
- AwGLDrawInfo* draw_info,
+typedef void (AwDrawGLFunction)(int view_context,
+ AwDrawGLInfo* draw_info,
void* spare);
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_GL_DRAW_H_
+#endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_