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

Unified Diff: cc/surfaces/direct_compositor_frame_sink.h

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Addressed comments Created 3 years, 11 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: cc/surfaces/direct_compositor_frame_sink.h
diff --git a/cc/surfaces/direct_compositor_frame_sink.h b/cc/surfaces/direct_compositor_frame_sink.h
index 86210dabab4cb1aa296efe445311302a41e8589b..69a25264e29a41da756c869fc61c4b0aa4b851a6 100644
--- a/cc/surfaces/direct_compositor_frame_sink.h
+++ b/cc/surfaces/direct_compositor_frame_sink.h
@@ -8,6 +8,8 @@
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "cc/output/compositor_frame_sink.h"
+#include "cc/surfaces/compositor_frame_sink_support.h"
+#include "cc/surfaces/compositor_frame_sink_support_client.h"
#include "cc/surfaces/display_client.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_factory_client.h"
@@ -23,8 +25,8 @@ class SurfaceManager;
// client's frame being the root surface of the Display.
class CC_SURFACES_EXPORT DirectCompositorFrameSink
: public CompositorFrameSink,
- public SurfaceFactoryClient,
- public NON_EXPORTED_BASE(DisplayClient) {
+ public NON_EXPORTED_BASE(DisplayClient),
+ public CompositorFrameSinkSupportClient {
public:
// The underlying Display, SurfaceManager, and SurfaceIdAllocator must outlive
// this class.
@@ -49,16 +51,18 @@ class CC_SURFACES_EXPORT DirectCompositorFrameSink
void SubmitCompositorFrame(CompositorFrame frame) override;
void ForceReclaimResources() override;
- // SurfaceFactoryClient implementation.
- void ReturnResources(const ReturnedResourceArray& resources) override;
- void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override;
-
// DisplayClient implementation.
void DisplayOutputSurfaceLost() override;
void DisplayWillDrawAndSwap(bool will_draw_and_swap,
const RenderPassList& render_passes) override;
void DisplayDidDrawAndSwap() override;
+ // CompositorFrameSinkSupportClient implementation:
+ void DidReceiveCompositorFrameAck() override;
+ void OnBeginFrame(const BeginFrameArgs& args) override;
+ void ReclaimResources(const ReturnedResourceArray& resources) override;
+ void WillDrawSurface() override;
+
private:
void DidDrawCallback();
@@ -70,10 +74,11 @@ class CC_SURFACES_EXPORT DirectCompositorFrameSink
SurfaceManager* surface_manager_;
SurfaceIdAllocator surface_id_allocator_;
Display* display_;
- SurfaceFactory factory_;
gfx::Size last_swap_frame_size_;
bool is_lost_ = false;
+ std::unique_ptr<CompositorFrameSinkSupport> support_;
+
DISALLOW_COPY_AND_ASSIGN(DirectCompositorFrameSink);
};

Powered by Google App Engine
This is Rietveld 408576698