| 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);
|
| };
|
|
|