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

Side by Side Diff: cc/CCScheduler.h

Issue 10911262: cc: Scheduler will never process a commit until it receives a vsync tick. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/CCScheduler.cpp » ('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 CCScheduler_h 5 #ifndef CCScheduler_h
6 #define CCScheduler_h 6 #define CCScheduler_h
7 7
8 #include "CCFrameRateController.h" 8 #include "CCFrameRateController.h"
9 #include "CCSchedulerStateMachine.h" 9 #include "CCSchedulerStateMachine.h"
10 10
(...skipping 14 matching lines...) Expand all
25 : didDraw(didDraw) 25 : didDraw(didDraw)
26 , didSwap(didSwap) 26 , didSwap(didSwap)
27 { 27 {
28 } 28 }
29 bool didDraw; 29 bool didDraw;
30 bool didSwap; 30 bool didSwap;
31 }; 31 };
32 32
33 class CCSchedulerClient { 33 class CCSchedulerClient {
34 public: 34 public:
35 virtual bool hasMoreResourceUpdates() const = 0;
36
37 virtual void scheduledActionBeginFrame() = 0; 35 virtual void scheduledActionBeginFrame() = 0;
38 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() = 0; 36 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() = 0;
39 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) = 0; 37 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) = 0;
40 virtual void scheduledActionUpdateMoreResources(double monotonicTimeLimit) = 0; 38 virtual void scheduledActionUpdateMoreResources(double monotonicTimeLimit) = 0;
41 virtual void scheduledActionCommit() = 0; 39 virtual void scheduledActionCommit() = 0;
42 virtual void scheduledActionBeginContextRecreation() = 0; 40 virtual void scheduledActionBeginContextRecreation() = 0;
43 virtual void scheduledActionAcquireLayerTexturesForMainThread() = 0; 41 virtual void scheduledActionAcquireLayerTexturesForMainThread() = 0;
44 42
45 protected: 43 protected:
46 virtual ~CCSchedulerClient() { } 44 virtual ~CCSchedulerClient() { }
(...skipping 19 matching lines...) Expand all
66 // Like setNeedsCommit(), but ensures a commit will definitely happen even i f we are not visible. 64 // Like setNeedsCommit(), but ensures a commit will definitely happen even i f we are not visible.
67 void setNeedsForcedCommit(); 65 void setNeedsForcedCommit();
68 66
69 void setNeedsRedraw(); 67 void setNeedsRedraw();
70 68
71 void setMainThreadNeedsLayerTextures(); 69 void setMainThreadNeedsLayerTextures();
72 70
73 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i f we are not visible. 71 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i f we are not visible.
74 void setNeedsForcedRedraw(); 72 void setNeedsForcedRedraw();
75 73
76 void beginFrameComplete(); 74 void beginFrameComplete(bool hasResourceUpdates);
77 void beginFrameAborted(); 75 void beginFrameAborted();
78 76
79 void setMaxFramesPending(int); 77 void setMaxFramesPending(int);
80 void setSwapBuffersCompleteSupported(bool); 78 void setSwapBuffersCompleteSupported(bool);
81 void didSwapBuffersComplete(); 79 void didSwapBuffersComplete();
82 80
83 void didLoseContext(); 81 void didLoseContext();
84 void didRecreateContext(); 82 void didRecreateContext();
85 83
86 bool commitPending() const { return m_stateMachine.commitPending(); } 84 bool commitPending() const { return m_stateMachine.commitPending(); }
87 bool redrawPending() const { return m_stateMachine.redrawPending(); } 85 bool redrawPending() const { return m_stateMachine.redrawPending(); }
88 86
89 void setTimebaseAndInterval(double timebase, double intervalSeconds); 87 void setTimebaseAndInterval(double timebase, double intervalSeconds);
90 88
91 // CCFrameRateControllerClient implementation 89 // CCFrameRateControllerClient implementation
92 virtual void vsyncTick() OVERRIDE; 90 virtual void vsyncTick() OVERRIDE;
93 91
92 void updateResourcesComplete();
93
94 private: 94 private:
95 CCScheduler(CCSchedulerClient*, PassOwnPtr<CCFrameRateController>); 95 CCScheduler(CCSchedulerClient*, PassOwnPtr<CCFrameRateController>);
96 96
97 void processScheduledActions(); 97 void processScheduledActions();
98 98
99 CCSchedulerClient* m_client; 99 CCSchedulerClient* m_client;
100 OwnPtr<CCFrameRateController> m_frameRateController; 100 OwnPtr<CCFrameRateController> m_frameRateController;
101 CCSchedulerStateMachine m_stateMachine; 101 CCSchedulerStateMachine m_stateMachine;
102 bool m_hasMoreResourceUpdates;
102 bool m_updateMoreResourcesPending; 103 bool m_updateMoreResourcesPending;
103 }; 104 };
104 105
105 } 106 }
106 107
107 #endif // CCScheduler_h 108 #endif // CCScheduler_h
OLDNEW
« no previous file with comments | « no previous file | cc/CCScheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698