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

Unified Diff: android_webview/browser/hardware_renderer.h

Issue 2729523005: HardwareRenderer should use CompositorFrameSinkSupport (Closed)
Patch Set: c Created 3 years, 10 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
« no previous file with comments | « no previous file | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/hardware_renderer.h
diff --git a/android_webview/browser/hardware_renderer.h b/android_webview/browser/hardware_renderer.h
index 58bd994d7c81d09364af3b87f65271d2c70fa872..03a0093c6d74e10b5a752028ab88c6310d1de2ae 100644
--- a/android_webview/browser/hardware_renderer.h
+++ b/android_webview/browser/hardware_renderer.h
@@ -11,14 +11,14 @@
#include "android_webview/browser/compositor_id.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "cc/surfaces/compositor_frame_sink_support_client.h"
#include "cc/surfaces/frame_sink_id.h"
-#include "cc/surfaces/surface_factory_client.h"
#include "cc/surfaces/surface_id.h"
struct AwDrawGLInfo;
namespace cc {
-class SurfaceFactory;
+class CompositorFrameSinkSupport;
class LocalSurfaceIdAllocator;
}
@@ -28,7 +28,7 @@ class ChildFrame;
class RenderThreadManager;
class SurfacesInstance;
-class HardwareRenderer : public cc::SurfaceFactoryClient {
+class HardwareRenderer : public cc::CompositorFrameSinkSupportClient {
public:
// Two rules:
// 1) Never wait on |new_frame| on the UI thread, or in kModeSync. Otherwise
@@ -49,9 +49,12 @@ class HardwareRenderer : public cc::SurfaceFactoryClient {
void CommitFrame();
private:
- // cc::SurfaceFactoryClient implementation.
- void ReturnResources(const cc::ReturnedResourceArray& resources) override;
- void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
+ // cc::CompositorFrameSinkSupportClient implementation.
+ void DidReceiveCompositorFrameAck() override;
+ void OnBeginFrame(const cc::BeginFrameArgs& args) override;
+ void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
+ void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id,
+ const gfx::Rect& damage_rect) override;
void ReturnChildFrame(std::unique_ptr<ChildFrame> child_frame);
void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources,
@@ -61,6 +64,8 @@ class HardwareRenderer : public cc::SurfaceFactoryClient {
void AllocateSurface();
void DestroySurface();
+ void CreateNewCompositorFrameSinkSupport();
+
RenderThreadManager* render_thread_manager_;
typedef void* EGLContext;
@@ -83,7 +88,7 @@ class HardwareRenderer : public cc::SurfaceFactoryClient {
cc::FrameSinkId frame_sink_id_;
const std::unique_ptr<cc::LocalSurfaceIdAllocator>
local_surface_id_allocator_;
- std::unique_ptr<cc::SurfaceFactory> surface_factory_;
+ std::unique_ptr<cc::CompositorFrameSinkSupport> support_;
cc::LocalSurfaceId child_id_;
CompositorID compositor_id_;
// HardwareRenderer guarantees resources are returned in the order of
« no previous file with comments | « no previous file | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698