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

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

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Added NON_EXPORTED_BASE Created 3 years, 10 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 #include <vector> 9 #include <vector>
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 void CompositorFrameSinkSupport::RemoveChildFrameSink( 162 void CompositorFrameSinkSupport::RemoveChildFrameSink(
163 const FrameSinkId& child_frame_sink_id) { 163 const FrameSinkId& child_frame_sink_id) {
164 auto it = child_frame_sinks_.find(child_frame_sink_id); 164 auto it = child_frame_sinks_.find(child_frame_sink_id);
165 DCHECK(it != child_frame_sinks_.end()); 165 DCHECK(it != child_frame_sinks_.end());
166 DCHECK(it->is_valid()); 166 DCHECK(it->is_valid());
167 surface_manager_->UnregisterFrameSinkHierarchy(frame_sink_id_, 167 surface_manager_->UnregisterFrameSinkHierarchy(frame_sink_id_,
168 child_frame_sink_id); 168 child_frame_sink_id);
169 child_frame_sinks_.erase(it); 169 child_frame_sinks_.erase(it);
170 } 170 }
171 171
172 void CompositorFrameSinkSupport::ForceReclaimResources() {
173 surface_factory_.ClearSurface();
174 }
175
172 void CompositorFrameSinkSupport::ReferencedSurfacesChanged( 176 void CompositorFrameSinkSupport::ReferencedSurfacesChanged(
173 const LocalSurfaceId& local_surface_id, 177 const LocalSurfaceId& local_surface_id,
174 const std::vector<SurfaceId>* active_referenced_surfaces, 178 const std::vector<SurfaceId>* active_referenced_surfaces,
175 const std::vector<SurfaceId>* pending_referenced_surfaces) { 179 const std::vector<SurfaceId>* pending_referenced_surfaces) {
176 if (!surface_manager_->using_surface_references()) 180 if (!surface_manager_->using_surface_references())
177 return; 181 return;
178 182
179 // Populate list of surface references to add and remove based on reference 183 // Populate list of surface references to add and remove based on reference
180 // surfaces in current frame compared with the last frame. The list of 184 // surfaces in current frame compared with the last frame. The list of
181 // surface references includes references from both the pending and active 185 // surface references includes references from both the pending and active
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 else 250 else
247 begin_frame_source_->RemoveObserver(this); 251 begin_frame_source_->RemoveObserver(this);
248 } 252 }
249 253
250 void CompositorFrameSinkSupport::RequestCopyOfSurface( 254 void CompositorFrameSinkSupport::RequestCopyOfSurface(
251 std::unique_ptr<CopyOutputRequest> request) { 255 std::unique_ptr<CopyOutputRequest> request) {
252 surface_factory_.RequestCopyOfSurface(std::move(request)); 256 surface_factory_.RequestCopyOfSurface(std::move(request));
253 } 257 }
254 258
255 } // namespace cc 259 } // 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