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

Unified Diff: services/ui/surfaces/gpu_compositor_frame_sink.h

Issue 2654693003: Decouple GpuCompositorFrameSink from DisplayCompositor (Closed)
Patch Set: Fix vars 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: services/ui/surfaces/gpu_compositor_frame_sink.h
diff --git a/services/ui/surfaces/gpu_compositor_frame_sink.h b/services/ui/surfaces/gpu_compositor_frame_sink.h
index bfe1e9ad240b189864af28f7d869a7b0f9488514..30c88d8d1682255aad3b79d3e83e17793d2bcd1e 100644
--- a/services/ui/surfaces/gpu_compositor_frame_sink.h
+++ b/services/ui/surfaces/gpu_compositor_frame_sink.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "cc/ipc/display_compositor.mojom.h"
#include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
+#include "cc/surfaces/compositor_frame_sink_delegate.h"
#include "cc/surfaces/compositor_frame_sink_support.h"
#include "cc/surfaces/compositor_frame_sink_support_client.h"
#include "cc/surfaces/referenced_surface_tracker.h"
@@ -23,8 +24,6 @@ class Display;
namespace ui {
-class DisplayCompositor;
-
// Server side representation of a WindowSurface.
class GpuCompositorFrameSink
: public cc::CompositorFrameSinkSupportClient,
@@ -32,7 +31,8 @@ class GpuCompositorFrameSink
public cc::mojom::MojoCompositorFrameSinkPrivate {
public:
GpuCompositorFrameSink(
- DisplayCompositor* display_compositor,
+ cc::CompositorFrameSinkDelegate* delegate,
+ cc::SurfaceManager* surface_manager,
const cc::FrameSinkId& frame_sink_id,
std::unique_ptr<cc::Display> display,
std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
@@ -59,10 +59,19 @@ class GpuCompositorFrameSink
void OnClientConnectionLost();
void OnPrivateConnectionLost();
- DisplayCompositor* const display_compositor_;
+ cc::CompositorFrameSinkDelegate* const delegate_;
cc::CompositorFrameSinkSupport support_;
+ cc::SurfaceManager* const surface_manager_;
private:
+ // Adds surface references. For each reference added, this will remove the
+ // temporary reference to the child surface if one exists.
+ void AddSurfaceReferences(
+ const std::vector<cc::SurfaceReference>& references);
+ // Removes surface references.
+ void RemoveSurfaceReferences(
+ const std::vector<cc::SurfaceReference>& references);
+
// cc::CompositorFrameSinkSupportClient implementation:
void DidReceiveCompositorFrameAck() override;
void OnBeginFrame(const cc::BeginFrameArgs& args) override;

Powered by Google App Engine
This is Rietveld 408576698