| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 SkColor backgroundColor() const { return m_backgroundColor; } | 238 SkColor backgroundColor() const { return m_backgroundColor; } |
| 239 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } | 239 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } |
| 240 | 240 |
| 241 bool hasTransparentBackground() const { return m_hasTransparentBackground; } | 241 bool hasTransparentBackground() const { return m_hasTransparentBackground; } |
| 242 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
und = transparent; } | 242 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
und = transparent; } |
| 243 | 243 |
| 244 bool needsAnimateLayers() const { return m_needsAnimateLayers; } | 244 bool needsAnimateLayers() const { return m_needsAnimateLayers; } |
| 245 void setNeedsAnimateLayers() { m_needsAnimateLayers = true; } | 245 void setNeedsAnimateLayers() { m_needsAnimateLayers = true; } |
| 246 | 246 |
| 247 bool needsUpdateLayers() const { return m_needsUpdateLayers; } |
| 248 void setNeedsUpdateLayers() { m_needsUpdateLayers = true; } |
| 249 |
| 247 void setNeedsRedraw(); | 250 void setNeedsRedraw(); |
| 248 | 251 |
| 249 void renderingStats(RenderingStats*) const; | 252 void renderingStats(RenderingStats*) const; |
| 250 | 253 |
| 251 void updateRootScrollLayerImplTransform(); | 254 void updateRootScrollLayerImplTransform(); |
| 252 | 255 |
| 253 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } | 256 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } |
| 254 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } | 257 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } |
| 255 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } | 258 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } |
| 256 Proxy* proxy() const { return m_proxy; } | 259 Proxy* proxy() const { return m_proxy; } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 287 | 290 |
| 288 template<typename RenderPassCuller> | 291 template<typename RenderPassCuller> |
| 289 static void removeRenderPasses(RenderPassCuller, FrameData&); | 292 static void removeRenderPasses(RenderPassCuller, FrameData&); |
| 290 | 293 |
| 291 protected: | 294 protected: |
| 292 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*
); | 295 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*
); |
| 293 | 296 |
| 294 void animatePageScale(base::TimeTicks monotonicTime); | 297 void animatePageScale(base::TimeTicks monotonicTime); |
| 295 void animateScrollbars(base::TimeTicks monotonicTime); | 298 void animateScrollbars(base::TimeTicks monotonicTime); |
| 296 | 299 |
| 300 void updateLayers(); |
| 301 |
| 297 // Exposed for testing. | 302 // Exposed for testing. |
| 298 void calculateRenderSurfaceLayerList(LayerList&); | 303 void calculateRenderSurfaceLayerList(LayerList&); |
| 299 | 304 |
| 300 // Virtual for testing. | 305 // Virtual for testing. |
| 301 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo
ckTime); | 306 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo
ckTime); |
| 302 | 307 |
| 303 // Virtual for testing. | 308 // Virtual for testing. |
| 304 virtual base::TimeDelta lowFrequencyAnimationInterval() const; | 309 virtual base::TimeDelta lowFrequencyAnimationInterval() const; |
| 305 | 310 |
| 306 LayerTreeHostImplClient* m_client; | 311 LayerTreeHostImplClient* m_client; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 float m_deviceScaleFactor; | 355 float m_deviceScaleFactor; |
| 351 bool m_visible; | 356 bool m_visible; |
| 352 bool m_contentsTexturesPurged; | 357 bool m_contentsTexturesPurged; |
| 353 ManagedMemoryPolicy m_managedMemoryPolicy; | 358 ManagedMemoryPolicy m_managedMemoryPolicy; |
| 354 | 359 |
| 355 SkColor m_backgroundColor; | 360 SkColor m_backgroundColor; |
| 356 bool m_hasTransparentBackground; | 361 bool m_hasTransparentBackground; |
| 357 | 362 |
| 358 // If this is true, it is necessary to traverse the layer tree ticking the a
nimators. | 363 // If this is true, it is necessary to traverse the layer tree ticking the a
nimators. |
| 359 bool m_needsAnimateLayers; | 364 bool m_needsAnimateLayers; |
| 365 bool m_needsUpdateLayers; |
| 360 bool m_pinchGestureActive; | 366 bool m_pinchGestureActive; |
| 361 gfx::Point m_previousPinchAnchor; | 367 gfx::Point m_previousPinchAnchor; |
| 362 | 368 |
| 363 scoped_ptr<PageScaleAnimation> m_pageScaleAnimation; | 369 scoped_ptr<PageScaleAnimation> m_pageScaleAnimation; |
| 364 | 370 |
| 365 // This is used for ticking animations slowly when hidden. | 371 // This is used for ticking animations slowly when hidden. |
| 366 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter; | 372 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter; |
| 367 | 373 |
| 368 LayerSorter m_layerSorter; | 374 LayerSorter m_layerSorter; |
| 369 | 375 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 380 size_t m_numMainThreadScrolls; | 386 size_t m_numMainThreadScrolls; |
| 381 | 387 |
| 382 size_t m_cumulativeNumLayersDrawn; | 388 size_t m_cumulativeNumLayersDrawn; |
| 383 | 389 |
| 384 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 390 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 385 }; | 391 }; |
| 386 | 392 |
| 387 } // namespace cc | 393 } // namespace cc |
| 388 | 394 |
| 389 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 395 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |