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

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

Issue 2717553005: cc: Glue LTHI and Scheduler changes for checker-imaging. (Closed)
Patch Set: .. Created 3 years, 9 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/playback/raster_source.cc ('k') | cc/test/layer_tree_test.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_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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 496
497 return true; 497 return true;
498 } 498 }
499 499
500 bool SchedulerStateMachine::ShouldCommit() const { 500 bool SchedulerStateMachine::ShouldCommit() const {
501 if (begin_main_frame_state_ != BEGIN_MAIN_FRAME_STATE_READY_TO_COMMIT) 501 if (begin_main_frame_state_ != BEGIN_MAIN_FRAME_STATE_READY_TO_COMMIT)
502 return false; 502 return false;
503 503
504 // We must not finish the commit until the pending tree is free. 504 // We must not finish the commit until the pending tree is free.
505 if (has_pending_tree_) { 505 if (has_pending_tree_) {
506 DCHECK(settings_.main_frame_before_activation_enabled); 506 DCHECK(settings_.main_frame_before_activation_enabled ||
507 current_pending_tree_is_impl_side_);
507 return false; 508 return false;
508 } 509 }
509 510
510 // If we only have an active tree, it is incorrect to replace it before we've 511 // If we only have an active tree, it is incorrect to replace it before we've
511 // drawn it. 512 // drawn it.
512 DCHECK(!settings_.commit_to_active_tree || !active_tree_needs_first_draw_); 513 DCHECK(!settings_.commit_to_active_tree || !active_tree_needs_first_draw_);
513 514
514 // In browser compositor commit reclaims any resources submitted during draw. 515 // In browser compositor commit reclaims any resources submitted during draw.
515 DCHECK(!settings_.commit_to_active_tree || !IsDrawThrottled()); 516 DCHECK(!settings_.commit_to_active_tree || !IsDrawThrottled());
516 517
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 case COMPOSITOR_FRAME_SINK_ACTIVE: 1210 case COMPOSITOR_FRAME_SINK_ACTIVE:
1210 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_COMMIT: 1211 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_COMMIT:
1211 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_ACTIVATION: 1212 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_ACTIVATION:
1212 return true; 1213 return true;
1213 } 1214 }
1214 NOTREACHED(); 1215 NOTREACHED();
1215 return false; 1216 return false;
1216 } 1217 }
1217 1218
1218 } // namespace cc 1219 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/raster_source.cc ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698