| 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" | |
| 17 | 16 |
| 18 namespace gpu { | 17 namespace gpu { |
| 19 class GpuMemoryBufferManager; | 18 class GpuMemoryBufferManager; |
| 20 } | 19 } |
| 21 | 20 |
| 22 namespace ui { | 21 namespace ui { |
| 23 namespace ws { | 22 namespace ws { |
| 24 | 23 |
| 25 class ServerWindow; | 24 class ServerWindow; |
| 26 class ServerWindowCompositorFrameSink; | 25 class ServerWindowCompositorFrameSink; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 50 ~ServerWindowCompositorFrameSinkManager(); | 49 ~ServerWindowCompositorFrameSinkManager(); |
| 51 | 50 |
| 52 // Returns true if the CompositorFrameSinks from this manager should be drawn. | 51 // Returns true if the CompositorFrameSinks from this manager should be drawn. |
| 53 bool ShouldDraw(); | 52 bool ShouldDraw(); |
| 54 | 53 |
| 55 // Creates a new CompositorFrameSink of the specified type, replacing the | 54 // Creates a new CompositorFrameSink of the specified type, replacing the |
| 56 // existing one of the specified type. | 55 // existing one of the specified type. |
| 57 void CreateCompositorFrameSink( | 56 void CreateCompositorFrameSink( |
| 58 mojom::CompositorFrameSinkType compositor_frame_sink_type, | 57 mojom::CompositorFrameSinkType compositor_frame_sink_type, |
| 59 gfx::AcceleratedWidget widget, | 58 gfx::AcceleratedWidget widget, |
| 60 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
| 61 scoped_refptr<SurfacesContextProvider> context_provider, | |
| 62 cc::mojom::MojoCompositorFrameSinkRequest request, | 59 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 63 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 60 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 64 | 61 |
| 65 // Adds the provided |frame_sink_id| to this ServerWindow's associated | 62 // Adds the provided |frame_sink_id| to this ServerWindow's associated |
| 66 // CompositorFrameSink if possible. If this ServerWindow does not have | 63 // CompositorFrameSink if possible. If this ServerWindow does not have |
| 67 // an associated CompositorFrameSink then this method will recursively | 64 // an associated CompositorFrameSink then this method will recursively |
| 68 // walk up the window hierarchy and register itself with the first ancestor | 65 // walk up the window hierarchy and register itself with the first ancestor |
| 69 // that has a CompositorFrameSink of the same type. This method returns | 66 // that has a CompositorFrameSink of the same type. This method returns |
| 70 // the FrameSinkId that is the first composited ancestor of the ServerWindow | 67 // the FrameSinkId that is the first composited ancestor of the ServerWindow |
| 71 // assocaited with the provided |frame_sink_id|. | 68 // assocaited with the provided |frame_sink_id|. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // the underlay is not necessarily as big as the window. | 107 // the underlay is not necessarily as big as the window. |
| 111 bool waiting_for_initial_frames_; | 108 bool waiting_for_initial_frames_; |
| 112 | 109 |
| 113 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); | 110 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); |
| 114 }; | 111 }; |
| 115 | 112 |
| 116 } // namespace ws | 113 } // namespace ws |
| 117 } // namespace ui | 114 } // namespace ui |
| 118 | 115 |
| 119 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 116 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| OLD | NEW |