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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // didDrawAllLayers must also be called, regardless of whether drawLayers is | 120 // didDrawAllLayers must also be called, regardless of whether drawLayers is |
121 // called between the two. | 121 // called between the two. |
122 virtual bool prepareToDraw(FrameData&); | 122 virtual bool prepareToDraw(FrameData&); |
123 virtual void drawLayers(FrameData&); | 123 virtual void drawLayers(FrameData&); |
124 // Must be called if and only if prepareToDraw was called. | 124 // Must be called if and only if prepareToDraw was called. |
125 void didDrawAllLayers(const FrameData&); | 125 void didDrawAllLayers(const FrameData&); |
126 | 126 |
127 // RendererClient implementation | 127 // RendererClient implementation |
128 virtual const gfx::Size& deviceViewportSize() const OVERRIDE; | 128 virtual const gfx::Size& deviceViewportSize() const OVERRIDE; |
129 virtual const LayerTreeSettings& settings() const OVERRIDE; | 129 virtual const LayerTreeSettings& settings() const OVERRIDE; |
130 virtual void didLoseOutputSurface() OVERRIDE; | |
131 virtual void onSwapBuffersComplete() OVERRIDE; | |
132 virtual void setFullRootLayerDamage() OVERRIDE; | 130 virtual void setFullRootLayerDamage() OVERRIDE; |
133 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE; | 131 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE; |
134 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE; | 132 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE; |
135 virtual bool hasImplThread() const OVERRIDE; | 133 virtual bool hasImplThread() const OVERRIDE; |
136 virtual bool shouldClearRootRenderPass() const OVERRIDE; | 134 virtual bool shouldClearRootRenderPass() const OVERRIDE; |
137 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE
; | 135 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE
; |
138 | 136 |
139 // TileManagerClient implementation. | 137 // TileManagerClient implementation. |
140 virtual void ScheduleManageTiles() OVERRIDE; | 138 virtual void ScheduleManageTiles() OVERRIDE; |
141 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE; | 139 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE; |
142 | 140 |
143 // OutputSurfaceClient implementation. | 141 // OutputSurfaceClient implementation. |
144 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; | 142 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE; |
145 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE
RRIDE; | 143 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE
RRIDE; |
| 144 virtual void OnSwapBuffersComplete() OVERRIDE; |
| 145 virtual void DidLoseOutputSurface() OVERRIDE; |
146 | 146 |
147 // Called from LayerTreeImpl. | 147 // Called from LayerTreeImpl. |
148 void OnCanDrawStateChangedForTree(LayerTreeImpl*); | 148 void OnCanDrawStateChangedForTree(LayerTreeImpl*); |
149 | 149 |
150 // Implementation | 150 // Implementation |
151 bool canDraw(); | 151 bool canDraw(); |
152 OutputSurface* outputSurface() const; | 152 OutputSurface* outputSurface() const; |
153 | 153 |
154 std::string layerTreeAsText() const; | 154 std::string layerTreeAsText() const; |
155 std::string layerTreeAsJson() const; | 155 std::string layerTreeAsJson() const; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 base::TimeTicks m_currentFrameTime; | 369 base::TimeTicks m_currentFrameTime; |
370 | 370 |
371 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 371 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
372 | 372 |
373 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 373 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
374 }; | 374 }; |
375 | 375 |
376 } // namespace cc | 376 } // namespace cc |
377 | 377 |
378 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 378 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |