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

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

Issue 1421483005: Reland: Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/resources/texture_mailbox.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('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 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 begin_impl_frame_deadline_mode_( 68 begin_impl_frame_deadline_mode_(
69 SchedulerStateMachine::BEGIN_IMPL_FRAME_DEADLINE_MODE_NONE), 69 SchedulerStateMachine::BEGIN_IMPL_FRAME_DEADLINE_MODE_NONE),
70 begin_impl_frame_tracker_(BEGINFRAMETRACKER_FROM_HERE), 70 begin_impl_frame_tracker_(BEGINFRAMETRACKER_FROM_HERE),
71 state_machine_(settings), 71 state_machine_(settings),
72 inside_process_scheduled_actions_(false), 72 inside_process_scheduled_actions_(false),
73 inside_action_(SchedulerStateMachine::ACTION_NONE), 73 inside_action_(SchedulerStateMachine::ACTION_NONE),
74 weak_factory_(this) { 74 weak_factory_(this) {
75 TRACE_EVENT1("cc", "Scheduler::Scheduler", "settings", settings_.AsValue()); 75 TRACE_EVENT1("cc", "Scheduler::Scheduler", "settings", settings_.AsValue());
76 DCHECK(client_); 76 DCHECK(client_);
77 DCHECK(!state_machine_.BeginFrameNeeded()); 77 DCHECK(!state_machine_.BeginFrameNeeded());
78 DCHECK_IMPLIES(settings_.use_external_begin_frame_source, 78 DCHECK(!settings_.use_external_begin_frame_source || external_frame_source_);
79 external_frame_source_); 79 DCHECK(settings_.use_external_begin_frame_source || synthetic_frame_source_);
80 DCHECK_IMPLIES(!settings_.use_external_begin_frame_source,
81 synthetic_frame_source_);
82 DCHECK(unthrottled_frame_source_); 80 DCHECK(unthrottled_frame_source_);
83 81
84 begin_retro_frame_closure_ = 82 begin_retro_frame_closure_ =
85 base::Bind(&Scheduler::BeginRetroFrame, weak_factory_.GetWeakPtr()); 83 base::Bind(&Scheduler::BeginRetroFrame, weak_factory_.GetWeakPtr());
86 begin_impl_frame_deadline_closure_ = base::Bind( 84 begin_impl_frame_deadline_closure_ = base::Bind(
87 &Scheduler::OnBeginImplFrameDeadline, weak_factory_.GetWeakPtr()); 85 &Scheduler::OnBeginImplFrameDeadline, weak_factory_.GetWeakPtr());
88 86
89 frame_source_->AddObserver(this); 87 frame_source_->AddObserver(this);
90 frame_source_->AddSource(primary_frame_source()); 88 frame_source_->AddSource(primary_frame_source());
91 primary_frame_source()->SetClientReady(); 89 primary_frame_source()->SetClientReady();
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 } 837 }
840 838
841 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 839 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
842 return (state_machine_.begin_main_frame_state() == 840 return (state_machine_.begin_main_frame_state() ==
843 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || 841 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT ||
844 state_machine_.begin_main_frame_state() == 842 state_machine_.begin_main_frame_state() ==
845 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); 843 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED);
846 } 844 }
847 845
848 } // namespace cc 846 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/texture_mailbox.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698