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

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

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/scheduler/scheduler.cc ('k') | cc/tiles/picture_layer_tiling.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_state_machine.h" 5 #include "cc/scheduler/scheduler_state_machine.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 return false; 487 return false;
488 488
489 // We must not finish the commit until the pending tree is free. 489 // We must not finish the commit until the pending tree is free.
490 if (has_pending_tree_) { 490 if (has_pending_tree_) {
491 DCHECK(settings_.main_frame_before_activation_enabled); 491 DCHECK(settings_.main_frame_before_activation_enabled);
492 return false; 492 return false;
493 } 493 }
494 494
495 // If we only have an active tree, it is incorrect to replace it 495 // If we only have an active tree, it is incorrect to replace it
496 // before we've drawn it. 496 // before we've drawn it.
497 DCHECK_IMPLIES(settings_.commit_to_active_tree, 497 DCHECK(!settings_.commit_to_active_tree || !active_tree_needs_first_draw_);
498 !active_tree_needs_first_draw_);
499 498
500 return true; 499 return true;
501 } 500 }
502 501
503 bool SchedulerStateMachine::ShouldPrepareTiles() const { 502 bool SchedulerStateMachine::ShouldPrepareTiles() const {
504 // PrepareTiles only really needs to be called immediately after commit 503 // PrepareTiles only really needs to be called immediately after commit
505 // and then periodically after that. Use a funnel to make sure we average 504 // and then periodically after that. Use a funnel to make sure we average
506 // one PrepareTiles per BeginImplFrame in the long run. 505 // one PrepareTiles per BeginImplFrame in the long run.
507 if (prepare_tiles_funnel_ > 0) 506 if (prepare_tiles_funnel_ > 0)
508 return false; 507 return false;
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 static_cast<int>(begin_impl_frame_state_), 1169 static_cast<int>(begin_impl_frame_state_),
1171 static_cast<int>(commit_state_), 1170 static_cast<int>(commit_state_),
1172 has_pending_tree_ ? 'T' : 'F', 1171 has_pending_tree_ ? 'T' : 'F',
1173 pending_tree_is_ready_for_activation_ ? 'T' : 'F', 1172 pending_tree_is_ready_for_activation_ ? 'T' : 'F',
1174 active_tree_needs_first_draw_ ? 'T' : 'F', 1173 active_tree_needs_first_draw_ ? 'T' : 'F',
1175 max_pending_swaps_, 1174 max_pending_swaps_,
1176 pending_swaps_); 1175 pending_swaps_);
1177 } 1176 }
1178 1177
1179 } // namespace cc 1178 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/tiles/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698