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

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

Issue 2659123004: cc: Add scheduler support for invalidating content on impl thread. (Closed)
Patch Set: tests Created 3 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 | « no previous file | cc/scheduler/scheduler.cc » ('j') | cc/scheduler/scheduler.cc » ('J')
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 <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 virtual void WillBeginImplFrame(const BeginFrameArgs& args) = 0; 38 virtual void WillBeginImplFrame(const BeginFrameArgs& args) = 0;
39 virtual void ScheduledActionSendBeginMainFrame( 39 virtual void ScheduledActionSendBeginMainFrame(
40 const BeginFrameArgs& args) = 0; 40 const BeginFrameArgs& args) = 0;
41 virtual DrawResult ScheduledActionDrawIfPossible() = 0; 41 virtual DrawResult ScheduledActionDrawIfPossible() = 0;
42 virtual DrawResult ScheduledActionDrawForced() = 0; 42 virtual DrawResult ScheduledActionDrawForced() = 0;
43 virtual void ScheduledActionCommit() = 0; 43 virtual void ScheduledActionCommit() = 0;
44 virtual void ScheduledActionActivateSyncTree() = 0; 44 virtual void ScheduledActionActivateSyncTree() = 0;
45 virtual void ScheduledActionBeginCompositorFrameSinkCreation() = 0; 45 virtual void ScheduledActionBeginCompositorFrameSinkCreation() = 0;
46 virtual void ScheduledActionPrepareTiles() = 0; 46 virtual void ScheduledActionPrepareTiles() = 0;
47 virtual void ScheduledActionInvalidateCompositorFrameSink() = 0; 47 virtual void ScheduledActionInvalidateCompositorFrameSink() = 0;
48 virtual void ScheduledActionPerformImplSideInvalidation() = 0;
sunnyps 2017/02/14 21:40:18 nit/bikeshed: ScheduledActionInvalidateActiveTree?
Khushal 2017/02/15 00:56:33 Hmmm, given that in the default case we actually c
48 virtual void DidFinishImplFrame() = 0; 49 virtual void DidFinishImplFrame() = 0;
49 virtual void SendBeginMainFrameNotExpectedSoon() = 0; 50 virtual void SendBeginMainFrameNotExpectedSoon() = 0;
50 51
51 protected: 52 protected:
52 virtual ~SchedulerClient() {} 53 virtual ~SchedulerClient() {}
53 }; 54 };
54 55
55 class CC_EXPORT Scheduler : public BeginFrameObserverBase { 56 class CC_EXPORT Scheduler : public BeginFrameObserverBase {
56 public: 57 public:
57 Scheduler(SchedulerClient* client, 58 Scheduler(SchedulerClient* client,
(...skipping 24 matching lines...) Expand all
82 83
83 void SetNeedsBeginMainFrame(); 84 void SetNeedsBeginMainFrame();
84 // Requests a single impl frame (after the current frame if there is one 85 // Requests a single impl frame (after the current frame if there is one
85 // active). 86 // active).
86 void SetNeedsOneBeginImplFrame(); 87 void SetNeedsOneBeginImplFrame();
87 88
88 void SetNeedsRedraw(); 89 void SetNeedsRedraw();
89 90
90 void SetNeedsPrepareTiles(); 91 void SetNeedsPrepareTiles();
91 92
93 // Requests a pending tree should be created to invalidate content on the impl
94 // thread, after the current tree is activated, if any. If the request
95 // necessitates creating a pending tree only for impl-side invalidations, the
96 // |client_| is informed to perform this action using
97 // ScheduledActionRunImplSideInvalidation.
98 // If ScheduledActionCommit is performed, the impl-side invalidations should
99 // be merged with the main frame and the request is assumed to be completed.
100 void SetNeedsImplSideInvalidation();
101
92 // Drawing should result in submitting a CompositorFrame to the 102 // Drawing should result in submitting a CompositorFrame to the
93 // CompositorFrameSink and then calling this. 103 // CompositorFrameSink and then calling this.
94 void DidSubmitCompositorFrame(); 104 void DidSubmitCompositorFrame();
95 // The CompositorFrameSink acks when it is ready for a new frame which 105 // The CompositorFrameSink acks when it is ready for a new frame which
96 // should result in this getting called to unblock the next draw. 106 // should result in this getting called to unblock the next draw.
97 void DidReceiveCompositorFrameAck(); 107 void DidReceiveCompositorFrameAck();
98 108
99 void SetTreePrioritiesAndScrollState(TreePriority tree_priority, 109 void SetTreePrioritiesAndScrollState(TreePriority tree_priority,
100 ScrollHandlerState scroll_handler_state); 110 ScrollHandlerState scroll_handler_state);
101 111
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 214 }
205 215
206 base::WeakPtrFactory<Scheduler> weak_factory_; 216 base::WeakPtrFactory<Scheduler> weak_factory_;
207 217
208 DISALLOW_COPY_AND_ASSIGN(Scheduler); 218 DISALLOW_COPY_AND_ASSIGN(Scheduler);
209 }; 219 };
210 220
211 } // namespace cc 221 } // namespace cc
212 222
213 #endif // CC_SCHEDULER_SCHEDULER_H_ 223 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.cc » ('j') | cc/scheduler/scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698