| 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_factory.h" | |
| 14 #include "cc/surfaces/surface_id.h" | 13 #include "cc/surfaces/surface_id.h" |
| 15 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
| 16 #include "services/ui/public/interfaces/window_tree.mojom.h" | 15 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 17 #include "services/ui/surfaces/surfaces_context_provider.h" | 16 #include "services/ui/surfaces/surfaces_context_provider.h" |
| 18 | 17 |
| 19 namespace gpu { | 18 namespace gpu { |
| 20 class GpuMemoryBufferManager; | 19 class GpuMemoryBufferManager; |
| 21 } | 20 } |
| 22 | 21 |
| 23 namespace ui { | 22 namespace ui { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 80 |
| 82 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const; | 81 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const; |
| 83 bool HasAnyCompositorFrameSink() const; | 82 bool HasAnyCompositorFrameSink() const; |
| 84 | 83 |
| 85 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const; | 84 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const; |
| 86 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const; | 85 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const; |
| 87 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type, | 86 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type, |
| 88 const cc::SurfaceId& surface_id, | 87 const cc::SurfaceId& surface_id, |
| 89 const gfx::Size& frame_size); | 88 const gfx::Size& frame_size); |
| 90 | 89 |
| 91 cc::SurfaceManager* GetCompositorFrameSinkManager(); | |
| 92 | |
| 93 private: | 90 private: |
| 94 friend class ServerWindowCompositorFrameSinkManagerTestApi; | 91 friend class ServerWindowCompositorFrameSinkManagerTestApi; |
| 95 friend class ServerWindowCompositorFrameSink; | 92 friend class ServerWindowCompositorFrameSink; |
| 96 | 93 |
| 97 // Returns true if a CompositorFrameSink of |type| has been set and has | 94 // Returns true if a CompositorFrameSink of |type| has been set and has |
| 98 // received a frame that is greater than the size of the window. | 95 // received a frame that is greater than the size of the window. |
| 99 bool IsCompositorFrameSinkReadyAndNonEmpty( | 96 bool IsCompositorFrameSinkReadyAndNonEmpty( |
| 100 mojom::CompositorFrameSinkType type) const; | 97 mojom::CompositorFrameSinkType type) const; |
| 101 | 98 |
| 102 ServerWindow* window_; | 99 ServerWindow* window_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 113 // the underlay is not necessarily as big as the window. | 110 // the underlay is not necessarily as big as the window. |
| 114 bool waiting_for_initial_frames_; | 111 bool waiting_for_initial_frames_; |
| 115 | 112 |
| 116 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); | 113 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); |
| 117 }; | 114 }; |
| 118 | 115 |
| 119 } // namespace ws | 116 } // namespace ws |
| 120 } // namespace ui | 117 } // namespace ui |
| 121 | 118 |
| 122 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 119 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| OLD | NEW |