| OLD | NEW |
| 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_H_ | 5 #ifndef CC_SCHEDULER_H_ |
| 6 #define CC_SCHEDULER_H_ | 6 #define CC_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 bool didDraw; | 32 bool didDraw; |
| 33 bool didSwap; | 33 bool didSwap; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 class SchedulerClient { | 36 class SchedulerClient { |
| 37 public: | 37 public: |
| 38 virtual void scheduledActionBeginFrame() = 0; | 38 virtual void scheduledActionBeginFrame() = 0; |
| 39 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() = 0; | 39 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl
e() = 0; |
| 40 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
= 0; | 40 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
= 0; |
| 41 virtual void scheduledActionCheckForNewVisibleTextures() = 0; |
| 41 virtual void scheduledActionCommit() = 0; | 42 virtual void scheduledActionCommit() = 0; |
| 42 virtual void scheduledActionActivatePendingTreeIfNeeded() = 0; | 43 virtual void scheduledActionActivatePendingTreeIfNeeded() = 0; |
| 43 virtual void scheduledActionBeginContextRecreation() = 0; | 44 virtual void scheduledActionBeginContextRecreation() = 0; |
| 44 virtual void scheduledActionAcquireLayerTexturesForMainThread() = 0; | 45 virtual void scheduledActionAcquireLayerTexturesForMainThread() = 0; |
| 45 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) = 0; | 46 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) = 0; |
| 46 | 47 |
| 47 protected: | 48 protected: |
| 48 virtual ~SchedulerClient() { } | 49 virtual ~SchedulerClient() { } |
| 49 }; | 50 }; |
| 50 | 51 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 64 void setVisible(bool); | 65 void setVisible(bool); |
| 65 void setCanDraw(bool); | 66 void setCanDraw(bool); |
| 66 void setHasPendingTree(bool); | 67 void setHasPendingTree(bool); |
| 67 | 68 |
| 68 void setNeedsCommit(); | 69 void setNeedsCommit(); |
| 69 | 70 |
| 70 // Like setNeedsCommit(), but ensures a commit will definitely happen even i
f we are not visible. | 71 // Like setNeedsCommit(), but ensures a commit will definitely happen even i
f we are not visible. |
| 71 void setNeedsForcedCommit(); | 72 void setNeedsForcedCommit(); |
| 72 | 73 |
| 73 void setNeedsRedraw(); | 74 void setNeedsRedraw(); |
| 75 void setNeedsRedrawOnVisibleTextureUpload(); |
| 74 | 76 |
| 75 void setMainThreadNeedsLayerTextures(); | 77 void setMainThreadNeedsLayerTextures(); |
| 76 | 78 |
| 77 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. | 79 // Like setNeedsRedraw(), but ensures the draw will definitely happen even i
f we are not visible. |
| 78 void setNeedsForcedRedraw(); | 80 void setNeedsForcedRedraw(); |
| 79 | 81 |
| 80 void beginFrameComplete(); | 82 void beginFrameComplete(); |
| 81 void beginFrameAborted(); | 83 void beginFrameAborted(); |
| 82 | 84 |
| 83 void setMaxFramesPending(int); | 85 void setMaxFramesPending(int); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 108 const LayerTreeSettings& m_layerTreeSettings; | 110 const LayerTreeSettings& m_layerTreeSettings; |
| 109 SchedulerStateMachine m_stateMachine; | 111 SchedulerStateMachine m_stateMachine; |
| 110 bool m_insideProcessScheduledActions; | 112 bool m_insideProcessScheduledActions; |
| 111 | 113 |
| 112 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 114 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 } // namespace cc | 117 } // namespace cc |
| 116 | 118 |
| 117 #endif // CC_SCHEDULER_H_ | 119 #endif // CC_SCHEDULER_H_ |
| OLD | NEW |