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

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

Issue 1296673004: Devtools/CC: Remove continuous repainting feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/test/fake_proxy.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 visible_(false), 42 visible_(false),
43 can_start_(false), 43 can_start_(false),
44 can_draw_(false), 44 can_draw_(false),
45 has_pending_tree_(false), 45 has_pending_tree_(false),
46 pending_tree_is_ready_for_activation_(false), 46 pending_tree_is_ready_for_activation_(false),
47 active_tree_needs_first_draw_(false), 47 active_tree_needs_first_draw_(false),
48 did_create_and_initialize_first_output_surface_(false), 48 did_create_and_initialize_first_output_surface_(false),
49 impl_latency_takes_priority_(false), 49 impl_latency_takes_priority_(false),
50 main_thread_missed_last_deadline_(false), 50 main_thread_missed_last_deadline_(false),
51 skip_next_begin_main_frame_to_reduce_latency_(false), 51 skip_next_begin_main_frame_to_reduce_latency_(false),
52 continuous_painting_(false),
53 children_need_begin_frames_(false), 52 children_need_begin_frames_(false),
54 defer_commits_(false), 53 defer_commits_(false),
55 video_needs_begin_frames_(false), 54 video_needs_begin_frames_(false),
56 last_commit_had_no_updates_(false), 55 last_commit_had_no_updates_(false),
57 wait_for_ready_to_draw_(false), 56 wait_for_ready_to_draw_(false),
58 did_request_swap_in_last_frame_(false), 57 did_request_swap_in_last_frame_(false),
59 did_perform_swap_in_last_draw_(false) {} 58 did_perform_swap_in_last_draw_(false) {}
60 59
61 const char* SchedulerStateMachine::OutputSurfaceStateToString( 60 const char* SchedulerStateMachine::OutputSurfaceStateToString(
62 OutputSurfaceState state) { 61 OutputSurfaceState state) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 active_tree_needs_first_draw_); 234 active_tree_needs_first_draw_);
236 state->SetBoolean("wait_for_ready_to_draw", wait_for_ready_to_draw_); 235 state->SetBoolean("wait_for_ready_to_draw", wait_for_ready_to_draw_);
237 state->SetBoolean("did_create_and_initialize_first_output_surface", 236 state->SetBoolean("did_create_and_initialize_first_output_surface",
238 did_create_and_initialize_first_output_surface_); 237 did_create_and_initialize_first_output_surface_);
239 state->SetBoolean("impl_latency_takes_priority", 238 state->SetBoolean("impl_latency_takes_priority",
240 impl_latency_takes_priority_); 239 impl_latency_takes_priority_);
241 state->SetBoolean("main_thread_missed_last_deadline", 240 state->SetBoolean("main_thread_missed_last_deadline",
242 main_thread_missed_last_deadline_); 241 main_thread_missed_last_deadline_);
243 state->SetBoolean("skip_next_begin_main_frame_to_reduce_latency", 242 state->SetBoolean("skip_next_begin_main_frame_to_reduce_latency",
244 skip_next_begin_main_frame_to_reduce_latency_); 243 skip_next_begin_main_frame_to_reduce_latency_);
245 state->SetBoolean("continuous_painting", continuous_painting_);
246 state->SetBoolean("children_need_begin_frames", children_need_begin_frames_); 244 state->SetBoolean("children_need_begin_frames", children_need_begin_frames_);
247 state->SetBoolean("video_needs_begin_frames", video_needs_begin_frames_); 245 state->SetBoolean("video_needs_begin_frames", video_needs_begin_frames_);
248 state->SetBoolean("defer_commits", defer_commits_); 246 state->SetBoolean("defer_commits", defer_commits_);
249 state->SetBoolean("last_commit_had_no_updates", last_commit_had_no_updates_); 247 state->SetBoolean("last_commit_had_no_updates", last_commit_had_no_updates_);
250 state->SetBoolean("did_request_swap_in_last_frame", 248 state->SetBoolean("did_request_swap_in_last_frame",
251 did_request_swap_in_last_frame_); 249 did_request_swap_in_last_frame_);
252 state->SetBoolean("did_perform_swap_in_last_draw", 250 state->SetBoolean("did_perform_swap_in_last_draw",
253 did_perform_swap_in_last_draw_); 251 did_perform_swap_in_last_draw_);
254 state->EndDictionary(); 252 state->EndDictionary();
255 } 253 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 if (commit_has_no_updates && 618 if (commit_has_no_updates &&
621 forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) { 619 forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) {
622 DCHECK(!has_pending_tree_); 620 DCHECK(!has_pending_tree_);
623 needs_redraw_ = true; 621 needs_redraw_ = true;
624 active_tree_needs_first_draw_ = true; 622 active_tree_needs_first_draw_ = true;
625 } 623 }
626 624
627 // This post-commit work is common to both completed and aborted commits. 625 // This post-commit work is common to both completed and aborted commits.
628 pending_tree_is_ready_for_activation_ = false; 626 pending_tree_is_ready_for_activation_ = false;
629 627
630 if (continuous_painting_)
631 needs_begin_main_frame_ = true;
632 last_commit_had_no_updates_ = commit_has_no_updates; 628 last_commit_had_no_updates_ = commit_has_no_updates;
633 } 629 }
634 630
635 void SchedulerStateMachine::WillActivate() { 631 void SchedulerStateMachine::WillActivate() {
636 if (begin_main_frame_state_ == 632 if (begin_main_frame_state_ ==
637 BEGIN_MAIN_FRAME_STATE_WAITING_FOR_ACTIVATION) { 633 BEGIN_MAIN_FRAME_STATE_WAITING_FOR_ACTIVATION) {
638 begin_main_frame_state_ = settings_.commit_to_active_tree 634 begin_main_frame_state_ = settings_.commit_to_active_tree
639 ? BEGIN_MAIN_FRAME_STATE_WAITING_FOR_DRAW 635 ? BEGIN_MAIN_FRAME_STATE_WAITING_FOR_DRAW
640 : BEGIN_MAIN_FRAME_STATE_IDLE; 636 : BEGIN_MAIN_FRAME_STATE_IDLE;
641 } 637 }
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 case OUTPUT_SURFACE_ACTIVE: 1104 case OUTPUT_SURFACE_ACTIVE:
1109 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1105 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1110 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1106 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1111 return true; 1107 return true;
1112 } 1108 }
1113 NOTREACHED(); 1109 NOTREACHED();
1114 return false; 1110 return false;
1115 } 1111 }
1116 1112
1117 } // namespace cc 1113 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698