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/scheduler/begin_frame_source.h" | 5 #include "cc/scheduler/begin_frame_source.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/debug/trace_event.h" | |
9 #include "base/debug/trace_event_argument.h" | |
10 #include "base/location.h" | 8 #include "base/location.h" |
11 #include "base/logging.h" | 9 #include "base/logging.h" |
12 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/trace_event/trace_event.h" |
| 12 #include "base/trace_event/trace_event_argument.h" |
13 #include "cc/scheduler/delay_based_time_source.h" | 13 #include "cc/scheduler/delay_based_time_source.h" |
14 #include "cc/scheduler/scheduler.h" | 14 #include "cc/scheduler/scheduler.h" |
15 #include "ui/gfx/frame_time.h" | 15 #include "ui/gfx/frame_time.h" |
16 | 16 |
17 #ifdef NDEBUG | 17 #ifdef NDEBUG |
18 #define DEBUG_FRAMES(...) | 18 #define DEBUG_FRAMES(...) |
19 #else | 19 #else |
20 #define DEBUG_FRAMES(name, arg1_name, arg1_val, arg2_name, arg2_val) \ | 20 #define DEBUG_FRAMES(name, arg1_name, arg1_val, arg2_name, arg2_val) \ |
21 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"), \ | 21 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"), \ |
22 name, \ | 22 name, \ |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 if (!observer_->LastUsedBeginFrameArgs().IsValid()) | 483 if (!observer_->LastUsedBeginFrameArgs().IsValid()) |
484 return true; | 484 return true; |
485 | 485 |
486 // Only allow new args have a *strictly bigger* frame_time value and statisfy | 486 // Only allow new args have a *strictly bigger* frame_time value and statisfy |
487 // minimum interval requirement. | 487 // minimum interval requirement. |
488 return (args.frame_time >= | 488 return (args.frame_time >= |
489 observer_->LastUsedBeginFrameArgs().frame_time + minimum_interval_); | 489 observer_->LastUsedBeginFrameArgs().frame_time + minimum_interval_); |
490 } | 490 } |
491 | 491 |
492 } // namespace cc | 492 } // namespace cc |
OLD | NEW |