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

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

Issue 2822143003: Remove ForceReclaimResources (Closed)
Patch Set: Change to RunLoop. 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
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.h ('k') | cc/surfaces/direct_compositor_frame_sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 surface_returned_resources_.clear(); 206 surface_returned_resources_.clear();
207 } 207 }
208 208
209 void CompositorFrameSinkSupport::WillDrawSurface( 209 void CompositorFrameSinkSupport::WillDrawSurface(
210 const LocalSurfaceId& local_surface_id, 210 const LocalSurfaceId& local_surface_id,
211 const gfx::Rect& damage_rect) { 211 const gfx::Rect& damage_rect) {
212 if (client_) 212 if (client_)
213 client_->WillDrawSurface(local_surface_id, damage_rect); 213 client_->WillDrawSurface(local_surface_id, damage_rect);
214 } 214 }
215 215
216 void CompositorFrameSinkSupport::ForceReclaimResources() {
217 DCHECK(surface_factory_);
218 surface_factory_->ClearSurface();
219 }
220
221 void CompositorFrameSinkSupport::ClaimTemporaryReference( 216 void CompositorFrameSinkSupport::ClaimTemporaryReference(
222 const SurfaceId& surface_id) { 217 const SurfaceId& surface_id) {
223 surface_manager_->AssignTemporaryReference(surface_id, frame_sink_id_); 218 surface_manager_->AssignTemporaryReference(surface_id, frame_sink_id_);
224 } 219 }
225 220
226 CompositorFrameSinkSupport::CompositorFrameSinkSupport( 221 CompositorFrameSinkSupport::CompositorFrameSinkSupport(
227 CompositorFrameSinkSupportClient* client, 222 CompositorFrameSinkSupportClient* client,
228 const FrameSinkId& frame_sink_id, 223 const FrameSinkId& frame_sink_id,
229 bool is_root, 224 bool is_root,
230 bool handles_frame_sink_id_invalidation) 225 bool handles_frame_sink_id_invalidation)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 begin_frame_source_->RemoveObserver(this); 269 begin_frame_source_->RemoveObserver(this);
275 } 270 }
276 271
277 void CompositorFrameSinkSupport::RequestCopyOfSurface( 272 void CompositorFrameSinkSupport::RequestCopyOfSurface(
278 std::unique_ptr<CopyOutputRequest> request) { 273 std::unique_ptr<CopyOutputRequest> request) {
279 DCHECK(surface_factory_); 274 DCHECK(surface_factory_);
280 surface_factory_->RequestCopyOfSurface(std::move(request)); 275 surface_factory_->RequestCopyOfSurface(std::move(request));
281 } 276 }
282 277
283 } // namespace cc 278 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.h ('k') | cc/surfaces/direct_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698