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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 2133873004: content: Move Surfaces related code out of RWHVA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed overscroll change Created 4 years, 4 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: content/browser/renderer_host/render_widget_host_view_android.h
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 24712d842294cc05d490ad449fffccbfc761cef8..88f0371853b6f3daea644b6b34201f6f9a3abb08 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -19,10 +19,7 @@
#include "base/memory/weak_ptr.h"
#include "base/process/process.h"
#include "cc/input/selection.h"
-#include "cc/layers/surface_layer.h"
#include "cc/output/begin_frame_args.h"
-#include "cc/surfaces/surface_factory_client.h"
-#include "cc/surfaces/surface_id.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/android/content_view_core_impl_observer.h"
#include "content/browser/renderer_host/delegated_frame_evictor.h"
@@ -54,6 +51,10 @@ class WebTouchEvent;
class WebMouseEvent;
}
+namespace ui {
+class DelegatedFrameHostAndroid;
+}
+
namespace content {
class ContentViewCoreImpl;
class ContentViewCoreObserver;
@@ -70,7 +71,6 @@ struct TextInputState;
// -----------------------------------------------------------------------------
class CONTENT_EXPORT RenderWidgetHostViewAndroid
: public RenderWidgetHostViewBase,
- public cc::SurfaceFactoryClient,
public ui::GestureProviderClient,
public ui::WindowAndroidObserver,
public DelegatedFrameEvictorClient,
@@ -162,10 +162,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
void UnlockCompositingSurface() override;
void OnDidNavigateMainFrameToNewPage() override;
- // cc::SurfaceFactoryClient implementation.
- void ReturnResources(const cc::ReturnedResourceArray& resources) override;
- void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
-
// ui::GestureProviderClient implementation.
void OnGestureEvent(const ui::GestureEventData& gesture) override;
@@ -269,8 +265,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
// Called after async screenshot task completes. Scales and crops the result
// of the copy.
static void PrepareTextureCopyOutputResult(
- base::WeakPtr<RenderWidgetHostViewAndroid> rwhva,
- scoped_refptr<cc::Layer> readback_layer,
const gfx::Size& dst_size_in_pixel,
SkColorType color_type,
const base::TimeTicks& start_time,
@@ -296,6 +290,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
cc::CompositorFrame frame);
void OnLostResources();
+ void ReturnResources(const cc::ReturnedResourceArray& resources);
+
enum VSyncRequestType {
FLUSH_INPUT = 1 << 0,
BEGIN_FRAME = 1 << 1,
@@ -334,16 +330,13 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
mutable ui::ViewAndroid view_;
- std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
- std::unique_ptr<cc::SurfaceFactory> surface_factory_;
- cc::SurfaceId surface_id_;
- gfx::Size current_surface_size_;
+ // Manages the Compositor Frames received from the renderer.
+ std::unique_ptr<ui::DelegatedFrameHostAndroid> delegated_frame_host_;
+
cc::ReturnedResourceArray surface_returned_resources_;
- gfx::Vector2dF location_bar_content_translation_;
- cc::Selection<gfx::SelectionBound> current_viewport_selection_;
- // The most recent texture size that was pushed to the texture layer.
- gfx::Size texture_size_in_layer_;
+ // The most recent surface size that was pushed to the surface layer.
+ gfx::Size current_surface_size_;
// The output surface id of the last received frame.
uint32_t last_output_surface_id_;

Powered by Google App Engine
This is Rietveld 408576698