| 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_TREES_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class EvictionTilePriorityQueue; | 44 class EvictionTilePriorityQueue; |
| 45 class FrameRateCounter; | 45 class FrameRateCounter; |
| 46 class LayerImpl; | 46 class LayerImpl; |
| 47 class LayerTreeImpl; | 47 class LayerTreeImpl; |
| 48 class MemoryHistory; | 48 class MemoryHistory; |
| 49 class PageScaleAnimation; | 49 class PageScaleAnimation; |
| 50 class PaintTimeCounter; | 50 class PaintTimeCounter; |
| 51 class PictureLayerImpl; | 51 class PictureLayerImpl; |
| 52 class RasterTilePriorityQueue; | 52 class RasterTilePriorityQueue; |
| 53 class RasterWorkerPool; | 53 class RasterWorkerPool; |
| 54 class GpuRasterizer; |
| 54 class RenderPassDrawQuad; | 55 class RenderPassDrawQuad; |
| 55 class RenderingStatsInstrumentation; | 56 class RenderingStatsInstrumentation; |
| 56 class ResourcePool; | 57 class ResourcePool; |
| 57 class ScrollElasticityHelper; | 58 class ScrollElasticityHelper; |
| 58 class ScrollbarLayerImplBase; | 59 class ScrollbarLayerImplBase; |
| 59 class TextureMailboxDeleter; | 60 class TextureMailboxDeleter; |
| 60 class TopControlsManager; | 61 class TopControlsManager; |
| 61 class UIResourceBitmap; | 62 class UIResourceBitmap; |
| 62 class UIResourceRequest; | 63 class UIResourceRequest; |
| 63 struct RendererCapabilitiesImpl; | 64 struct RendererCapabilitiesImpl; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 virtual void BeginMainFrameAborted(bool did_handle); | 185 virtual void BeginMainFrameAborted(bool did_handle); |
| 185 virtual void BeginCommit(); | 186 virtual void BeginCommit(); |
| 186 virtual void CommitComplete(); | 187 virtual void CommitComplete(); |
| 187 virtual void Animate(base::TimeTicks monotonic_time); | 188 virtual void Animate(base::TimeTicks monotonic_time); |
| 188 virtual void UpdateAnimationState(bool start_ready_animations); | 189 virtual void UpdateAnimationState(bool start_ready_animations); |
| 189 void ActivateAnimations(); | 190 void ActivateAnimations(); |
| 190 void MainThreadHasStoppedFlinging(); | 191 void MainThreadHasStoppedFlinging(); |
| 191 void DidAnimateScrollOffset(); | 192 void DidAnimateScrollOffset(); |
| 192 void SetViewportDamage(const gfx::Rect& damage_rect); | 193 void SetViewportDamage(const gfx::Rect& damage_rect); |
| 193 | 194 |
| 195 virtual void RasterizeTiles(); |
| 194 virtual void ManageTiles(); | 196 virtual void ManageTiles(); |
| 195 | 197 |
| 196 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we | 198 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we |
| 197 // should try to avoid displaying the frame. If PrepareToDraw is called, | 199 // should try to avoid displaying the frame. If PrepareToDraw is called, |
| 198 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is | 200 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is |
| 199 // called between the two. | 201 // called between the two. |
| 200 virtual DrawResult PrepareToDraw(FrameData* frame); | 202 virtual DrawResult PrepareToDraw(FrameData* frame); |
| 201 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); | 203 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); |
| 202 // Must be called if and only if PrepareToDraw was called. | 204 // Must be called if and only if PrepareToDraw was called. |
| 203 void DidDrawAllLayers(const FrameData& frame); | 205 void DidDrawAllLayers(const FrameData& frame); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 | 478 |
| 477 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } | 479 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } |
| 478 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } | 480 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } |
| 479 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } | 481 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } |
| 480 | 482 |
| 481 // Only valid for synchronous (non-scheduled) single-threaded case. | 483 // Only valid for synchronous (non-scheduled) single-threaded case. |
| 482 void SynchronouslyInitializeAllTiles(); | 484 void SynchronouslyInitializeAllTiles(); |
| 483 | 485 |
| 484 virtual void CreateResourceAndRasterWorkerPool( | 486 virtual void CreateResourceAndRasterWorkerPool( |
| 485 scoped_ptr<RasterWorkerPool>* raster_worker_pool, | 487 scoped_ptr<RasterWorkerPool>* raster_worker_pool, |
| 488 scoped_ptr<GpuRasterizer>* gpu_rasterizer, |
| 486 scoped_ptr<ResourcePool>* resource_pool, | 489 scoped_ptr<ResourcePool>* resource_pool, |
| 487 scoped_ptr<ResourcePool>* staging_resource_pool); | 490 scoped_ptr<ResourcePool>* staging_resource_pool); |
| 488 | 491 |
| 489 protected: | 492 protected: |
| 490 LayerTreeHostImpl( | 493 LayerTreeHostImpl( |
| 491 const LayerTreeSettings& settings, | 494 const LayerTreeSettings& settings, |
| 492 LayerTreeHostImplClient* client, | 495 LayerTreeHostImplClient* client, |
| 493 Proxy* proxy, | 496 Proxy* proxy, |
| 494 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 497 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 495 SharedBitmapManager* shared_bitmap_manager, | 498 SharedBitmapManager* shared_bitmap_manager, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 std::set<UIResourceId> evicted_ui_resources_; | 588 std::set<UIResourceId> evicted_ui_resources_; |
| 586 | 589 |
| 587 scoped_ptr<OutputSurface> output_surface_; | 590 scoped_ptr<OutputSurface> output_surface_; |
| 588 | 591 |
| 589 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- | 592 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- |
| 590 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). | 593 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). |
| 591 scoped_ptr<ResourceProvider> resource_provider_; | 594 scoped_ptr<ResourceProvider> resource_provider_; |
| 592 scoped_ptr<TileManager> tile_manager_; | 595 scoped_ptr<TileManager> tile_manager_; |
| 593 bool use_gpu_rasterization_; | 596 bool use_gpu_rasterization_; |
| 594 scoped_ptr<RasterWorkerPool> raster_worker_pool_; | 597 scoped_ptr<RasterWorkerPool> raster_worker_pool_; |
| 598 scoped_ptr<GpuRasterizer> gpu_rasterizer_; |
| 595 scoped_ptr<ResourcePool> resource_pool_; | 599 scoped_ptr<ResourcePool> resource_pool_; |
| 596 scoped_ptr<ResourcePool> staging_resource_pool_; | 600 scoped_ptr<ResourcePool> staging_resource_pool_; |
| 597 scoped_ptr<Renderer> renderer_; | 601 scoped_ptr<Renderer> renderer_; |
| 598 | 602 |
| 599 GlobalStateThatImpactsTilePriority global_tile_state_; | 603 GlobalStateThatImpactsTilePriority global_tile_state_; |
| 600 | 604 |
| 601 // Tree currently being drawn. | 605 // Tree currently being drawn. |
| 602 scoped_ptr<LayerTreeImpl> active_tree_; | 606 scoped_ptr<LayerTreeImpl> active_tree_; |
| 603 | 607 |
| 604 // In impl-side painting mode, tree with possibly incomplete rasterized | 608 // In impl-side painting mode, tree with possibly incomplete rasterized |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 | 711 |
| 708 bool requires_high_res_to_draw_; | 712 bool requires_high_res_to_draw_; |
| 709 bool required_for_draw_tile_is_top_of_raster_queue_; | 713 bool required_for_draw_tile_is_top_of_raster_queue_; |
| 710 | 714 |
| 711 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 715 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 712 }; | 716 }; |
| 713 | 717 |
| 714 } // namespace cc | 718 } // namespace cc |
| 715 | 719 |
| 716 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 720 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |