Index: android_webview/browser/browser_view_renderer.h |
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h |
index 60ba7022ef9eca48189e86e11bcd656e018c85c4..74afa8caa6f00e4120ae7867d03a5c9fb77c9265 100644 |
--- a/android_webview/browser/browser_view_renderer.h |
+++ b/android_webview/browser/browser_view_renderer.h |
@@ -10,11 +10,11 @@ |
#include <map> |
#include "android_webview/browser/parent_compositor_draw_constraints.h" |
-#include "android_webview/browser/shared_renderer_state.h" |
#include "base/callback.h" |
#include "base/cancelable_callback.h" |
#include "base/macros.h" |
#include "base/trace_event/trace_event.h" |
+#include "cc/resources/returned_resource.h" |
#include "content/public/browser/android/synchronous_compositor.h" |
#include "content/public/browser/android/synchronous_compositor_client.h" |
#include "skia/ext/refptr.h" |
@@ -51,19 +51,17 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
void RegisterWithWebContents(content::WebContents* web_contents); |
- SharedRendererState* GetAwDrawGLViewContext(); |
bool RequestDrawGL(bool wait_for_completion); |
// Called before either OnDrawHardware or OnDrawSoftware to set the view |
- // state of this frame. |scroll| is the view's current scroll offset. |
+ // state of this frame. |
// |global_visible_rect| is the intersection of the view size and the window |
// in window coordinates. |
- void PrepareToDraw(const gfx::Vector2d& scroll, |
- const gfx::Rect& global_visible_rect); |
+ void PrepareToDraw(const gfx::Rect& global_visible_rect); |
- // Main handlers for view drawing. A false return value indicates no new |
+ // Main handlers for view drawing. A false/null return value indicates no new |
// frame is produced. |
- bool OnDrawHardware(); |
+ scoped_ptr<ChildFrame> OnDrawHardware(); |
bool OnDrawSoftware(SkCanvas* canvas); |
// CapturePicture API methods. |
@@ -73,6 +71,9 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
void ClearView(); |
void SetOffscreenPreRaster(bool enabled); |
+ bool offscreen_pre_raster() { return offscreen_pre_raster_; } |
boliu
2016/03/24 17:34:45
remove
|
+ |
+ void SetExternalDrawConstraints(const ParentCompositorDrawConstraints&); |
boliu
2016/03/24 17:34:45
remove
|
// View update notifications. |
void SetIsPaused(bool paused); |
@@ -97,10 +98,9 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
bool attached_to_window() const { return attached_to_window_; } |
bool hardware_enabled() const { return hardware_enabled_; } |
gfx::Size size() const { return size_; } |
- void ReleaseHardware(); |
bool IsClientVisible() const; |
- void TrimMemory(const int level, const bool visible); |
+ void TrimMemory(const int level); |
// SynchronousCompositorClient overrides. |
void DidInitializeCompositor( |
@@ -120,9 +120,14 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
const gfx::Vector2dF& latest_overscroll_delta, |
const gfx::Vector2dF& current_fling_velocity) override; |
- void UpdateParentDrawConstraints(); |
+ void UpdateParentDrawConstraints(const ParentCompositorDrawConstraints&); |
boliu
2016/03/24 17:34:45
style: param needs a name
|
void DetachFunctorFromView(); |
+ void ReturnUnusedResource(scoped_ptr<ChildFrame> frame); |
+ void ReturnResourceFromParent(uint32_t compositor_id, |
+ uint32_t output_surface_id, |
+ cc::ReturnedResourceArray* resources); |
+ |
private: |
void SetTotalRootLayerScrollOffset(const gfx::Vector2dF& new_value_dip); |
bool CanOnDraw(); |
@@ -132,9 +137,6 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
const gfx::Vector2dF& total_scroll_offset_dip, |
const gfx::SizeF& scrollable_size_dip); |
- void ReturnUnusedResource(scoped_ptr<ChildFrame> frame); |
- void ReturnResourceFromParent(); |
- |
gfx::Vector2d max_scroll_offset() const; |
void UpdateMemoryPolicy(); |
@@ -145,7 +147,6 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
std::string ToString() const; |
BrowserViewRendererClient* client_; |
- SharedRendererState shared_renderer_state_; |
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
bool disable_page_visibility_; |
@@ -170,7 +171,6 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
bool offscreen_pre_raster_; |
- gfx::Vector2d last_on_draw_scroll_offset_; |
gfx::Rect last_on_draw_global_visible_rect_; |
gfx::Size size_; |
@@ -193,6 +193,8 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
uint32_t next_compositor_id_; |
+ ParentCompositorDrawConstraints external_draw_constraints_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
}; |