| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display.h" | 5 #include "cc/surfaces/display.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 aggregator_->previous_contained_surfaces().begin(); | 125 aggregator_->previous_contained_surfaces().begin(); |
| 126 it != aggregator_->previous_contained_surfaces().end(); | 126 it != aggregator_->previous_contained_surfaces().end(); |
| 127 ++it) { | 127 ++it) { |
| 128 Surface* surface = manager_->GetSurfaceForId(it->first); | 128 Surface* surface = manager_->GetSurfaceForId(it->first); |
| 129 if (surface) | 129 if (surface) |
| 130 surface->RunDrawCallbacks(); | 130 surface->RunDrawCallbacks(); |
| 131 } | 131 } |
| 132 return true; | 132 return true; |
| 133 } | 133 } |
| 134 | 134 |
| 135 void Display::CommitVSyncParameters(base::TimeTicks timebase, |
| 136 base::TimeDelta interval) { |
| 137 client_->CommitVSyncParameters(timebase, interval); |
| 138 } |
| 139 |
| 135 void Display::OnSurfaceDamaged(SurfaceId surface) { | 140 void Display::OnSurfaceDamaged(SurfaceId surface) { |
| 136 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface)) | 141 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface)) |
| 137 client_->DisplayDamaged(); | 142 client_->DisplayDamaged(); |
| 138 } | 143 } |
| 139 | 144 |
| 140 SurfaceId Display::CurrentSurfaceId() { | 145 SurfaceId Display::CurrentSurfaceId() { |
| 141 return current_surface_id_; | 146 return current_surface_id_; |
| 142 } | 147 } |
| 143 | 148 |
| 144 } // namespace cc | 149 } // namespace cc |
| OLD | NEW |