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