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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1039533002: cc: Add support for sending BeginFrames for video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@misc_video_refactoring
Patch Set: Fix comment. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 72e68ea3e74505df242a61f009c5ed97fcd70edb..1a444c9a158168283165a077085333c7b510b15e 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -52,6 +52,7 @@ SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings)
continuous_painting_(false),
children_need_begin_frames_(false),
defer_commits_(false),
+ video_needs_begin_frames_(false),
last_commit_had_no_updates_(false),
wait_for_active_tree_ready_to_draw_(false),
did_request_swap_in_last_frame_(false),
@@ -243,6 +244,7 @@ void SchedulerStateMachine::AsValueInto(
skip_next_begin_main_frame_to_reduce_latency_);
state->SetBoolean("continuous_painting", continuous_painting_);
state->SetBoolean("children_need_begin_frames", children_need_begin_frames_);
+ state->SetBoolean("video_needs_begin_frames", video_needs_begin_frames_);
state->SetBoolean("defer_commits", defer_commits_);
state->SetBoolean("last_commit_had_no_updates", last_commit_had_no_updates_);
state->SetBoolean("did_request_swap_in_last_frame",
@@ -723,6 +725,9 @@ void SchedulerStateMachine::SetSkipNextBeginMainFrameToReduceLatency() {
bool SchedulerStateMachine::BeginFrameRequiredForChildren() const {
return children_need_begin_frames_;
}
+bool SchedulerStateMachine::BeginFrameNeededForVideo() const {
+ return video_needs_begin_frames_;
+}
bool SchedulerStateMachine::BeginFrameNeeded() const {
// We can't handle BeginFrames when output surface isn't initialized.
@@ -735,7 +740,7 @@ bool SchedulerStateMachine::BeginFrameNeeded() const {
return false;
return (BeginFrameRequiredForAction() || BeginFrameRequiredForChildren() ||
- ProactiveBeginFrameWanted());
+ BeginFrameNeededForVideo() || ProactiveBeginFrameWanted());
}
void SchedulerStateMachine::SetChildrenNeedBeginFrames(
@@ -743,6 +748,11 @@ void SchedulerStateMachine::SetChildrenNeedBeginFrames(
children_need_begin_frames_ = children_need_begin_frames;
}
+void SchedulerStateMachine::SetVideoNeedsBeginFrames(
+ bool video_needs_begin_frames) {
+ video_needs_begin_frames_ = video_needs_begin_frames;
+}
+
void SchedulerStateMachine::SetDeferCommits(bool defer_commits) {
defer_commits_ = defer_commits;
}
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698