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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_settings.cc ('k') | cc/scheduler/scheduler_state_machine.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 #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 5 #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
14 #include "cc/output/begin_frame_args.h" 14 #include "cc/output/begin_frame_args.h"
15 #include "cc/scheduler/commit_earlyout_reason.h" 15 #include "cc/scheduler/commit_earlyout_reason.h"
16 #include "cc/scheduler/draw_result.h" 16 #include "cc/scheduler/draw_result.h"
17 #include "cc/scheduler/scheduler_settings.h" 17 #include "cc/scheduler/scheduler_settings.h"
18 18
19 namespace base { 19 namespace base {
20 namespace trace_event { 20 namespace trace_event {
21 class ConvertableToTraceFormat; 21 class ConvertableToTraceFormat;
22 class TracedValue; 22 class TracedValue;
23 } 23 }
24 24 class Value;
25 // TODO(ssid): remove these aliases after the tracing clients are moved to the
26 // new trace_event namespace. See crbug.com/451032. ETA: March 2015
27 namespace debug {
28 using ::base::trace_event::ConvertableToTraceFormat;
29 using ::base::trace_event::TracedValue;
30 } 25 }
31 class Value;
32 } // namespace base
33 26
34 namespace cc { 27 namespace cc {
35 28
36 // The SchedulerStateMachine decides how to coordinate main thread activites 29 // The SchedulerStateMachine decides how to coordinate main thread activites
37 // like painting/running javascript with rendering and input activities on the 30 // like painting/running javascript with rendering and input activities on the
38 // impl thread. 31 // impl thread.
39 // 32 //
40 // The state machine tracks internal state but is also influenced by external 33 // The state machine tracks internal state but is also influenced by external
41 // state. Internal state includes things like whether a frame has been 34 // state. Internal state includes things like whether a frame has been
42 // requested, while external state includes things like the current time being 35 // requested, while external state includes things like the current time being
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 ACTION_COMMIT, 107 ACTION_COMMIT,
115 ACTION_ACTIVATE_SYNC_TREE, 108 ACTION_ACTIVATE_SYNC_TREE,
116 ACTION_DRAW_AND_SWAP_IF_POSSIBLE, 109 ACTION_DRAW_AND_SWAP_IF_POSSIBLE,
117 ACTION_DRAW_AND_SWAP_FORCED, 110 ACTION_DRAW_AND_SWAP_FORCED,
118 ACTION_DRAW_AND_SWAP_ABORT, 111 ACTION_DRAW_AND_SWAP_ABORT,
119 ACTION_BEGIN_OUTPUT_SURFACE_CREATION, 112 ACTION_BEGIN_OUTPUT_SURFACE_CREATION,
120 ACTION_PREPARE_TILES, 113 ACTION_PREPARE_TILES,
121 }; 114 };
122 static const char* ActionToString(Action action); 115 static const char* ActionToString(Action action);
123 116
124 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; 117 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
125 void AsValueInto(base::debug::TracedValue* dict, base::TimeTicks now) const; 118 void AsValueInto(base::trace_event::TracedValue* dict,
119 base::TimeTicks now) const;
126 120
127 Action NextAction() const; 121 Action NextAction() const;
128 void UpdateState(Action action); 122 void UpdateState(Action action);
129 123
130 // Indicates whether the impl thread needs a BeginImplFrame callback in order 124 // Indicates whether the impl thread needs a BeginImplFrame callback in order
131 // to make progress. 125 // to make progress.
132 bool BeginFrameNeeded() const; 126 bool BeginFrameNeeded() const;
133 127
134 // Indicates whether the scheduler should call 128 // Indicates whether the scheduler should call
135 // SetNeedsBeginFrames(BeginFrameNeeded()) on the frame source. 129 // SetNeedsBeginFrames(BeginFrameNeeded()) on the frame source.
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 bool children_need_begin_frames_; 345 bool children_need_begin_frames_;
352 bool defer_commits_; 346 bool defer_commits_;
353 347
354 private: 348 private:
355 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); 349 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine);
356 }; 350 };
357 351
358 } // namespace cc 352 } // namespace cc
359 353
360 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 354 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_settings.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698