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 #include "components/viz/frame_sinks/mojo_frame_sink_manager.h" | 5 #include "components/viz/frame_sinks/mojo_frame_sink_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // be necessary, because a surface reference might already exist and no | 122 // be necessary, because a surface reference might already exist and no |
123 // temporary reference was created. It could be useful to let |client_| know | 123 // temporary reference was created. It could be useful to let |client_| know |
124 // if it should find an owner. | 124 // if it should find an owner. |
125 if (client_) | 125 if (client_) |
126 client_->OnSurfaceCreated(surface_info); | 126 client_->OnSurfaceCreated(surface_info); |
127 } | 127 } |
128 | 128 |
129 void MojoFrameSinkManager::OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 129 void MojoFrameSinkManager::OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
130 bool* changed) {} | 130 bool* changed) {} |
131 | 131 |
| 132 void MojoFrameSinkManager::OnSurfaceDiscarded(const cc::SurfaceId& surface_id) { |
| 133 } |
| 134 |
132 void MojoFrameSinkManager::OnClientConnectionLost( | 135 void MojoFrameSinkManager::OnClientConnectionLost( |
133 const cc::FrameSinkId& frame_sink_id, | 136 const cc::FrameSinkId& frame_sink_id, |
134 bool destroy_compositor_frame_sink) { | 137 bool destroy_compositor_frame_sink) { |
135 DCHECK(thread_checker_.CalledOnValidThread()); | 138 DCHECK(thread_checker_.CalledOnValidThread()); |
136 if (destroy_compositor_frame_sink) | 139 if (destroy_compositor_frame_sink) |
137 DestroyCompositorFrameSink(frame_sink_id); | 140 DestroyCompositorFrameSink(frame_sink_id); |
138 // TODO(fsamuel): Tell the frame sink manager host that the client connection | 141 // TODO(fsamuel): Tell the frame sink manager host that the client connection |
139 // has been lost so that it can drop its private connection and allow a new | 142 // has been lost so that it can drop its private connection and allow a new |
140 // client instance to create a new CompositorFrameSink. | 143 // client instance to create a new CompositorFrameSink. |
141 } | 144 } |
142 | 145 |
143 void MojoFrameSinkManager::OnPrivateConnectionLost( | 146 void MojoFrameSinkManager::OnPrivateConnectionLost( |
144 const cc::FrameSinkId& frame_sink_id, | 147 const cc::FrameSinkId& frame_sink_id, |
145 bool destroy_compositor_frame_sink) { | 148 bool destroy_compositor_frame_sink) { |
146 DCHECK(thread_checker_.CalledOnValidThread()); | 149 DCHECK(thread_checker_.CalledOnValidThread()); |
147 if (destroy_compositor_frame_sink) | 150 if (destroy_compositor_frame_sink) |
148 DestroyCompositorFrameSink(frame_sink_id); | 151 DestroyCompositorFrameSink(frame_sink_id); |
149 } | 152 } |
150 | 153 |
151 } // namespace viz | 154 } // namespace viz |
OLD | NEW |