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

Unified Diff: services/ui/surfaces/display_compositor.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/display_compositor.h
diff --git a/services/ui/surfaces/display_compositor.h b/services/ui/surfaces/display_compositor.h
index 8616b1e40d08a057c4ac83a0752826fd064ea342..bb5a91c87d89ce3351296af6bb0c9b47884e7d55 100644
--- a/services/ui/surfaces/display_compositor.h
+++ b/services/ui/surfaces/display_compositor.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "cc/ipc/display_compositor.mojom.h"
+#include "cc/surfaces/compositor_frame_sink_delegate.h"
#include "cc/surfaces/frame_sink_id.h"
#include "cc/surfaces/local_frame_id.h"
#include "cc/surfaces/surface_id.h"
@@ -46,6 +47,7 @@ class GpuCompositorFrameSink;
// TODO(rjkroege, fsamuel): This object will need to change to support multiple
// displays.
class DisplayCompositor : public cc::SurfaceObserver,
+ public cc::CompositorFrameSinkDelegate,
public cc::mojom::DisplayCompositor {
public:
DisplayCompositor(
@@ -58,24 +60,13 @@ class DisplayCompositor : public cc::SurfaceObserver,
cc::SurfaceManager* manager() { return &manager_; }
- // 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);
-
// We must avoid destroying a GpuCompositorFrameSink until both the display
// compositor host and the client drop their connection to avoid getting into
// a state where surfaces references are inconsistent.
- void OnCompositorFrameSinkClientConnectionLost(
- const cc::FrameSinkId& frame_sink_id,
- bool destroy_compositor_frame_sink);
- void OnCompositorFrameSinkPrivateConnectionLost(
- const cc::FrameSinkId& frame_sink_id,
- bool destroy_compositor_frame_sink);
+ void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id,
+ bool destroy_compositor_frame_sink) override;
+ void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id,
+ bool destroy_compositor_frame_sink) override;
// cc::mojom::DisplayCompositor implementation:
void CreateDisplayCompositorFrameSink(

Powered by Google App Engine
This is Rietveld 408576698