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

Unified Diff: android_webview/browser/aw_gl_methods.h

Issue 655813004: Part 1: Refactor Android WebView graphics code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: rebase Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/aw_gl_methods.h
diff --git a/android_webview/browser/aw_gl_methods.h b/android_webview/browser/aw_gl_methods.h
new file mode 100644
index 0000000000000000000000000000000000000000..687a133abfc2a55bfeb159e5178936e58451a6ff
--- /dev/null
+++ b/android_webview/browser/aw_gl_methods.h
@@ -0,0 +1,30 @@
+// Copyright 2014 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_BROWSER_AW_GL_METHODS_H_
+#define ANDROID_WEBVIEW_BROWSER_AW_GL_METHODS_H_
+
+#include <jni.h>
+
+namespace android_webview {
+
+/*
+ * An interface that defines GL related methods on the webview.
+ */
+class AwGLMethods {
boliu 2014/10/23 16:40:05 virtual destructor
hush (inactive) 2014/10/24 21:31:33 No AwGLMethods anymore in the next patch...
+ public:
+ // Request DrawGL be called. Passing null |canvas| implies the request
+ // will be of AwDrawGLInfo::kModeProcess type. |wait_for_completion|
+ // will cause the call to block until DrawGL has happened; it does not
+ // work when |canvas| is not NULL. The callback may never be made, and
+ // the mode may be promoted to kModeDraw.
+ virtual bool RequestDrawGL(jobject canvas, bool wait_for_completion) = 0;
+
+ // Immediately calls invalidate when the functor is destroyed so that
+ // the destroyed functor is cleared from the displaylist kept by Android.
+ virtual void InvalidateOnFunctorDestroy() = 0;
boliu 2014/10/23 16:40:05 Nothing calls this yet, right? Move it to the foll
hush (inactive) 2014/10/24 21:31:33 No AwGLMethods anymore in the next patch...
+};
+}
boliu 2014/10/23 16:40:05 nit: space above and comment on closing brace
hush (inactive) 2014/10/24 21:31:33 No AwGLMethods anymore in the next patch...
+
+#endif // ANDROID_WEBVIEW_BROWSER_AW_GL_METHODS_H_

Powered by Google App Engine
This is Rietveld 408576698