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

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

Issue 22926024: cc: Control activation from the Scheduler (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedOutputSurface4
Patch Set: git cl format 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 | « no previous file | cc/scheduler/scheduler.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_H_ 5 #ifndef CC_SCHEDULER_SCHEDULER_H_
6 #define CC_SCHEDULER_SCHEDULER_H_ 6 #define CC_SCHEDULER_SCHEDULER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 class SchedulerClient { 34 class SchedulerClient {
35 public: 35 public:
36 virtual void SetNeedsBeginFrameOnImplThread(bool enable) = 0; 36 virtual void SetNeedsBeginFrameOnImplThread(bool enable) = 0;
37 virtual void ScheduledActionSendBeginFrameToMainThread() = 0; 37 virtual void ScheduledActionSendBeginFrameToMainThread() = 0;
38 virtual ScheduledActionDrawAndSwapResult 38 virtual ScheduledActionDrawAndSwapResult
39 ScheduledActionDrawAndSwapIfPossible() = 0; 39 ScheduledActionDrawAndSwapIfPossible() = 0;
40 virtual ScheduledActionDrawAndSwapResult 40 virtual ScheduledActionDrawAndSwapResult
41 ScheduledActionDrawAndSwapForced() = 0; 41 ScheduledActionDrawAndSwapForced() = 0;
42 virtual void ScheduledActionCommit() = 0; 42 virtual void ScheduledActionCommit() = 0;
43 virtual void ScheduledActionUpdateVisibleTiles() = 0; 43 virtual void ScheduledActionUpdateVisibleTiles() = 0;
44 virtual void ScheduledActionActivatePendingTreeIfNeeded() = 0; 44 virtual void ScheduledActionActivatePendingTree() = 0;
45 virtual void ScheduledActionBeginOutputSurfaceCreation() = 0; 45 virtual void ScheduledActionBeginOutputSurfaceCreation() = 0;
46 virtual void ScheduledActionAcquireLayerTexturesForMainThread() = 0; 46 virtual void ScheduledActionAcquireLayerTexturesForMainThread() = 0;
47 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) = 0; 47 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) = 0;
48 virtual base::TimeDelta DrawDurationEstimate() = 0; 48 virtual base::TimeDelta DrawDurationEstimate() = 0;
49 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() = 0; 49 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() = 0;
50 virtual base::TimeDelta CommitToActivateDurationEstimate() = 0; 50 virtual base::TimeDelta CommitToActivateDurationEstimate() = 0;
51 51
52 protected: 52 protected:
53 virtual ~SchedulerClient() {} 53 virtual ~SchedulerClient() {}
54 }; 54 };
55 55
56 class CC_EXPORT Scheduler { 56 class CC_EXPORT Scheduler {
57 public: 57 public:
58 static scoped_ptr<Scheduler> Create( 58 static scoped_ptr<Scheduler> Create(
59 SchedulerClient* client, 59 SchedulerClient* client,
60 const SchedulerSettings& scheduler_settings) { 60 const SchedulerSettings& scheduler_settings) {
61 return make_scoped_ptr(new Scheduler(client, scheduler_settings)); 61 return make_scoped_ptr(new Scheduler(client, scheduler_settings));
62 } 62 }
63 63
64 virtual ~Scheduler(); 64 virtual ~Scheduler();
65 65
66 void SetCanStart(); 66 void SetCanStart();
67 67
68 void SetVisible(bool visible); 68 void SetVisible(bool visible);
69 void SetCanDraw(bool can_draw); 69 void SetCanDraw(bool can_draw);
70 void SetHasPendingTree(bool has_pending_tree); 70 void NotifyReadyToActivate();
71 71
72 void SetNeedsCommit(); 72 void SetNeedsCommit();
73 73
74 // Like SetNeedsCommit(), but ensures a commit will definitely happen even if 74 // Like SetNeedsCommit(), but ensures a commit will definitely happen even if
75 // we are not visible. 75 // we are not visible.
76 void SetNeedsForcedCommit(); 76 void SetNeedsForcedCommit();
77 77
78 void SetNeedsRedraw(); 78 void SetNeedsRedraw();
79 79
80 void SetMainThreadNeedsLayerTextures(); 80 void SetMainThreadNeedsLayerTextures();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 SchedulerStateMachine state_machine_; 132 SchedulerStateMachine state_machine_;
133 bool inside_process_scheduled_actions_; 133 bool inside_process_scheduled_actions_;
134 134
135 DISALLOW_COPY_AND_ASSIGN(Scheduler); 135 DISALLOW_COPY_AND_ASSIGN(Scheduler);
136 }; 136 };
137 137
138 } // namespace cc 138 } // namespace cc
139 139
140 #endif // CC_SCHEDULER_SCHEDULER_H_ 140 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698