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

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

Issue 23463014: cc: Poll for state that triggers draws (synchronous compositor only) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add more test expectations; formatting; Created 7 years, 3 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_state_machine.h ('k') | cc/trees/layer_tree_host_unittest.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/values.h" 10 #include "base/values.h"
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 void SchedulerStateMachine::DidEnterBeginFrame(const BeginFrameArgs& args) { 746 void SchedulerStateMachine::DidEnterBeginFrame(const BeginFrameArgs& args) {
747 current_frame_number_++; 747 current_frame_number_++;
748 inside_begin_frame_ = true; 748 inside_begin_frame_ = true;
749 last_begin_frame_args_ = args; 749 last_begin_frame_args_ = args;
750 } 750 }
751 751
752 void SchedulerStateMachine::DidLeaveBeginFrame() { 752 void SchedulerStateMachine::DidLeaveBeginFrame() {
753 inside_begin_frame_ = false; 753 inside_begin_frame_ = false;
754 } 754 }
755 755
756 void SchedulerStateMachine::PollForAnticipatedDrawTriggers() {
757 current_frame_number_++;
758 }
759
756 void SchedulerStateMachine::SetVisible(bool visible) { visible_ = visible; } 760 void SchedulerStateMachine::SetVisible(bool visible) { visible_ = visible; }
757 761
758 void SchedulerStateMachine::SetNeedsRedraw() { needs_redraw_ = true; } 762 void SchedulerStateMachine::SetNeedsRedraw() { needs_redraw_ = true; }
759 763
760 void SchedulerStateMachine::SetSwapUsedIncompleteTile( 764 void SchedulerStateMachine::SetSwapUsedIncompleteTile(
761 bool used_incomplete_tile) { 765 bool used_incomplete_tile) {
762 swap_used_incomplete_tile_ = used_incomplete_tile; 766 swap_used_incomplete_tile_ = used_incomplete_tile;
763 } 767 }
764 768
765 void SchedulerStateMachine::DidDrawIfPossibleCompleted(bool success) { 769 void SchedulerStateMachine::DidDrawIfPossibleCompleted(bool success) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 case OUTPUT_SURFACE_ACTIVE: 861 case OUTPUT_SURFACE_ACTIVE:
858 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 862 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
859 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 863 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
860 return true; 864 return true;
861 } 865 }
862 NOTREACHED(); 866 NOTREACHED();
863 return false; 867 return false;
864 } 868 }
865 869
866 } // namespace cc 870 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698