OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/scheduler.h" | 5 #include "cc/scheduler/scheduler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 336 } |
337 } else { | 337 } else { |
338 advance_commit_state_task_.Cancel(); | 338 advance_commit_state_task_.Cancel(); |
339 } | 339 } |
340 } | 340 } |
341 | 341 |
342 // BeginFrame is the mechanism that tells us that now is a good time to start | 342 // BeginFrame is the mechanism that tells us that now is a good time to start |
343 // making a frame. Usually this means that user input for the frame is complete. | 343 // making a frame. Usually this means that user input for the frame is complete. |
344 // If the scheduler is busy, we queue the BeginFrame to be handled later as | 344 // If the scheduler is busy, we queue the BeginFrame to be handled later as |
345 // a BeginRetroFrame. | 345 // a BeginRetroFrame. |
346 bool Scheduler::OnBeginFrameMixInDelegate(const BeginFrameArgs& args) { | 346 bool Scheduler::OnBeginFrameDerivedImpl(const BeginFrameArgs& args) { |
347 TRACE_EVENT1("cc,benchmark", "Scheduler::BeginFrame", "args", args.AsValue()); | 347 TRACE_EVENT1("cc,benchmark", "Scheduler::BeginFrame", "args", args.AsValue()); |
348 | 348 |
349 // Trace this begin frame time through the Chrome stack | 349 // Trace this begin frame time through the Chrome stack |
350 TRACE_EVENT_FLOW_BEGIN0( | 350 TRACE_EVENT_FLOW_BEGIN0( |
351 TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"), "BeginFrameArgs", | 351 TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames"), "BeginFrameArgs", |
352 args.frame_time.ToInternalValue()); | 352 args.frame_time.ToInternalValue()); |
353 | 353 |
354 // TODO(brianderson): Adjust deadline in the DisplayScheduler. | 354 // TODO(brianderson): Adjust deadline in the DisplayScheduler. |
355 BeginFrameArgs adjusted_args(args); | 355 BeginFrameArgs adjusted_args(args); |
356 adjusted_args.deadline -= EstimatedParentDrawTime(); | 356 adjusted_args.deadline -= EstimatedParentDrawTime(); |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 } | 820 } |
821 | 821 |
822 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 822 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
823 return (state_machine_.commit_state() == | 823 return (state_machine_.commit_state() == |
824 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 824 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
825 state_machine_.commit_state() == | 825 state_machine_.commit_state() == |
826 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 826 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
827 } | 827 } |
828 | 828 |
829 } // namespace cc | 829 } // namespace cc |
OLD | NEW |