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_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_LAYER_TREE_HOST_IMPL_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 29 matching lines...) Expand all Loading... | |
40 | 40 |
41 // LayerTreeHost->Proxy callback interface. | 41 // LayerTreeHost->Proxy callback interface. |
42 class LayerTreeHostImplClient { | 42 class LayerTreeHostImplClient { |
43 public: | 43 public: |
44 virtual void didLoseOutputSurfaceOnImplThread() = 0; | 44 virtual void didLoseOutputSurfaceOnImplThread() = 0; |
45 virtual void onSwapBuffersCompleteOnImplThread() = 0; | 45 virtual void onSwapBuffersCompleteOnImplThread() = 0; |
46 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) = 0; | 46 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) = 0; |
47 virtual void onCanDrawStateChanged(bool canDraw) = 0; | 47 virtual void onCanDrawStateChanged(bool canDraw) = 0; |
48 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; | 48 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; |
49 virtual void setNeedsRedrawOnImplThread() = 0; | 49 virtual void setNeedsRedrawOnImplThread() = 0; |
50 virtual void setNeedsRedrawOnVisibleTextureUploadOnImplThread() = 0; | |
nduca
2013/01/16 04:09:47
onVisibleHighResolutionTileSomethingOrOther? That
brianderson
2013/01/16 20:12:22
I'll move the decision to draw to the proxy.
| |
50 virtual void setNeedsCommitOnImplThread() = 0; | 51 virtual void setNeedsCommitOnImplThread() = 0; |
51 virtual void setNeedsManageTilesOnImplThread() = 0; | 52 virtual void setNeedsManageTilesOnImplThread() = 0; |
52 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) = 0; | 53 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) = 0; |
53 // Returns true if resources were deleted by this call. | 54 // Returns true if resources were deleted by this call. |
54 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) = 0; | 55 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) = 0; |
55 virtual void sendManagedMemoryStats() = 0; | 56 virtual void sendManagedMemoryStats() = 0; |
56 }; | 57 }; |
57 | 58 |
58 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta te | 59 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta te |
59 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, | 60 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 virtual void onSwapBuffersComplete() OVERRIDE; | 116 virtual void onSwapBuffersComplete() OVERRIDE; |
116 virtual void setFullRootLayerDamage() OVERRIDE; | 117 virtual void setFullRootLayerDamage() OVERRIDE; |
117 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE; | 118 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE; |
118 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE; | 119 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE; |
119 virtual bool hasImplThread() const OVERRIDE; | 120 virtual bool hasImplThread() const OVERRIDE; |
120 virtual bool shouldClearRootRenderPass() const OVERRIDE; | 121 virtual bool shouldClearRootRenderPass() const OVERRIDE; |
121 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE ; | 122 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE ; |
122 | 123 |
123 // TileManagerClient implementation. | 124 // TileManagerClient implementation. |
124 virtual void ScheduleManageTiles() OVERRIDE; | 125 virtual void ScheduleManageTiles() OVERRIDE; |
126 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE; | |
125 | 127 |
126 // OutputSurfaceClient implementation. | 128 // OutputSurfaceClient implementation. |
127 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE; | 129 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE; |
128 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE RRIDE; | 130 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE RRIDE; |
129 | 131 |
130 // Called from LayerTreeImpl. | 132 // Called from LayerTreeImpl. |
131 void OnCanDrawStateChangedForTree(LayerTreeImpl*); | 133 void OnCanDrawStateChangedForTree(LayerTreeImpl*); |
132 | 134 |
133 // Implementation | 135 // Implementation |
134 bool canDraw(); | 136 bool canDraw(); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 size_t m_lastSentMemoryUseBytes; | 342 size_t m_lastSentMemoryUseBytes; |
341 | 343 |
342 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 344 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
343 | 345 |
344 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 346 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
345 }; | 347 }; |
346 | 348 |
347 } // namespace cc | 349 } // namespace cc |
348 | 350 |
349 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 351 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |