Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: cc/scheduler/scheduler.cc

Issue 609003002: cc:: Remove main_frame_before_draw_enabled from scheduler settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DCHECK Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/base/switches.cc ('k') | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_argument.h" 10 #include "base/debug/trace_event_argument.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 state_machine_(scheduler_settings), 84 state_machine_(scheduler_settings),
85 inside_process_scheduled_actions_(false), 85 inside_process_scheduled_actions_(false),
86 inside_action_(SchedulerStateMachine::ACTION_NONE), 86 inside_action_(SchedulerStateMachine::ACTION_NONE),
87 weak_factory_(this) { 87 weak_factory_(this) {
88 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"), 88 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler"),
89 "Scheduler::Scheduler", 89 "Scheduler::Scheduler",
90 "settings", 90 "settings",
91 settings_.AsValue()); 91 settings_.AsValue());
92 DCHECK(client_); 92 DCHECK(client_);
93 DCHECK(!state_machine_.BeginFrameNeeded()); 93 DCHECK(!state_machine_.BeginFrameNeeded());
94 if (settings_.main_frame_before_activation_enabled) {
95 DCHECK(settings_.main_frame_before_draw_enabled);
96 }
97 94
98 begin_retro_frame_closure_ = 95 begin_retro_frame_closure_ =
99 base::Bind(&Scheduler::BeginRetroFrame, weak_factory_.GetWeakPtr()); 96 base::Bind(&Scheduler::BeginRetroFrame, weak_factory_.GetWeakPtr());
100 begin_unthrottled_frame_closure_ = 97 begin_unthrottled_frame_closure_ =
101 base::Bind(&Scheduler::BeginUnthrottledFrame, weak_factory_.GetWeakPtr()); 98 base::Bind(&Scheduler::BeginUnthrottledFrame, weak_factory_.GetWeakPtr());
102 begin_impl_frame_deadline_closure_ = base::Bind( 99 begin_impl_frame_deadline_closure_ = base::Bind(
103 &Scheduler::OnBeginImplFrameDeadline, weak_factory_.GetWeakPtr()); 100 &Scheduler::OnBeginImplFrameDeadline, weak_factory_.GetWeakPtr());
104 poll_for_draw_triggers_closure_ = base::Bind( 101 poll_for_draw_triggers_closure_ = base::Bind(
105 &Scheduler::PollForAnticipatedDrawTriggers, weak_factory_.GetWeakPtr()); 102 &Scheduler::PollForAnticipatedDrawTriggers, weak_factory_.GetWeakPtr());
106 advance_commit_state_closure_ = base::Bind( 103 advance_commit_state_closure_ = base::Bind(
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 } 770 }
774 771
775 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 772 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
776 return (state_machine_.commit_state() == 773 return (state_machine_.commit_state() ==
777 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 774 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
778 state_machine_.commit_state() == 775 state_machine_.commit_state() ==
779 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 776 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
780 } 777 }
781 778
782 } // namespace cc 779 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/switches.cc ('k') | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698