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 COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ | 5 #ifndef COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ |
6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ | 6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 private: | 73 private: |
74 // It is necessary to pass |frame_sink_id| by value because the id | 74 // It is necessary to pass |frame_sink_id| by value because the id |
75 // is owned by the GpuCompositorFrameSink in the map. When the sink is | 75 // is owned by the GpuCompositorFrameSink in the map. When the sink is |
76 // removed from the map, |frame_sink_id| would also be destroyed if it were a | 76 // removed from the map, |frame_sink_id| would also be destroyed if it were a |
77 // reference. But the map can continue to iterate and try to use it. Passing | 77 // reference. But the map can continue to iterate and try to use it. Passing |
78 // by value avoids this. | 78 // by value avoids this. |
79 void DestroyCompositorFrameSink(cc::FrameSinkId frame_sink_id); | 79 void DestroyCompositorFrameSink(cc::FrameSinkId frame_sink_id); |
80 | 80 |
81 // cc::SurfaceObserver implementation. | 81 // cc::SurfaceObserver implementation. |
82 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override; | 82 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override; |
83 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, | |
84 bool* changed) override; | |
85 | 83 |
86 // GpuCompositorFrameSinkDelegate implementation. | 84 // GpuCompositorFrameSinkDelegate implementation. |
87 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id, | 85 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id, |
88 bool destroy_compositor_frame_sink) override; | 86 bool destroy_compositor_frame_sink) override; |
89 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id, | 87 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id, |
90 bool destroy_compositor_frame_sink) override; | 88 bool destroy_compositor_frame_sink) override; |
91 | 89 |
92 // SurfaceManager should be the first object constructed and the last object | 90 // SurfaceManager should be the first object constructed and the last object |
93 // destroyed in order to ensure that all other objects that depend on it have | 91 // destroyed in order to ensure that all other objects that depend on it have |
94 // access to a valid pointer for the entirety of their lifetimes. | 92 // access to a valid pointer for the entirety of their lifetimes. |
(...skipping 11 matching lines...) Expand all Loading... |
106 | 104 |
107 cc::mojom::FrameSinkManagerClientPtr client_; | 105 cc::mojom::FrameSinkManagerClientPtr client_; |
108 mojo::Binding<cc::mojom::FrameSinkManager> binding_; | 106 mojo::Binding<cc::mojom::FrameSinkManager> binding_; |
109 | 107 |
110 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); | 108 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); |
111 }; | 109 }; |
112 | 110 |
113 } // namespace viz | 111 } // namespace viz |
114 | 112 |
115 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ | 113 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ |
OLD | NEW |