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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 | 134 |
135 void Display::DidSwapBuffers() { | 135 void Display::DidSwapBuffers() { |
136 client_->DidSwapBuffers(); | 136 client_->DidSwapBuffers(); |
137 } | 137 } |
138 | 138 |
139 void Display::DidSwapBuffersComplete() { | 139 void Display::DidSwapBuffersComplete() { |
140 client_->DidSwapBuffersComplete(); | 140 client_->DidSwapBuffersComplete(); |
141 } | 141 } |
142 | 142 |
| 143 void Display::CommitVSyncParameters(base::TimeTicks timebase, |
| 144 base::TimeDelta interval) { |
| 145 client_->CommitVSyncParameters(timebase, interval); |
| 146 } |
| 147 |
143 void Display::OnSurfaceDamaged(SurfaceId surface) { | 148 void Display::OnSurfaceDamaged(SurfaceId surface) { |
144 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface)) | 149 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface)) |
145 client_->DisplayDamaged(); | 150 client_->DisplayDamaged(); |
146 } | 151 } |
147 | 152 |
148 SurfaceId Display::CurrentSurfaceId() { | 153 SurfaceId Display::CurrentSurfaceId() { |
149 return current_surface_id_; | 154 return current_surface_id_; |
150 } | 155 } |
151 | 156 |
152 int Display::GetMaxFramesPending() { | 157 int Display::GetMaxFramesPending() { |
153 if (!output_surface_) | 158 if (!output_surface_) |
154 return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; | 159 return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; |
155 return output_surface_->capabilities().max_frames_pending; | 160 return output_surface_->capabilities().max_frames_pending; |
156 } | 161 } |
157 | 162 |
158 } // namespace cc | 163 } // namespace cc |
OLD | NEW |