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

Side by Side Diff: cc/surfaces/compositor_frame_sink_support.cc

Issue 2822143003: Remove ForceReclaimResources (Closed)
Patch Set: Rebase. Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "cc/surfaces/compositor_frame_sink_support.h" 5 #include "cc/surfaces/compositor_frame_sink_support.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 void CompositorFrameSinkSupport::DidReceiveCompositorFrameAck() { 205 void CompositorFrameSinkSupport::DidReceiveCompositorFrameAck() {
206 DCHECK_GT(ack_pending_count_, 0); 206 DCHECK_GT(ack_pending_count_, 0);
207 ack_pending_count_--; 207 ack_pending_count_--;
208 if (!client_) 208 if (!client_)
209 return; 209 return;
210 client_->DidReceiveCompositorFrameAck(surface_returned_resources_); 210 client_->DidReceiveCompositorFrameAck(surface_returned_resources_);
211 surface_returned_resources_.clear(); 211 surface_returned_resources_.clear();
212 } 212 }
213 213
214 void CompositorFrameSinkSupport::ForceReclaimResources() {
215 DCHECK(surface_factory_);
216 surface_factory_->ClearSurface();
217 }
218
219 void CompositorFrameSinkSupport::ClaimTemporaryReference( 214 void CompositorFrameSinkSupport::ClaimTemporaryReference(
220 const SurfaceId& surface_id) { 215 const SurfaceId& surface_id) {
221 surface_manager_->AssignTemporaryReference(surface_id, frame_sink_id_); 216 surface_manager_->AssignTemporaryReference(surface_id, frame_sink_id_);
222 } 217 }
223 218
224 CompositorFrameSinkSupport::CompositorFrameSinkSupport( 219 CompositorFrameSinkSupport::CompositorFrameSinkSupport(
225 CompositorFrameSinkSupportClient* client, 220 CompositorFrameSinkSupportClient* client,
226 const FrameSinkId& frame_sink_id, 221 const FrameSinkId& frame_sink_id,
227 bool is_root, 222 bool is_root,
228 bool handles_frame_sink_id_invalidation) 223 bool handles_frame_sink_id_invalidation)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 begin_frame_source_->RemoveObserver(this); 267 begin_frame_source_->RemoveObserver(this);
273 } 268 }
274 269
275 void CompositorFrameSinkSupport::RequestCopyOfSurface( 270 void CompositorFrameSinkSupport::RequestCopyOfSurface(
276 std::unique_ptr<CopyOutputRequest> request) { 271 std::unique_ptr<CopyOutputRequest> request) {
277 DCHECK(surface_factory_); 272 DCHECK(surface_factory_);
278 surface_factory_->RequestCopyOfSurface(std::move(request)); 273 surface_factory_->RequestCopyOfSurface(std::move(request));
279 } 274 }
280 275
281 } // namespace cc 276 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698