| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| 6 #define SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 6 #define SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "cc/ipc/compositor_frame.mojom.h" | 11 #include "cc/ipc/compositor_frame.mojom.h" |
| 12 #include "cc/output/context_provider.h" | 12 #include "cc/output/context_provider.h" |
| 13 #include "cc/surfaces/surface_id.h" | 13 #include "cc/surfaces/surface_id.h" |
| 14 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
| 15 #include "services/ui/public/interfaces/window_tree.mojom.h" | 15 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 16 #include "services/ui/surfaces/surfaces_context_provider.h" | 16 #include "services/ui/surfaces/surfaces_context_provider.h" |
| 17 | 17 |
| 18 namespace gpu { | 18 namespace gpu { |
| 19 class GpuMemoryBufferManager; | 19 class GpuMemoryBufferManager; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace ui { | 22 namespace ui { |
| 23 namespace ws { | 23 namespace ws { |
| 24 | 24 |
| 25 class GpuCompositorFrameSink; |
| 25 class ServerWindow; | 26 class ServerWindow; |
| 26 class ServerWindowCompositorFrameSink; | 27 class ServerWindowCompositorFrameSink; |
| 27 class ServerWindowCompositorFrameSinkManagerTestApi; | 28 class ServerWindowCompositorFrameSinkManagerTestApi; |
| 28 | 29 |
| 29 struct CompositorFrameSinkData { | 30 struct CompositorFrameSinkData { |
| 30 CompositorFrameSinkData(); | 31 CompositorFrameSinkData(); |
| 31 CompositorFrameSinkData(CompositorFrameSinkData&& other); | 32 CompositorFrameSinkData(CompositorFrameSinkData&& other); |
| 32 ~CompositorFrameSinkData(); | 33 ~CompositorFrameSinkData(); |
| 33 | 34 |
| 34 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); | 35 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); |
| 35 | 36 |
| 36 cc::SurfaceId latest_submitted_surface_id; | 37 cc::SurfaceId latest_submitted_surface_id; |
| 37 gfx::Size latest_submitted_frame_size; | 38 gfx::Size latest_submitted_frame_size; |
| 38 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; | 39 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; |
| 39 cc::mojom::MojoCompositorFrameSinkPrivateRequest | 40 cc::mojom::MojoCompositorFrameSinkPrivateRequest |
| 40 pending_compositor_frame_sink_request; | 41 pending_compositor_frame_sink_request; |
| 42 std::unique_ptr<GpuCompositorFrameSink> compositor_frame_sink_impl_; |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a | 45 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a |
| 44 // ServerWindow. | 46 // ServerWindow. |
| 45 // TODO(fsamuel): Delete this once window decorations are managed in the window | 47 // TODO(fsamuel): Delete this once window decorations are managed in the window |
| 46 // manager. | 48 // manager. |
| 47 class ServerWindowCompositorFrameSinkManager { | 49 class ServerWindowCompositorFrameSinkManager { |
| 48 public: | 50 public: |
| 49 explicit ServerWindowCompositorFrameSinkManager(ServerWindow* window); | 51 explicit ServerWindowCompositorFrameSinkManager(ServerWindow* window); |
| 50 ~ServerWindowCompositorFrameSinkManager(); | 52 ~ServerWindowCompositorFrameSinkManager(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // the underlay is not necessarily as big as the window. | 112 // the underlay is not necessarily as big as the window. |
| 111 bool waiting_for_initial_frames_; | 113 bool waiting_for_initial_frames_; |
| 112 | 114 |
| 113 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); | 115 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 } // namespace ws | 118 } // namespace ws |
| 117 } // namespace ui | 119 } // namespace ui |
| 118 | 120 |
| 119 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 121 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| OLD | NEW |