| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/ipc/compositor_frame.mojom.h" | 9 #include "cc/ipc/compositor_frame.mojom.h" |
| 10 #include "cc/ipc/display_compositor.mojom.h" | 10 #include "cc/ipc/display_compositor.mojom.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a | 37 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a |
| 38 // ServerWindow. | 38 // ServerWindow. |
| 39 class ServerWindowCompositorFrameSinkManager { | 39 class ServerWindowCompositorFrameSinkManager { |
| 40 public: | 40 public: |
| 41 explicit ServerWindowCompositorFrameSinkManager(ServerWindow* window); | 41 explicit ServerWindowCompositorFrameSinkManager(ServerWindow* window); |
| 42 ~ServerWindowCompositorFrameSinkManager(); | 42 ~ServerWindowCompositorFrameSinkManager(); |
| 43 | 43 |
| 44 // Creates a new CompositorFrameSink of the specified type, replacing the | 44 // Creates a new CompositorFrameSink of the specified type, replacing the |
| 45 // existing one of the specified type. | 45 // existing one of the specified type. |
| 46 void CreateDisplayCompositorFrameSink( | 46 void CreateRootCompositorFrameSink( |
| 47 gfx::AcceleratedWidget widget, | 47 gfx::AcceleratedWidget widget, |
| 48 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request, | 48 cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request, |
| 49 cc::mojom::MojoCompositorFrameSinkClientPtr client, | 49 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
| 50 cc::mojom::DisplayPrivateAssociatedRequest display_request); | 50 cc::mojom::DisplayPrivateAssociatedRequest display_request); |
| 51 | 51 |
| 52 void CreateOffscreenCompositorFrameSink( | 52 void CreateCompositorFrameSink( |
| 53 cc::mojom::MojoCompositorFrameSinkRequest request, | 53 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 54 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 54 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 55 | 55 |
| 56 // Adds the provided |frame_sink_id| to this ServerWindow's associated | 56 // Adds the provided |frame_sink_id| to this ServerWindow's associated |
| 57 // CompositorFrameSink if possible. If this ServerWindow does not have | 57 // CompositorFrameSink if possible. If this ServerWindow does not have |
| 58 // an associated CompositorFrameSink then this method will recursively | 58 // an associated CompositorFrameSink then this method will recursively |
| 59 // walk up the window hierarchy and register itself with the first ancestor | 59 // walk up the window hierarchy and register itself with the first ancestor |
| 60 // that has a CompositorFrameSink of the same type. This method returns | 60 // that has a CompositorFrameSink of the same type. This method returns |
| 61 // the FrameSinkId that is the first composited ancestor of the ServerWindow | 61 // the FrameSinkId that is the first composited ancestor of the ServerWindow |
| 62 // assocaited with the provided |frame_sink_id|. | 62 // assocaited with the provided |frame_sink_id|. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 76 | 76 |
| 77 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_; | 77 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); | 79 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace ws | 82 } // namespace ws |
| 83 } // namespace ui | 83 } // namespace ui |
| 84 | 84 |
| 85 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ | 85 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ |
| OLD | NEW |