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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 LayerTreeImpl* activeTree() { return m_activeTree.get(); } | 167 LayerTreeImpl* activeTree() { return m_activeTree.get(); } |
168 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } | 168 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } |
169 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } | 169 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } |
170 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } | 170 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } |
171 const LayerTreeImpl* recycleTree() const { return m_recycleTree.get(); } | 171 const LayerTreeImpl* recycleTree() const { return m_recycleTree.get(); } |
172 void createPendingTree(); | 172 void createPendingTree(); |
173 void checkForCompletedTileUploads(); | 173 void checkForCompletedTileUploads(); |
174 scoped_ptr<base::Value> activationStateAsValue() const; | 174 scoped_ptr<base::Value> activationStateAsValue() const; |
175 virtual void activatePendingTreeIfNeeded(); | 175 virtual void activatePendingTreeIfNeeded(); |
| 176 void setNeedsFullTreeSync(bool needs) { m_needsFullTreeSync = needs; } |
176 | 177 |
177 // Shortcuts to layers on the active tree. | 178 // Shortcuts to layers on the active tree. |
178 LayerImpl* rootLayer() const; | 179 LayerImpl* rootLayer() const; |
179 LayerImpl* rootScrollLayer() const; | 180 LayerImpl* rootScrollLayer() const; |
180 LayerImpl* currentlyScrollingLayer() const; | 181 LayerImpl* currentlyScrollingLayer() const; |
181 | 182 |
182 bool visible() const { return m_visible; } | 183 bool visible() const { return m_visible; } |
183 void setVisible(bool); | 184 void setVisible(bool); |
184 | 185 |
185 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } | 186 size_t memoryAllocationLimitBytes() const { return m_managedMemoryPolicy.byt
esLimitWhenVisible; } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 scoped_ptr<LayerTreeImpl> m_activeTree; | 314 scoped_ptr<LayerTreeImpl> m_activeTree; |
314 | 315 |
315 // In impl-side painting mode, tree with possibly incomplete rasterized | 316 // In impl-side painting mode, tree with possibly incomplete rasterized |
316 // content. May be promoted to active by activatePendingTreeIfNeeded(). | 317 // content. May be promoted to active by activatePendingTreeIfNeeded(). |
317 scoped_ptr<LayerTreeImpl> m_pendingTree; | 318 scoped_ptr<LayerTreeImpl> m_pendingTree; |
318 | 319 |
319 // In impl-side painting mode, inert tree with layers that can be recycled | 320 // In impl-side painting mode, inert tree with layers that can be recycled |
320 // by the next sync from the main thread. | 321 // by the next sync from the main thread. |
321 scoped_ptr<LayerTreeImpl> m_recycleTree; | 322 scoped_ptr<LayerTreeImpl> m_recycleTree; |
322 | 323 |
| 324 // In impl-side painting mode, this is true when the main thread tree |
| 325 // required a full sync into the pending tree, and so the structure of the |
| 326 // pending tree may no longer match the structure of the active tree. A |
| 327 // full sync should be used when activating the pending tree. |
| 328 bool m_needsFullTreeSync; |
| 329 |
323 bool m_scrollDeltaIsInViewportSpace; | 330 bool m_scrollDeltaIsInViewportSpace; |
324 LayerTreeSettings m_settings; | 331 LayerTreeSettings m_settings; |
325 LayerTreeDebugState m_debugState; | 332 LayerTreeDebugState m_debugState; |
326 gfx::Size m_layoutViewportSize; | 333 gfx::Size m_layoutViewportSize; |
327 gfx::Size m_deviceViewportSize; | 334 gfx::Size m_deviceViewportSize; |
328 float m_deviceScaleFactor; | 335 float m_deviceScaleFactor; |
329 bool m_visible; | 336 bool m_visible; |
330 ManagedMemoryPolicy m_managedMemoryPolicy; | 337 ManagedMemoryPolicy m_managedMemoryPolicy; |
331 | 338 |
332 bool m_pinchGestureActive; | 339 bool m_pinchGestureActive; |
(...skipping 24 matching lines...) Expand all Loading... |
357 base::TimeTicks m_currentFrameTime; | 364 base::TimeTicks m_currentFrameTime; |
358 | 365 |
359 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 366 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
360 | 367 |
361 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 368 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
362 }; | 369 }; |
363 | 370 |
364 } // namespace cc | 371 } // namespace cc |
365 | 372 |
366 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 373 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |