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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 LayerImpl* rootLayer() const; | 179 LayerImpl* rootLayer() const; |
180 LayerImpl* rootScrollLayer() const; | 180 LayerImpl* rootScrollLayer() const; |
181 LayerImpl* currentlyScrollingLayer() const; | 181 LayerImpl* currentlyScrollingLayer() const; |
182 | 182 |
183 bool visible() const { return m_visible; } | 183 bool visible() const { return m_visible; } |
184 void setVisible(bool); | 184 void setVisible(bool); |
185 | 185 |
186 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } | 186 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } |
187 | 187 |
188 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); | 188 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d
eviceViewportSize); |
189 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } | 189 const gfx::Size& layoutViewportSize() const; |
190 | 190 |
191 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 191 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
192 void setDeviceScaleFactor(float); | 192 void setDeviceScaleFactor(float); |
193 | 193 |
194 scoped_ptr<ScrollAndScaleSet> processScrollDeltas(); | 194 scoped_ptr<ScrollAndScaleSet> processScrollDeltas(); |
195 | 195 |
196 void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnchor, flo
at scale, base::TimeDelta duration); | 196 void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnchor, flo
at scale, base::TimeDelta duration); |
197 | 197 |
198 bool needsAnimateLayers() const { return !m_animationRegistrar->active_anima
tion_controllers().empty(); } | 198 bool needsAnimateLayers() const { return !m_animationRegistrar->active_anima
tion_controllers().empty(); } |
199 | 199 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 // In impl-side painting mode, inert tree with layers that can be recycled | 326 // In impl-side painting mode, inert tree with layers that can be recycled |
327 // by the next sync from the main thread. | 327 // by the next sync from the main thread. |
328 scoped_ptr<LayerTreeImpl> m_recycleTree; | 328 scoped_ptr<LayerTreeImpl> m_recycleTree; |
329 | 329 |
330 bool m_didLockScrollingLayer; | 330 bool m_didLockScrollingLayer; |
331 bool m_shouldBubbleScrolls; | 331 bool m_shouldBubbleScrolls; |
332 bool m_wheelScrolling; | 332 bool m_wheelScrolling; |
333 LayerTreeSettings m_settings; | 333 LayerTreeSettings m_settings; |
334 LayerTreeDebugState m_debugState; | 334 LayerTreeDebugState m_debugState; |
335 gfx::Size m_layoutViewportSize; | |
336 gfx::Size m_deviceViewportSize; | |
337 float m_deviceScaleFactor; | 335 float m_deviceScaleFactor; |
338 bool m_visible; | 336 bool m_visible; |
339 ManagedMemoryPolicy m_managedMemoryPolicy; | 337 ManagedMemoryPolicy m_managedMemoryPolicy; |
340 | 338 |
341 bool m_pinchGestureActive; | 339 bool m_pinchGestureActive; |
342 gfx::Point m_previousPinchAnchor; | 340 gfx::Point m_previousPinchAnchor; |
343 | 341 |
344 // This is set by animateLayers() and used by updateAnimationState() | 342 // This is set by animateLayers() and used by updateAnimationState() |
345 // when sending animation events to the main thread. | 343 // when sending animation events to the main thread. |
346 base::Time m_lastAnimationTime; | 344 base::Time m_lastAnimationTime; |
(...skipping 24 matching lines...) Expand all Loading... |
371 base::TimeTicks m_currentFrameTime; | 369 base::TimeTicks m_currentFrameTime; |
372 | 370 |
373 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 371 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
374 | 372 |
375 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 373 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
376 }; | 374 }; |
377 | 375 |
378 } // namespace cc | 376 } // namespace cc |
379 | 377 |
380 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 378 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |