Index: android_webview/browser/in_process_view_renderer.h |
diff --git a/android_webview/browser/in_process_view_renderer.h b/android_webview/browser/in_process_view_renderer.h |
index 6e66a8441b48ae88d5ab70cdf31f33d69c76a88d..856da5f923d846863335dffe93ccd4adcfbc1435 100644 |
--- a/android_webview/browser/in_process_view_renderer.h |
+++ b/android_webview/browser/in_process_view_renderer.h |
@@ -12,21 +12,29 @@ |
#include "base/cancelable_callback.h" |
#include "content/public/browser/android/synchronous_compositor_client.h" |
#include "ui/gfx/vector2d_f.h" |
+#include "ui/gl/android/gl_factory_android.h" |
namespace content { |
class SynchronousCompositor; |
class WebContents; |
} |
+namespace gfx { |
+class GLSurface; |
+} |
+ |
typedef void* EGLContext; |
class SkCanvas; |
namespace android_webview { |
+class AwGLSurface; |
+ |
// Provides RenderViewHost wrapper functionality for sending WebView-specific |
// IPC messages to the renderer and from there to WebKit. |
class InProcessViewRenderer : public BrowserViewRenderer, |
- public content::SynchronousCompositorClient { |
+ public content::SynchronousCompositorClient, |
+ public gfx::GLFactoryAndroid { |
public: |
InProcessViewRenderer(BrowserViewRenderer::Client* client, |
JavaHelper* java_helper, |
@@ -36,7 +44,7 @@ class InProcessViewRenderer : public BrowserViewRenderer, |
static InProcessViewRenderer* FromWebContents( |
content::WebContents* contents); |
- // BrowserViewRenderer overrides |
+ // BrowserViewRenderer overrides. |
virtual bool OnDraw(jobject java_canvas, |
bool is_hardware_canvas, |
const gfx::Vector2d& scroll_, |
@@ -58,7 +66,7 @@ class InProcessViewRenderer : public BrowserViewRenderer, |
virtual bool IsViewVisible() OVERRIDE; |
virtual gfx::Rect GetScreenRect() OVERRIDE; |
- // SynchronousCompositorClient overrides |
+ // SynchronousCompositorClient overrides. |
virtual void DidInitializeCompositor( |
content::SynchronousCompositor* compositor) OVERRIDE; |
virtual void DidDestroyCompositor( |
@@ -71,6 +79,9 @@ class InProcessViewRenderer : public BrowserViewRenderer, |
virtual void DidOverscroll(gfx::Vector2dF latest_overscroll_delta, |
gfx::Vector2dF current_fling_velocity) OVERRIDE; |
+ // gfx::GLFactoryAndroid overrides. |
+ virtual scoped_refptr<gfx::GLSurface> CreateNonOwnedViewSurface() OVERRIDE; |
+ |
void WebContentsGone(); |
bool RequestProcessGL(); |
@@ -93,6 +104,8 @@ class InProcessViewRenderer : public BrowserViewRenderer, |
void NoLongerExpectsDrawGL(); |
+ bool InitializeHwDraw(); |
+ |
// For debug tracing or logging. Return the string representation of this |
// view renderer's state and the |draw_info| if provided. |
std::string ToString(AwDrawGLInfo* draw_info) const; |
@@ -127,6 +140,7 @@ class InProcessViewRenderer : public BrowserViewRenderer, |
bool attached_to_window_; |
bool hardware_initialized_; |
bool hardware_failed_; |
+ scoped_refptr<AwGLSurface> gl_surface_; |
// Used only for detecting Android View System context changes. |
// Not to be used between draw calls. |