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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2683583005: Move display_ From CompositorFrameSinkSupport To GpuDisplayCompositorFrameSink (Closed)
Patch Set: rebase 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 | « cc/ipc/display_compositor.mojom ('k') | cc/surfaces/compositor_frame_sink_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/compositor_frame_sink_support.h
diff --git a/cc/surfaces/compositor_frame_sink_support.h b/cc/surfaces/compositor_frame_sink_support.h
index 6bf64d145665756fd53c95ed92402d2f88adbb0e..b1c18d345e42b5f68d00da731ec75951662d8fe6 100644
--- a/cc/surfaces/compositor_frame_sink_support.h
+++ b/cc/surfaces/compositor_frame_sink_support.h
@@ -12,8 +12,6 @@
#include "base/memory/weak_ptr.h"
#include "cc/output/compositor_frame.h"
#include "cc/scheduler/begin_frame_source.h"
-#include "cc/surfaces/display.h"
-#include "cc/surfaces/display_client.h"
#include "cc/surfaces/referenced_surface_tracker.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_factory_client.h"
@@ -23,20 +21,16 @@
namespace cc {
class CompositorFrameSinkSupportClient;
-class Display;
class SurfaceManager;
class CC_SURFACES_EXPORT CompositorFrameSinkSupport
- : public NON_EXPORTED_BASE(DisplayClient),
- public SurfaceFactoryClient,
+ : public SurfaceFactoryClient,
public BeginFrameObserver {
public:
- CompositorFrameSinkSupport(
- CompositorFrameSinkSupportClient* client,
- SurfaceManager* surface_manager,
- const FrameSinkId& frame_sink_id,
- std::unique_ptr<Display> display,
- std::unique_ptr<BeginFrameSource> display_begin_frame_source);
+ CompositorFrameSinkSupport(CompositorFrameSinkSupportClient* client,
+ SurfaceManager* surface_manager,
+ const FrameSinkId& frame_sink_id,
+ bool submits_to_display_compositor);
~CompositorFrameSinkSupport() override;
@@ -60,8 +54,6 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
void AddChildFrameSink(const FrameSinkId& child_frame_sink_id);
void RemoveChildFrameSink(const FrameSinkId& child_frame_sink_id);
- Display* display() { return display_.get(); }
-
private:
// Update surface references with SurfaceManager for current CompositorFrame
// that has |local_surface_id|. UpdateReferences() must be called on
@@ -75,12 +67,6 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
void DidReceiveCompositorFrameAck();
- // DisplayClient implementation.
- void DisplayOutputSurfaceLost() override;
- void DisplayWillDrawAndSwap(bool will_draw_and_swap,
- const RenderPassList& render_passes) override;
- void DisplayDidDrawAndSwap() override;
-
// SurfaceFactoryClient implementation.
void ReturnResources(const ReturnedResourceArray& resources) override;
void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override;
@@ -100,12 +86,6 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
const FrameSinkId frame_sink_id_;
- // GpuCompositorFrameSink holds a Display and its BeginFrameSource if it
- // created with non-null gpu::SurfaceHandle. In the window server, the display
- // root window's CompositorFrameSink will have a valid gpu::SurfaceHandle.
- std::unique_ptr<BeginFrameSource> display_begin_frame_source_;
- std::unique_ptr<Display> display_;
-
SurfaceFactory surface_factory_;
// Counts the number of CompositorFrames that have been submitted and have not
// yet received an ACK.
@@ -131,6 +111,8 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
// The set of BeginFrame children of this CompositorFrameSink.
std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_;
+ const bool submits_to_display_compositor_;
+
base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport);
« no previous file with comments | « cc/ipc/display_compositor.mojom ('k') | cc/surfaces/compositor_frame_sink_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698