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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual bool scrollBy(const gfx::Point&, const gfx::Vector2d&) OVERRIDE; | 75 virtual bool scrollBy(const gfx::Point&, const gfx::Vector2d&) OVERRIDE; |
76 virtual void scrollEnd() OVERRIDE; | 76 virtual void scrollEnd() OVERRIDE; |
77 virtual void pinchGestureBegin() OVERRIDE; | 77 virtual void pinchGestureBegin() OVERRIDE; |
78 virtual void pinchGestureUpdate(float, gfx::Point) OVERRIDE; | 78 virtual void pinchGestureUpdate(float, gfx::Point) OVERRIDE; |
79 virtual void pinchGestureEnd() OVERRIDE; | 79 virtual void pinchGestureEnd() OVERRIDE; |
80 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool anchor
Point, float pageScale, base::TimeTicks startTime, base::TimeDelta duration) OVE
RRIDE; | 80 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool anchor
Point, float pageScale, base::TimeTicks startTime, base::TimeDelta duration) OVE
RRIDE; |
81 virtual void scheduleAnimation() OVERRIDE; | 81 virtual void scheduleAnimation() OVERRIDE; |
82 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; | 82 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; |
83 | 83 |
84 // TopControlsManagerClient implementation. | 84 // TopControlsManagerClient implementation. |
85 virtual LayerTreeImpl* activeTree() OVERRIDE; | |
86 virtual void setNeedsUpdateDrawProperties() OVERRIDE; | 85 virtual void setNeedsUpdateDrawProperties() OVERRIDE; |
87 virtual void setNeedsRedraw() OVERRIDE; | 86 virtual void setNeedsRedraw() OVERRIDE; |
| 87 virtual LayerImpl* rootScrollLayer() const OVERRIDE; |
88 | 88 |
89 struct CC_EXPORT FrameData : public RenderPassSink { | 89 struct CC_EXPORT FrameData : public RenderPassSink { |
90 FrameData(); | 90 FrameData(); |
91 ~FrameData(); | 91 ~FrameData(); |
92 | 92 |
93 std::vector<gfx::Rect> occludingScreenSpaceRects; | 93 std::vector<gfx::Rect> occludingScreenSpaceRects; |
94 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; | 94 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; |
95 RenderPassList renderPasses; | 95 RenderPassList renderPasses; |
96 RenderPassIdHashMap renderPassesById; | 96 RenderPassIdHashMap renderPassesById; |
97 const LayerList* renderSurfaceLayerList; | 97 const LayerList* renderSurfaceLayerList; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bool initializeRenderer(scoped_ptr<OutputSurface>); | 152 bool initializeRenderer(scoped_ptr<OutputSurface>); |
153 bool isContextLost(); | 153 bool isContextLost(); |
154 TileManager* tileManager() { return m_tileManager.get(); } | 154 TileManager* tileManager() { return m_tileManager.get(); } |
155 Renderer* renderer() { return m_renderer.get(); } | 155 Renderer* renderer() { return m_renderer.get(); } |
156 const RendererCapabilities& rendererCapabilities() const; | 156 const RendererCapabilities& rendererCapabilities() const; |
157 | 157 |
158 bool swapBuffers(); | 158 bool swapBuffers(); |
159 | 159 |
160 void readback(void* pixels, const gfx::Rect&); | 160 void readback(void* pixels, const gfx::Rect&); |
161 | 161 |
| 162 LayerTreeImpl* activeTree() { return m_activeTree.get(); } |
162 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } | 163 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } |
163 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } | 164 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } |
164 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } | 165 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } |
165 void createPendingTree(); | 166 void createPendingTree(); |
166 void checkForCompletedSetPixels(); | 167 void checkForCompletedSetPixels(); |
167 virtual void activatePendingTreeIfNeeded(); | 168 virtual void activatePendingTreeIfNeeded(); |
168 | 169 |
169 // Shortcuts to layers on the active tree. | 170 // Shortcuts to layers on the active tree. |
170 LayerImpl* rootLayer() const; | 171 LayerImpl* rootLayer() const; |
171 LayerImpl* rootScrollLayer() const; | |
172 LayerImpl* currentlyScrollingLayer() const; | 172 LayerImpl* currentlyScrollingLayer() const; |
173 | 173 |
174 bool visible() const { return m_visible; } | 174 bool visible() const { return m_visible; } |
175 void setVisible(bool); | 175 void setVisible(bool); |
176 | 176 |
177 bool contentsTexturesPurged() const { return m_contentsTexturesPurged; } | 177 bool contentsTexturesPurged() const { return m_contentsTexturesPurged; } |
178 void setContentsTexturesPurged(); | 178 void setContentsTexturesPurged(); |
179 void resetContentsTexturesPurged(); | 179 void resetContentsTexturesPurged(); |
180 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } | 180 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } |
181 | 181 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 size_t m_lastSentMemoryUseBytes; | 352 size_t m_lastSentMemoryUseBytes; |
353 | 353 |
354 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 354 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
355 | 355 |
356 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 356 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
357 }; | 357 }; |
358 | 358 |
359 } // namespace cc | 359 } // namespace cc |
360 | 360 |
361 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 361 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |