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

Unified Diff: android_webview/browser/in_process_renderer/in_process_view_renderer.h

Issue 15851006: Move synchronous compositor into content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/in_process_renderer/in_process_view_renderer.h
diff --git a/android_webview/browser/in_process_renderer/in_process_view_renderer.h b/android_webview/browser/in_process_renderer/in_process_view_renderer.h
deleted file mode 100644
index 5aa3b4a40c479a0d5a0f609fa66ee7cb6e170dc8..0000000000000000000000000000000000000000
--- a/android_webview/browser/in_process_renderer/in_process_view_renderer.h
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2013 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_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_
-#define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_
-
-#include "android_webview/browser/browser_view_renderer_impl.h"
-
-#include "base/memory/weak_ptr.h"
-#include "content/public/renderer/android/synchronous_compositor_client.h"
-
-namespace content {
-class SynchronousCompositor;
-class WebContents;
-}
-
-namespace android_webview {
-
-// 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:
- InProcessViewRenderer(BrowserViewRenderer::Client* client,
- JavaHelper* java_helper);
- virtual ~InProcessViewRenderer();
-
- static InProcessViewRenderer* FromWebContents(
- content::WebContents* contents);
- static InProcessViewRenderer* FromId(
- int render_process_id, int render_view_id);
- void BindSynchronousCompositor(
- content::SynchronousCompositor* compositor);
-
- // BrowserViewRenderer overrides
- virtual void SetContents(
- content::ContentViewCore* content_view_core) OVERRIDE;
- virtual bool PrepareDrawGL(int x, int y) OVERRIDE;
- virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE;
- virtual bool DrawSW(jobject java_canvas,
- const gfx::Rect& clip_bounds) OVERRIDE;
- virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE;
- virtual void EnableOnNewPicture(bool enabled) OVERRIDE;
- virtual void OnVisibilityChanged(
- bool view_visible, bool window_visible) OVERRIDE;
- virtual void OnSizeChanged(int width, int height) OVERRIDE;
- virtual void OnAttachedToWindow(int width, int height) OVERRIDE;
- virtual void OnDetachedFromWindow() OVERRIDE;
- virtual bool IsAttachedToWindow() OVERRIDE;
- virtual bool IsViewVisible() OVERRIDE;
- virtual gfx::Rect GetScreenRect() OVERRIDE;
-
- // SynchronousCompositorClient overrides
- virtual void DidDestroyCompositor(
- content::SynchronousCompositor* compositor) OVERRIDE;
- virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE;
-
- void WebContentsGone();
-
- private:
- void Invalidate();
- void EnsureContinuousInvalidation();
- bool DrawSWInternal(jobject java_canvas,
- const gfx::Rect& clip_bounds);
- bool RenderSW(SkCanvas* canvas);
- bool CompositeSW(SkCanvas* canvas);
-
- BrowserViewRenderer::Client* client_;
- BrowserViewRenderer::JavaHelper* java_helper_;
- content::WebContents* web_contents_;
- content::SynchronousCompositor* compositor_;
-
- bool view_visible_;
-
- // When true, we should continuously invalidate and keep drawing, for example
- // to drive animation.
- bool continuous_invalidate_;
- // True while an asynchronous invalidation task is pending.
- bool continuous_invalidate_task_pending_;
-
- int width_;
- int height_;
-
- bool attached_to_window_;
- bool hardware_initialized_;
- bool hardware_failed_;
-
- // Used only for detecting Android View System context changes.
- // Not to be used between draw calls.
- EGLContext egl_context_at_init_;
-
- // Last View scroll before hardware rendering is triggered.
- gfx::Point hw_rendering_scroll_;
-
- base::WeakPtrFactory<InProcessViewRenderer> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer);
-};
-
-} // namespace android_webview
-
-#endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_

Powered by Google App Engine
This is Rietveld 408576698