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

Unified Diff: services/ui/ws/server_window_compositor_frame_sink_manager.h

Issue 2617403003: Mus: Remove CompositorFrameSinkType (Closed)
Patch Set: Remove remaining CompositorFrameSinkType 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
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/server_window_compositor_frame_sink_manager.h
diff --git a/services/ui/ws/server_window_compositor_frame_sink_manager.h b/services/ui/ws/server_window_compositor_frame_sink_manager.h
index eb21737d9defb788bbfc88377199030a5f81d743..344603b8a6719b53c838688abed34b1a889017ba 100644
--- a/services/ui/ws/server_window_compositor_frame_sink_manager.h
+++ b/services/ui/ws/server_window_compositor_frame_sink_manager.h
@@ -38,16 +38,11 @@ struct CompositorFrameSinkData {
// ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a
// ServerWindow.
-// TODO(fsamuel): Delete this once window decorations are managed in the window
-// manager.
class ServerWindowCompositorFrameSinkManager {
public:
explicit ServerWindowCompositorFrameSinkManager(ServerWindow* window);
~ServerWindowCompositorFrameSinkManager();
- // Returns true if the CompositorFrameSinks from this manager should be drawn.
- bool ShouldDraw();
-
// Creates a new CompositorFrameSink of the specified type, replacing the
// existing one of the specified type.
void CreateDisplayCompositorFrameSink(
@@ -55,8 +50,8 @@ class ServerWindowCompositorFrameSinkManager {
cc::mojom::MojoCompositorFrameSinkRequest request,
cc::mojom::MojoCompositorFrameSinkClientPtr client,
cc::mojom::DisplayPrivateRequest display_private_request);
+
void CreateOffscreenCompositorFrameSink(
- mojom::CompositorFrameSinkType compositor_frame_sink_type,
cc::mojom::MojoCompositorFrameSinkRequest request,
cc::mojom::MojoCompositorFrameSinkClientPtr client);
@@ -67,22 +62,16 @@ class ServerWindowCompositorFrameSinkManager {
// that has a CompositorFrameSink of the same type. This method returns
// the FrameSinkId that is the first composited ancestor of the ServerWindow
// assocaited with the provided |frame_sink_id|.
- void AddChildFrameSinkId(
- mojom::CompositorFrameSinkType compositor_frame_sink_type,
- const cc::FrameSinkId& frame_sink_id);
- void RemoveChildFrameSinkId(
- mojom::CompositorFrameSinkType compositor_frame_sink_type,
- const cc::FrameSinkId& frame_sink_id);
+ void AddChildFrameSinkId(const cc::FrameSinkId& frame_sink_id);
+ void RemoveChildFrameSinkId(const cc::FrameSinkId& frame_sink_id);
ServerWindow* window() { return window_; }
- bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const;
- bool HasAnyCompositorFrameSink() const;
+ bool HasCompositorFrameSink() const;
- gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const;
- cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const;
- void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type,
- const cc::SurfaceInfo& surface_info);
+ gfx::Size GetLatestFrameSize() const;
+ cc::SurfaceId GetLatestSurfaceId() const;
+ void SetLatestSurfaceInfo(const cc::SurfaceInfo& surface_info);
void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root);
@@ -90,13 +79,7 @@ class ServerWindowCompositorFrameSinkManager {
friend class ServerWindowCompositorFrameSinkManagerTestApi;
friend class ServerWindowCompositorFrameSink;
- // Returns true if a CompositorFrameSink of |type| has been set and has
- // received a frame that is greater than the size of the window.
- bool IsCompositorFrameSinkReadyAndNonEmpty(
- mojom::CompositorFrameSinkType type) const;
-
void CreateCompositorFrameSinkInternal(
- mojom::CompositorFrameSinkType compositor_frame_sink_type,
gfx::AcceleratedWidget widget,
cc::mojom::MojoCompositorFrameSinkRequest request,
cc::mojom::MojoCompositorFrameSinkClientPtr client,
@@ -104,19 +87,7 @@ class ServerWindowCompositorFrameSinkManager {
ServerWindow* window_;
- using TypeToCompositorFrameSinkMap =
- std::map<mojom::CompositorFrameSinkType, CompositorFrameSinkData>;
-
- TypeToCompositorFrameSinkMap type_to_compositor_frame_sink_map_;
-
- // TODO(mfomitchev): This is currently always false. Confirm if we still need
- // this.
- // While true the window is not drawn. This is initially true if the window
- // has the property |kWaitForUnderlay_Property|. This is set to false once
- // the underlay and default surface have been set *and* their size is at
- // least that of the window. Ideally we would wait for sizes to match, but
- // the underlay is not necessarily as big as the window.
- bool waiting_for_initial_frames_;
+ std::unique_ptr<CompositorFrameSinkData> frame_sink_data_;
DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager);
};
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698