| 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/surface_dependency_tracker.h" | 5 #include "cc/surfaces/surface_dependency_tracker.h" |
| 6 | 6 |
| 7 #include "cc/surfaces/surface.h" | 7 #include "cc/surfaces/surface.h" |
| 8 #include "cc/surfaces/surface_info.h" | 8 #include "cc/surfaces/surface_info.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 frames_since_deadline_set_.reset(); | 97 frames_since_deadline_set_.reset(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 const BeginFrameArgs& SurfaceDependencyTracker::LastUsedBeginFrameArgs() const { | 100 const BeginFrameArgs& SurfaceDependencyTracker::LastUsedBeginFrameArgs() const { |
| 101 return last_begin_frame_args_; | 101 return last_begin_frame_args_; |
| 102 } | 102 } |
| 103 | 103 |
| 104 void SurfaceDependencyTracker::OnBeginFrameSourcePausedChanged(bool paused) {} | 104 void SurfaceDependencyTracker::OnBeginFrameSourcePausedChanged(bool paused) {} |
| 105 | 105 |
| 106 void SurfaceDependencyTracker::OnReferencedSurfacesChanged( | |
| 107 Surface* surface, | |
| 108 const std::vector<SurfaceId>* active_referenced_surfaces, | |
| 109 const std::vector<SurfaceId>* pending_referenced_surfaces) {} | |
| 110 | |
| 111 void SurfaceDependencyTracker::OnSurfaceDiscarded(Surface* surface) { | 106 void SurfaceDependencyTracker::OnSurfaceDiscarded(Surface* surface) { |
| 112 // If the surface being destroyed doesn't have a pending frame then we have | 107 // If the surface being destroyed doesn't have a pending frame then we have |
| 113 // nothing to do here. | 108 // nothing to do here. |
| 114 if (!surface->HasPendingFrame()) | 109 if (!surface->HasPendingFrame()) |
| 115 return; | 110 return; |
| 116 | 111 |
| 117 const CompositorFrame& pending_frame = surface->GetPendingFrame(); | 112 const CompositorFrame& pending_frame = surface->GetPendingFrame(); |
| 118 | 113 |
| 119 DCHECK(!pending_frame.metadata.embedded_surfaces.empty()); | 114 DCHECK(!pending_frame.metadata.embedded_surfaces.empty()); |
| 120 | 115 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // A blocked surface may have been garbage collected during dependency | 202 // A blocked surface may have been garbage collected during dependency |
| 208 // resolution. | 203 // resolution. |
| 209 DCHECK(!observed_surfaces_by_id_.count(blocked_surface_by_id)); | 204 DCHECK(!observed_surfaces_by_id_.count(blocked_surface_by_id)); |
| 210 continue; | 205 continue; |
| 211 } | 206 } |
| 212 blocked_surface->NotifySurfaceIdAvailable(surface_id); | 207 blocked_surface->NotifySurfaceIdAvailable(surface_id); |
| 213 } | 208 } |
| 214 } | 209 } |
| 215 | 210 |
| 216 } // namespace cc | 211 } // namespace cc |
| OLD | NEW |