Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: components/viz/frame_sinks/mojo_frame_sink_manager.cc

Issue 2897673002: Return resources immediately after a Surface is destroyed (Closed)
Patch Set: Check aggregator_ Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698