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

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

Issue 1417903005: Revert of 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(!settings_.use_external_begin_frame_source || external_frame_source_); 78 DCHECK_IMPLIES(settings_.use_external_begin_frame_source,
79 DCHECK(settings_.use_external_begin_frame_source || synthetic_frame_source_); 79 external_frame_source_);
80 DCHECK_IMPLIES(!settings_.use_external_begin_frame_source,
81 synthetic_frame_source_);
80 DCHECK(unthrottled_frame_source_); 82 DCHECK(unthrottled_frame_source_);
81 83
82 begin_retro_frame_closure_ = 84 begin_retro_frame_closure_ =
83 base::Bind(&Scheduler::BeginRetroFrame, weak_factory_.GetWeakPtr()); 85 base::Bind(&Scheduler::BeginRetroFrame, weak_factory_.GetWeakPtr());
84 begin_impl_frame_deadline_closure_ = base::Bind( 86 begin_impl_frame_deadline_closure_ = base::Bind(
85 &Scheduler::OnBeginImplFrameDeadline, weak_factory_.GetWeakPtr()); 87 &Scheduler::OnBeginImplFrameDeadline, weak_factory_.GetWeakPtr());
86 88
87 frame_source_->AddObserver(this); 89 frame_source_->AddObserver(this);
88 frame_source_->AddSource(primary_frame_source()); 90 frame_source_->AddSource(primary_frame_source());
89 primary_frame_source()->SetClientReady(); 91 primary_frame_source()->SetClientReady();
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 } 839 }
838 840
839 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 841 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
840 return (state_machine_.begin_main_frame_state() == 842 return (state_machine_.begin_main_frame_state() ==
841 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || 843 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT ||
842 state_machine_.begin_main_frame_state() == 844 state_machine_.begin_main_frame_state() ==
843 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); 845 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED);
844 } 846 }
845 847
846 } // namespace cc 848 } // 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