| 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 void readback(void* pixels, const gfx::Rect&); | 167 void readback(void* pixels, const gfx::Rect&); |
| 168 | 168 |
| 169 LayerTreeImpl* activeTree() { return m_activeTree.get(); } | 169 LayerTreeImpl* activeTree() { return m_activeTree.get(); } |
| 170 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } | 170 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } |
| 171 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } | 171 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } |
| 172 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } | 172 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } |
| 173 const LayerTreeImpl* recycleTree() const { return m_recycleTree.get(); } | 173 const LayerTreeImpl* recycleTree() const { return m_recycleTree.get(); } |
| 174 void createPendingTree(); | 174 void createPendingTree(); |
| 175 void checkForCompletedTileUploads(); | 175 void checkForCompletedTileUploads(); |
| 176 scoped_ptr<base::Value> activationStateAsValue() const; | |
| 177 virtual void activatePendingTreeIfNeeded(); | 176 virtual void activatePendingTreeIfNeeded(); |
| 178 | 177 |
| 179 // Shortcuts to layers on the active tree. | 178 // Shortcuts to layers on the active tree. |
| 180 LayerImpl* rootLayer() const; | 179 LayerImpl* rootLayer() const; |
| 181 LayerImpl* rootScrollLayer() const; | 180 LayerImpl* rootScrollLayer() const; |
| 182 LayerImpl* currentlyScrollingLayer() const; | 181 LayerImpl* currentlyScrollingLayer() const; |
| 183 | 182 |
| 184 bool visible() const { return m_visible; } | 183 bool visible() const { return m_visible; } |
| 185 void setVisible(bool); | 184 void setVisible(bool); |
| 186 | 185 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 252 |
| 254 skia::RefPtr<SkPicture> capturePicture(); | 253 skia::RefPtr<SkPicture> capturePicture(); |
| 255 | 254 |
| 256 bool pinchGestureActive() const { return m_pinchGestureActive; } | 255 bool pinchGestureActive() const { return m_pinchGestureActive; } |
| 257 | 256 |
| 258 void setTreePriority(TreePriority priority); | 257 void setTreePriority(TreePriority priority); |
| 259 | 258 |
| 260 void beginNextFrame(); | 259 void beginNextFrame(); |
| 261 base::TimeTicks currentFrameTime(); | 260 base::TimeTicks currentFrameTime(); |
| 262 | 261 |
| 262 scoped_ptr<base::Value> asValue() const; |
| 263 scoped_ptr<base::Value> activationStateAsValue() const; |
| 264 scoped_ptr<base::Value> frameStateAsValue() const; |
| 265 |
| 263 protected: | 266 protected: |
| 264 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*
); | 267 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*
); |
| 265 void activatePendingTree(); | 268 void activatePendingTree(); |
| 266 | 269 |
| 267 // Virtual for testing. | 270 // Virtual for testing. |
| 268 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo
ckTime); | 271 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo
ckTime); |
| 269 virtual void updateAnimationState(); | 272 virtual void updateAnimationState(); |
| 270 | 273 |
| 271 // Virtual for testing. | 274 // Virtual for testing. |
| 272 virtual base::TimeDelta lowFrequencyAnimationInterval() const; | 275 virtual base::TimeDelta lowFrequencyAnimationInterval() const; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 base::TimeTicks m_currentFrameTime; | 371 base::TimeTicks m_currentFrameTime; |
| 369 | 372 |
| 370 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 373 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
| 371 | 374 |
| 372 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 375 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 373 }; | 376 }; |
| 374 | 377 |
| 375 } // namespace cc | 378 } // namespace cc |
| 376 | 379 |
| 377 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 380 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |