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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // LayerTreeHost->Proxy callback interface. | 43 // LayerTreeHost->Proxy callback interface. |
44 class LayerTreeHostImplClient { | 44 class LayerTreeHostImplClient { |
45 public: | 45 public: |
46 virtual void didLoseOutputSurfaceOnImplThread() = 0; | 46 virtual void didLoseOutputSurfaceOnImplThread() = 0; |
47 virtual void onSwapBuffersCompleteOnImplThread() = 0; | 47 virtual void onSwapBuffersCompleteOnImplThread() = 0; |
48 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) = 0; | 48 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) = 0; |
49 virtual void onCanDrawStateChanged(bool canDraw) = 0; | 49 virtual void onCanDrawStateChanged(bool canDraw) = 0; |
50 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; | 50 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; |
51 virtual void setNeedsRedrawOnImplThread() = 0; | 51 virtual void setNeedsRedrawOnImplThread() = 0; |
| 52 virtual void didSwapUseIncompleteTextureOnImplThread() = 0; |
| 53 virtual void didUploadVisibleHighResolutionTileOnImplTread() = 0; |
52 virtual void setNeedsCommitOnImplThread() = 0; | 54 virtual void setNeedsCommitOnImplThread() = 0; |
53 virtual void setNeedsManageTilesOnImplThread() = 0; | 55 virtual void setNeedsManageTilesOnImplThread() = 0; |
54 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; | 56 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; |
55 // Returns true if resources were deleted by this call. | 57 // Returns true if resources were deleted by this call. |
56 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; | 58 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; |
57 virtual void sendManagedMemoryStats() = 0; | 59 virtual void sendManagedMemoryStats() = 0; |
58 }; | 60 }; |
59 | 61 |
60 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta
te | 62 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta
te |
61 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, | 63 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 virtual void onSwapBuffersComplete() OVERRIDE; | 125 virtual void onSwapBuffersComplete() OVERRIDE; |
124 virtual void setFullRootLayerDamage() OVERRIDE; | 126 virtual void setFullRootLayerDamage() OVERRIDE; |
125 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE; | 127 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE; |
126 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE; | 128 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE; |
127 virtual bool hasImplThread() const OVERRIDE; | 129 virtual bool hasImplThread() const OVERRIDE; |
128 virtual bool shouldClearRootRenderPass() const OVERRIDE; | 130 virtual bool shouldClearRootRenderPass() const OVERRIDE; |
129 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE
; | 131 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE
; |
130 | 132 |
131 // TileManagerClient implementation. | 133 // TileManagerClient implementation. |
132 virtual void ScheduleManageTiles() OVERRIDE; | 134 virtual void ScheduleManageTiles() OVERRIDE; |
| 135 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE; |
133 | 136 |
134 // OutputSurfaceClient implementation. | 137 // OutputSurfaceClient implementation. |
135 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; | 138 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; |
136 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE
RRIDE; | 139 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE
RRIDE; |
137 | 140 |
138 // Called from LayerTreeImpl. | 141 // Called from LayerTreeImpl. |
139 void OnCanDrawStateChangedForTree(LayerTreeImpl*); | 142 void OnCanDrawStateChangedForTree(LayerTreeImpl*); |
140 | 143 |
141 // Implementation | 144 // Implementation |
142 bool canDraw(); | 145 bool canDraw(); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 size_t m_lastSentMemoryUseBytes; | 350 size_t m_lastSentMemoryUseBytes; |
348 | 351 |
349 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 352 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
350 | 353 |
351 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 354 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
352 }; | 355 }; |
353 | 356 |
354 } // namespace cc | 357 } // namespace cc |
355 | 358 |
356 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 359 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |