OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_scheduler.h" | 5 #include "cc/surfaces/display_scheduler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 needs_draw_ = false; | 116 needs_draw_ = false; |
117 entire_display_damaged_ = false; | 117 entire_display_damaged_ = false; |
118 all_active_child_surfaces_ready_to_draw_ = | 118 all_active_child_surfaces_ready_to_draw_ = |
119 child_surface_ids_to_expect_damage_from_.empty(); | 119 child_surface_ids_to_expect_damage_from_.empty(); |
120 | 120 |
121 expect_damage_from_root_surface_ = root_surface_damaged_; | 121 expect_damage_from_root_surface_ = root_surface_damaged_; |
122 root_surface_damaged_ = false; | 122 root_surface_damaged_ = false; |
123 } | 123 } |
124 | 124 |
125 bool DisplayScheduler::OnBeginFrameMixInDelegate(const BeginFrameArgs& args) { | 125 bool DisplayScheduler::OnBeginFrameDerivedImpl(const BeginFrameArgs& args) { |
126 base::TimeTicks now = base::TimeTicks::Now(); | 126 base::TimeTicks now = base::TimeTicks::Now(); |
127 TRACE_EVENT2("cc", "DisplayScheduler::BeginFrame", "args", args.AsValue(), | 127 TRACE_EVENT2("cc", "DisplayScheduler::BeginFrame", "args", args.AsValue(), |
128 "now", now); | 128 "now", now); |
129 | 129 |
130 // If we get another BeginFrame before the previous deadline, | 130 // If we get another BeginFrame before the previous deadline, |
131 // synchronously trigger the previous deadline before progressing. | 131 // synchronously trigger the previous deadline before progressing. |
132 if (inside_begin_frame_deadline_interval_) { | 132 if (inside_begin_frame_deadline_interval_) { |
133 OnBeginFrameDeadline(); | 133 OnBeginFrameDeadline(); |
134 } | 134 } |
135 | 135 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 278 } |
279 | 279 |
280 void DisplayScheduler::DidSwapBuffersComplete() { | 280 void DisplayScheduler::DidSwapBuffersComplete() { |
281 pending_swaps_--; | 281 pending_swaps_--; |
282 TRACE_EVENT1("cc", "DisplayScheduler::DidSwapBuffersComplete", | 282 TRACE_EVENT1("cc", "DisplayScheduler::DidSwapBuffersComplete", |
283 "pending_frames", pending_swaps_); | 283 "pending_frames", pending_swaps_); |
284 ScheduleBeginFrameDeadline(); | 284 ScheduleBeginFrameDeadline(); |
285 } | 285 } |
286 | 286 |
287 } // namespace cc | 287 } // namespace cc |
OLD | NEW |