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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 virtual void activatePendingTreeIfNeeded(); | 167 virtual void activatePendingTreeIfNeeded(); |
168 | 168 |
169 // Shortcuts to layers on the active tree. | 169 // Shortcuts to layers on the active tree. |
170 LayerImpl* rootLayer() const; | 170 LayerImpl* rootLayer() const; |
171 LayerImpl* rootScrollLayer() 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; } | |
178 void setContentsTexturesPurged(); | |
179 void resetContentsTexturesPurged(); | |
180 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } | 177 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } |
181 | 178 |
182 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); | 179 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); |
183 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } | 180 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } |
184 | 181 |
185 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 182 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
186 void setDeviceScaleFactor(float); | 183 void setDeviceScaleFactor(float); |
187 | 184 |
188 float pageScaleFactor() const; | 185 float pageScaleFactor() const; |
189 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
ctor, float maxPageScaleFactor); | 186 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
ctor, float maxPageScaleFactor); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 scoped_ptr<LayerTreeImpl> m_pendingTree; | 310 scoped_ptr<LayerTreeImpl> m_pendingTree; |
314 scoped_ptr<LayerTreeImpl> m_activeTree; | 311 scoped_ptr<LayerTreeImpl> m_activeTree; |
315 | 312 |
316 bool m_scrollDeltaIsInViewportSpace; | 313 bool m_scrollDeltaIsInViewportSpace; |
317 LayerTreeSettings m_settings; | 314 LayerTreeSettings m_settings; |
318 LayerTreeDebugState m_debugState; | 315 LayerTreeDebugState m_debugState; |
319 gfx::Size m_layoutViewportSize; | 316 gfx::Size m_layoutViewportSize; |
320 gfx::Size m_deviceViewportSize; | 317 gfx::Size m_deviceViewportSize; |
321 float m_deviceScaleFactor; | 318 float m_deviceScaleFactor; |
322 bool m_visible; | 319 bool m_visible; |
323 bool m_contentsTexturesPurged; | |
324 ManagedMemoryPolicy m_managedMemoryPolicy; | 320 ManagedMemoryPolicy m_managedMemoryPolicy; |
325 | 321 |
326 bool m_needsUpdateDrawProperties; | 322 bool m_needsUpdateDrawProperties; |
327 bool m_pinchGestureActive; | 323 bool m_pinchGestureActive; |
328 gfx::Point m_previousPinchAnchor; | 324 gfx::Point m_previousPinchAnchor; |
329 | 325 |
330 scoped_ptr<TopControlsManager> m_topControlsManager; | 326 scoped_ptr<TopControlsManager> m_topControlsManager; |
331 | 327 |
332 scoped_ptr<PageScaleAnimation> m_pageScaleAnimation; | 328 scoped_ptr<PageScaleAnimation> m_pageScaleAnimation; |
333 | 329 |
(...skipping 18 matching lines...) Expand all Loading... |
352 size_t m_lastSentMemoryUseBytes; | 348 size_t m_lastSentMemoryUseBytes; |
353 | 349 |
354 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 350 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
355 | 351 |
356 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 352 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
357 }; | 353 }; |
358 | 354 |
359 } // namespace cc | 355 } // namespace cc |
360 | 356 |
361 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 357 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |