| 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 client_->ScheduledActionInvalidateOutputSurface(); | 773 client_->ScheduledActionInvalidateOutputSurface(); |
| 774 break; | 774 break; |
| 775 } | 775 } |
| 776 } | 776 } |
| 777 } while (action != SchedulerStateMachine::ACTION_NONE); | 777 } while (action != SchedulerStateMachine::ACTION_NONE); |
| 778 | 778 |
| 779 ScheduleBeginImplFrameDeadlineIfNeeded(); | 779 ScheduleBeginImplFrameDeadlineIfNeeded(); |
| 780 SetupNextBeginFrameIfNeeded(); | 780 SetupNextBeginFrameIfNeeded(); |
| 781 } | 781 } |
| 782 | 782 |
| 783 scoped_refptr<base::trace_event::ConvertableToTraceFormat> Scheduler::AsValue() | 783 scoped_ptr<base::trace_event::ConvertableToTraceFormat> Scheduler::AsValue() |
| 784 const { | 784 const { |
| 785 scoped_refptr<base::trace_event::TracedValue> state = | 785 scoped_ptr<base::trace_event::TracedValue> state( |
| 786 new base::trace_event::TracedValue(); | 786 new base::trace_event::TracedValue()); |
| 787 AsValueInto(state.get()); | 787 AsValueInto(state.get()); |
| 788 return state; | 788 return std::move(state); |
| 789 } | 789 } |
| 790 | 790 |
| 791 void Scheduler::AsValueInto(base::trace_event::TracedValue* state) const { | 791 void Scheduler::AsValueInto(base::trace_event::TracedValue* state) const { |
| 792 base::TimeTicks now = Now(); | 792 base::TimeTicks now = Now(); |
| 793 | 793 |
| 794 state->BeginDictionary("state_machine"); | 794 state->BeginDictionary("state_machine"); |
| 795 state_machine_.AsValueInto(state); | 795 state_machine_.AsValueInto(state); |
| 796 state->EndDictionary(); | 796 state->EndDictionary(); |
| 797 | 797 |
| 798 // Only trace frame sources when explicitly enabled - http://crbug.com/420607 | 798 // Only trace frame sources when explicitly enabled - http://crbug.com/420607 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 } | 911 } |
| 912 | 912 |
| 913 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 913 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
| 914 return (state_machine_.begin_main_frame_state() == | 914 return (state_machine_.begin_main_frame_state() == |
| 915 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || | 915 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || |
| 916 state_machine_.begin_main_frame_state() == | 916 state_machine_.begin_main_frame_state() == |
| 917 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); | 917 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); |
| 918 } | 918 } |
| 919 | 919 |
| 920 } // namespace cc | 920 } // namespace cc |
| OLD | NEW |