| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // TODO(kylechar): |client_| will try to find an owner for the temporary | 115 // TODO(kylechar): |client_| will try to find an owner for the temporary |
| 116 // reference to the new surface. With surface synchronization this might not | 116 // reference to the new surface. With surface synchronization this might not |
| 117 // be necessary, because a surface reference might already exist and no | 117 // be necessary, because a surface reference might already exist and no |
| 118 // temporary reference was created. It could be useful to let |client_| know | 118 // temporary reference was created. It could be useful to let |client_| know |
| 119 // if it should find an owner. | 119 // if it should find an owner. |
| 120 if (client_) | 120 if (client_) |
| 121 client_->OnSurfaceCreated(surface_info); | 121 client_->OnSurfaceCreated(surface_info); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void MojoFrameSinkManager::OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 124 void MojoFrameSinkManager::OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
| 125 const cc::BeginFrameAck& ack, |
| 125 bool* changed) {} | 126 bool* changed) {} |
| 126 | 127 |
| 127 void MojoFrameSinkManager::OnSurfaceDiscarded(const cc::SurfaceId& surface_id) { | 128 void MojoFrameSinkManager::OnSurfaceDiscarded(const cc::SurfaceId& surface_id) { |
| 128 } | 129 } |
| 129 | 130 |
| 131 void MojoFrameSinkManager::OnSurfaceDestroyed(const cc::SurfaceId& surface_id) { |
| 132 } |
| 133 |
| 134 void MojoFrameSinkManager::OnSurfaceDamageExpected( |
| 135 const cc::SurfaceId& surface_id, |
| 136 const cc::BeginFrameArgs& args) {} |
| 137 |
| 130 void MojoFrameSinkManager::OnClientConnectionLost( | 138 void MojoFrameSinkManager::OnClientConnectionLost( |
| 131 const cc::FrameSinkId& frame_sink_id, | 139 const cc::FrameSinkId& frame_sink_id, |
| 132 bool destroy_compositor_frame_sink) { | 140 bool destroy_compositor_frame_sink) { |
| 133 DCHECK(thread_checker_.CalledOnValidThread()); | 141 DCHECK(thread_checker_.CalledOnValidThread()); |
| 134 if (destroy_compositor_frame_sink) | 142 if (destroy_compositor_frame_sink) |
| 135 DestroyCompositorFrameSink(frame_sink_id); | 143 DestroyCompositorFrameSink(frame_sink_id); |
| 136 // TODO(fsamuel): Tell the frame sink manager host that the client connection | 144 // TODO(fsamuel): Tell the frame sink manager host that the client connection |
| 137 // has been lost so that it can drop its private connection and allow a new | 145 // has been lost so that it can drop its private connection and allow a new |
| 138 // client instance to create a new CompositorFrameSink. | 146 // client instance to create a new CompositorFrameSink. |
| 139 } | 147 } |
| 140 | 148 |
| 141 void MojoFrameSinkManager::OnPrivateConnectionLost( | 149 void MojoFrameSinkManager::OnPrivateConnectionLost( |
| 142 const cc::FrameSinkId& frame_sink_id, | 150 const cc::FrameSinkId& frame_sink_id, |
| 143 bool destroy_compositor_frame_sink) { | 151 bool destroy_compositor_frame_sink) { |
| 144 DCHECK(thread_checker_.CalledOnValidThread()); | 152 DCHECK(thread_checker_.CalledOnValidThread()); |
| 145 if (destroy_compositor_frame_sink) | 153 if (destroy_compositor_frame_sink) |
| 146 DestroyCompositorFrameSink(frame_sink_id); | 154 DestroyCompositorFrameSink(frame_sink_id); |
| 147 } | 155 } |
| 148 | 156 |
| 149 } // namespace viz | 157 } // namespace viz |
| OLD | NEW |