| 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/cc_export.h" | 12 #include "cc/cc_export.h" |
| 13 #include "cc/input_handler.h" | 13 #include "cc/input_handler.h" |
| 14 #include "cc/layer_sorter.h" |
| 14 #include "cc/output_surface_client.h" | 15 #include "cc/output_surface_client.h" |
| 15 #include "cc/render_pass.h" | 16 #include "cc/render_pass.h" |
| 16 #include "cc/render_pass_sink.h" | 17 #include "cc/render_pass_sink.h" |
| 17 #include "cc/renderer.h" | 18 #include "cc/renderer.h" |
| 18 #include "cc/tile_manager.h" | 19 #include "cc/tile_manager.h" |
| 19 #include "third_party/skia/include/core/SkColor.h" | 20 #include "third_party/skia/include/core/SkColor.h" |
| 20 #include "ui/gfx/rect.h" | 21 #include "ui/gfx/rect.h" |
| 21 | 22 |
| 22 namespace cc { | 23 namespace cc { |
| 23 | 24 |
| 24 class CompletionEvent; | 25 class CompletionEvent; |
| 25 class DebugRectHistory; | 26 class DebugRectHistory; |
| 26 class FrameRateCounter; | 27 class FrameRateCounter; |
| 27 class LayerImpl; | 28 class LayerImpl; |
| 28 class LayerTreeHostImplTimeSourceAdapter; | 29 class LayerTreeHostImplTimeSourceAdapter; |
| 29 class LayerTreeImpl; | 30 class LayerTreeImpl; |
| 31 class PinchZoomScrollbarsManager; |
| 30 class PageScaleAnimation; | 32 class PageScaleAnimation; |
| 31 class RenderPassDrawQuad; | 33 class RenderPassDrawQuad; |
| 32 class ResourceProvider; | 34 class ResourceProvider; |
| 33 struct RendererCapabilities; | 35 struct RendererCapabilities; |
| 34 struct RenderingStats; | 36 struct RenderingStats; |
| 35 | 37 |
| 36 // LayerTreeHost->Proxy callback interface. | 38 // LayerTreeHost->Proxy callback interface. |
| 37 class LayerTreeHostImplClient { | 39 class LayerTreeHostImplClient { |
| 38 public: | 40 public: |
| 39 virtual void didLoseOutputSurfaceOnImplThread() = 0; | 41 virtual void didLoseOutputSurfaceOnImplThread() = 0; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 bool needsAnimateLayers() const { return m_needsAnimateLayers; } | 250 bool needsAnimateLayers() const { return m_needsAnimateLayers; } |
| 249 void setNeedsAnimateLayers() { m_needsAnimateLayers = true; } | 251 void setNeedsAnimateLayers() { m_needsAnimateLayers = true; } |
| 250 | 252 |
| 251 bool needsUpdateDrawProperties() const { return m_needsUpdateDrawProperties;
} | 253 bool needsUpdateDrawProperties() const { return m_needsUpdateDrawProperties;
} |
| 252 void setNeedsUpdateDrawProperties() { m_needsUpdateDrawProperties = true; } | 254 void setNeedsUpdateDrawProperties() { m_needsUpdateDrawProperties = true; } |
| 253 | 255 |
| 254 void setNeedsRedraw(); | 256 void setNeedsRedraw(); |
| 255 | 257 |
| 256 void renderingStats(RenderingStats*) const; | 258 void renderingStats(RenderingStats*) const; |
| 257 | 259 |
| 258 void updateRootScrollLayerImplTransform(); | 260 void updateImplTransformOnRootChildren(); |
| 259 | 261 |
| 260 void sendManagedMemoryStats( | 262 void sendManagedMemoryStats( |
| 261 size_t memoryVisibleBytes, | 263 size_t memoryVisibleBytes, |
| 262 size_t memoryVisibleAndNearbyBytes, | 264 size_t memoryVisibleAndNearbyBytes, |
| 263 size_t memoryUseBytes); | 265 size_t memoryUseBytes); |
| 264 | 266 |
| 265 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } | 267 FrameRateCounter* fpsCounter() const { return m_fpsCounter.get(); } |
| 266 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } | 268 DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get()
; } |
| 267 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } | 269 ResourceProvider* resourceProvider() const { return m_resourceProvider.get()
; } |
| 268 | 270 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 | 350 |
| 349 void dumpRenderSurfaces(std::string*, int indent, const LayerImpl*) const; | 351 void dumpRenderSurfaces(std::string*, int indent, const LayerImpl*) const; |
| 350 | 352 |
| 351 scoped_ptr<OutputSurface> m_outputSurface; | 353 scoped_ptr<OutputSurface> m_outputSurface; |
| 352 scoped_ptr<ResourceProvider> m_resourceProvider; | 354 scoped_ptr<ResourceProvider> m_resourceProvider; |
| 353 scoped_ptr<Renderer> m_renderer; | 355 scoped_ptr<Renderer> m_renderer; |
| 354 scoped_ptr<TileManager> m_tileManager; | 356 scoped_ptr<TileManager> m_tileManager; |
| 355 | 357 |
| 356 scoped_ptr<LayerTreeImpl> m_activeTree; | 358 scoped_ptr<LayerTreeImpl> m_activeTree; |
| 357 | 359 |
| 360 scoped_ptr<LayerImpl> m_rootLayerImpl; |
| 361 LayerImpl* m_rootScrollLayerImpl; |
| 362 LayerImpl* m_currentlyScrollingLayerImpl; |
| 363 int m_scrollingLayerIdFromPreviousTree; |
| 358 bool m_scrollDeltaIsInViewportSpace; | 364 bool m_scrollDeltaIsInViewportSpace; |
| 359 LayerTreeSettings m_settings; | 365 LayerTreeSettings m_settings; |
| 360 LayerTreeDebugState m_debugState; | 366 LayerTreeDebugState m_debugState; |
| 361 gfx::Size m_layoutViewportSize; | 367 gfx::Size m_layoutViewportSize; |
| 362 gfx::Size m_deviceViewportSize; | 368 gfx::Size m_deviceViewportSize; |
| 363 float m_deviceScaleFactor; | 369 float m_deviceScaleFactor; |
| 364 bool m_visible; | 370 bool m_visible; |
| 365 bool m_contentsTexturesPurged; | 371 bool m_contentsTexturesPurged; |
| 366 ManagedMemoryPolicy m_managedMemoryPolicy; | 372 ManagedMemoryPolicy m_managedMemoryPolicy; |
| 367 | 373 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 398 size_t m_lastSentMemoryVisibleBytes; | 404 size_t m_lastSentMemoryVisibleBytes; |
| 399 size_t m_lastSentMemoryVisibleAndNearbyBytes; | 405 size_t m_lastSentMemoryVisibleAndNearbyBytes; |
| 400 size_t m_lastSentMemoryUseBytes; | 406 size_t m_lastSentMemoryUseBytes; |
| 401 | 407 |
| 402 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 408 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 403 }; | 409 }; |
| 404 | 410 |
| 405 } // namespace cc | 411 } // namespace cc |
| 406 | 412 |
| 407 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 413 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |