| OLD | NEW |
| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 void CompositorFrameSinkSupport::ForceReclaimResources() { | 177 void CompositorFrameSinkSupport::ForceReclaimResources() { |
| 178 surface_factory_.ClearSurface(); | 178 surface_factory_.ClearSurface(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void CompositorFrameSinkSupport::ClaimTemporaryReference( | 181 void CompositorFrameSinkSupport::ClaimTemporaryReference( |
| 182 const SurfaceId& surface_id) { | 182 const SurfaceId& surface_id) { |
| 183 surface_manager_->AssignTemporaryReference(surface_id, frame_sink_id_); | 183 surface_manager_->AssignTemporaryReference(surface_id, frame_sink_id_); |
| 184 } | 184 } |
| 185 | 185 |
| 186 BeginFrameSource* CompositorFrameSinkSupport::BeginFrameSourceForTesting() |
| 187 const { |
| 188 return begin_frame_source_; |
| 189 } |
| 190 |
| 186 void CompositorFrameSinkSupport::ReferencedSurfacesChanged( | 191 void CompositorFrameSinkSupport::ReferencedSurfacesChanged( |
| 187 const LocalSurfaceId& local_surface_id, | 192 const LocalSurfaceId& local_surface_id, |
| 188 const std::vector<SurfaceId>* active_referenced_surfaces, | 193 const std::vector<SurfaceId>* active_referenced_surfaces, |
| 189 const std::vector<SurfaceId>* pending_referenced_surfaces) { | 194 const std::vector<SurfaceId>* pending_referenced_surfaces) { |
| 190 if (!surface_manager_->using_surface_references()) | 195 if (!surface_manager_->using_surface_references()) |
| 191 return; | 196 return; |
| 192 | 197 |
| 193 SurfaceId last_surface_id = reference_tracker_.current_surface_id(); | 198 SurfaceId last_surface_id = reference_tracker_.current_surface_id(); |
| 194 | 199 |
| 195 // Populate list of surface references to add and remove based on reference | 200 // Populate list of surface references to add and remove based on reference |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 else | 266 else |
| 262 begin_frame_source_->RemoveObserver(this); | 267 begin_frame_source_->RemoveObserver(this); |
| 263 } | 268 } |
| 264 | 269 |
| 265 void CompositorFrameSinkSupport::RequestCopyOfSurface( | 270 void CompositorFrameSinkSupport::RequestCopyOfSurface( |
| 266 std::unique_ptr<CopyOutputRequest> request) { | 271 std::unique_ptr<CopyOutputRequest> request) { |
| 267 surface_factory_.RequestCopyOfSurface(std::move(request)); | 272 surface_factory_.RequestCopyOfSurface(std::move(request)); |
| 268 } | 273 } |
| 269 | 274 |
| 270 } // namespace cc | 275 } // namespace cc |
| OLD | NEW |