| 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" |
| 11 #include "cc/animation_events.h" | 11 #include "cc/animation_events.h" |
| 12 #include "cc/animation_registrar.h" | 12 #include "cc/animation_registrar.h" |
| 13 #include "cc/cc_export.h" | 13 #include "cc/cc_export.h" |
| 14 #include "cc/input_handler.h" | 14 #include "cc/input_handler.h" |
| 15 #include "cc/output_surface_client.h" | 15 #include "cc/output_surface_client.h" |
| 16 #include "cc/render_pass.h" | 16 #include "cc/render_pass.h" |
| 17 #include "cc/render_pass_sink.h" | 17 #include "cc/render_pass_sink.h" |
| 18 #include "cc/renderer.h" | 18 #include "cc/renderer.h" |
| 19 #include "cc/tile_manager.h" | 19 #include "cc/tile_manager.h" |
| 20 #include "skia/ext/refptr.h" |
| 20 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
| 22 #include "third_party/skia/include/core/SkPicture.h" |
| 21 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
| 22 | 24 |
| 23 namespace cc { | 25 namespace cc { |
| 24 | 26 |
| 25 class CompletionEvent; | 27 class CompletionEvent; |
| 26 class CompositorFrameMetadata; | 28 class CompositorFrameMetadata; |
| 27 class DebugRectHistory; | 29 class DebugRectHistory; |
| 28 class FrameRateCounter; | 30 class FrameRateCounter; |
| 29 class LayerImpl; | 31 class LayerImpl; |
| 30 class LayerTreeHostImplTimeSourceAdapter; | 32 class LayerTreeHostImplTimeSourceAdapter; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 size_t renderPassListNext(size_t it) const { return it + 1; } | 295 size_t renderPassListNext(size_t it) const { return it + 1; } |
| 294 }; | 296 }; |
| 295 | 297 |
| 296 template<typename RenderPassCuller> | 298 template<typename RenderPassCuller> |
| 297 static void removeRenderPasses(RenderPassCuller, FrameData&); | 299 static void removeRenderPasses(RenderPassCuller, FrameData&); |
| 298 | 300 |
| 299 float totalPageScaleFactorForTesting() const { return m_pinchZoomViewport.to
talPageScaleFactor(); } | 301 float totalPageScaleFactorForTesting() const { return m_pinchZoomViewport.to
talPageScaleFactor(); } |
| 300 | 302 |
| 301 const PinchZoomViewport& pinchZoomViewport() const { return m_pinchZoomViewp
ort; } | 303 const PinchZoomViewport& pinchZoomViewport() const { return m_pinchZoomViewp
ort; } |
| 302 | 304 |
| 305 skia::RefPtr<SkPicture> capturePicture(); |
| 306 |
| 303 protected: | 307 protected: |
| 304 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*
); | 308 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*
); |
| 305 void activatePendingTree(); | 309 void activatePendingTree(); |
| 306 | 310 |
| 307 // Virtual for testing. | 311 // Virtual for testing. |
| 308 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo
ckTime); | 312 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo
ckTime); |
| 309 | 313 |
| 310 // Virtual for testing. | 314 // Virtual for testing. |
| 311 virtual base::TimeDelta lowFrequencyAnimationInterval() const; | 315 virtual base::TimeDelta lowFrequencyAnimationInterval() const; |
| 312 | 316 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 339 | 343 |
| 340 void sendDidLoseOutputSurfaceRecursive(LayerImpl*); | 344 void sendDidLoseOutputSurfaceRecursive(LayerImpl*); |
| 341 void clearRenderSurfaces(); | 345 void clearRenderSurfaces(); |
| 342 bool ensureRenderSurfaceLayerList(); | 346 bool ensureRenderSurfaceLayerList(); |
| 343 void clearCurrentlyScrollingLayer(); | 347 void clearCurrentlyScrollingLayer(); |
| 344 | 348 |
| 345 void animateScrollbarsRecursive(LayerImpl*, base::TimeTicks monotonicTime); | 349 void animateScrollbarsRecursive(LayerImpl*, base::TimeTicks monotonicTime); |
| 346 | 350 |
| 347 void dumpRenderSurfaces(std::string*, int indent, const LayerImpl*) const; | 351 void dumpRenderSurfaces(std::string*, int indent, const LayerImpl*) const; |
| 348 | 352 |
| 353 static LayerImpl* getNonCompositedContentLayerRecursive(LayerImpl* layer); |
| 354 |
| 349 scoped_ptr<OutputSurface> m_outputSurface; | 355 scoped_ptr<OutputSurface> m_outputSurface; |
| 350 scoped_ptr<ResourceProvider> m_resourceProvider; | 356 scoped_ptr<ResourceProvider> m_resourceProvider; |
| 351 scoped_ptr<Renderer> m_renderer; | 357 scoped_ptr<Renderer> m_renderer; |
| 352 scoped_ptr<TileManager> m_tileManager; | 358 scoped_ptr<TileManager> m_tileManager; |
| 353 | 359 |
| 354 scoped_ptr<LayerTreeImpl> m_pendingTree; | 360 scoped_ptr<LayerTreeImpl> m_pendingTree; |
| 355 scoped_ptr<LayerTreeImpl> m_activeTree; | 361 scoped_ptr<LayerTreeImpl> m_activeTree; |
| 356 | 362 |
| 357 bool m_scrollDeltaIsInViewportSpace; | 363 bool m_scrollDeltaIsInViewportSpace; |
| 358 LayerTreeSettings m_settings; | 364 LayerTreeSettings m_settings; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 size_t m_lastSentMemoryUseBytes; | 396 size_t m_lastSentMemoryUseBytes; |
| 391 | 397 |
| 392 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 398 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
| 393 | 399 |
| 394 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 400 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 395 }; | 401 }; |
| 396 | 402 |
| 397 } // namespace cc | 403 } // namespace cc |
| 398 | 404 |
| 399 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 405 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |