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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 478 |
479 void SetTopControlsLayoutHeight(float height); | 479 void SetTopControlsLayoutHeight(float height); |
480 | 480 |
481 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } | 481 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } |
482 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } | 482 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } |
483 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } | 483 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } |
484 | 484 |
485 // Only valid for synchronous (non-scheduled) single-threaded case. | 485 // Only valid for synchronous (non-scheduled) single-threaded case. |
486 void SynchronouslyInitializeAllTiles(); | 486 void SynchronouslyInitializeAllTiles(); |
487 | 487 |
| 488 bool CanUseZeroCopyRasterizer() const; |
| 489 bool CanUseOneCopyRasterizer() const; |
| 490 virtual void CreateResourceAndRasterWorkerPool( |
| 491 scoped_ptr<RasterWorkerPool>* raster_worker_pool, |
| 492 scoped_ptr<ResourcePool>* resource_pool, |
| 493 scoped_ptr<ResourcePool>* staging_resource_pool); |
| 494 |
488 protected: | 495 protected: |
489 LayerTreeHostImpl( | 496 LayerTreeHostImpl( |
490 const LayerTreeSettings& settings, | 497 const LayerTreeSettings& settings, |
491 LayerTreeHostImplClient* client, | 498 LayerTreeHostImplClient* client, |
492 Proxy* proxy, | 499 Proxy* proxy, |
493 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 500 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
494 SharedBitmapManager* shared_bitmap_manager, | 501 SharedBitmapManager* shared_bitmap_manager, |
495 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 502 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
496 int id); | 503 int id); |
497 | 504 |
498 void UpdateViewportContainerSizes(); | 505 void UpdateViewportContainerSizes(); |
499 | 506 |
500 // Virtual for testing. | 507 // Virtual for testing. |
501 virtual void AnimateLayers(base::TimeTicks monotonic_time); | 508 virtual void AnimateLayers(base::TimeTicks monotonic_time); |
502 | |
503 // Virtual for testing. | |
504 virtual base::TimeDelta LowFrequencyAnimationInterval() const; | 509 virtual base::TimeDelta LowFrequencyAnimationInterval() const; |
505 | 510 |
506 const AnimationRegistrar::AnimationControllerMap& | 511 const AnimationRegistrar::AnimationControllerMap& |
507 active_animation_controllers() const { | 512 active_animation_controllers() const { |
508 return animation_registrar_->active_animation_controllers(); | 513 return animation_registrar_->active_animation_controllers(); |
509 } | 514 } |
510 | 515 |
511 bool manage_tiles_needed() const { return tile_priorities_dirty_; } | 516 bool manage_tiles_needed() const { return tile_priorities_dirty_; } |
512 | 517 |
513 LayerTreeHostImplClient* client_; | 518 LayerTreeHostImplClient* client_; |
514 Proxy* proxy_; | 519 Proxy* proxy_; |
515 | 520 |
516 private: | 521 private: |
517 void CreateAndSetRenderer(); | 522 void CreateAndSetRenderer(); |
518 void CreateAndSetTileManager(); | 523 void CreateAndSetTileManager(); |
519 void DestroyTileManager(); | 524 void DestroyTileManager(); |
520 void ReleaseTreeResources(); | 525 void ReleaseTreeResources(); |
521 void EnforceZeroBudget(bool zero_budget); | 526 void EnforceZeroBudget(bool zero_budget); |
522 | 527 |
523 bool UsePendingTreeForSync() const; | 528 bool UsePendingTreeForSync() const; |
524 bool CanUseZeroCopyRasterizer() const; | 529 bool IsSynchronousSingleThreaded() const; |
525 bool UseOneCopyRasterizer() const; | |
526 | 530 |
527 // Scroll by preferring to move the outer viewport first, only moving the | 531 // Scroll by preferring to move the outer viewport first, only moving the |
528 // inner if the outer is at its scroll extents. | 532 // inner if the outer is at its scroll extents. |
529 void ScrollViewportBy(gfx::Vector2dF scroll_delta); | 533 void ScrollViewportBy(gfx::Vector2dF scroll_delta); |
530 // Scroll by preferring to move the inner viewport first, only moving the | 534 // Scroll by preferring to move the inner viewport first, only moving the |
531 // outer if the inner is at its scroll extents. | 535 // outer if the inner is at its scroll extents. |
532 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); | 536 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); |
533 void AnimatePageScale(base::TimeTicks monotonic_time); | 537 void AnimatePageScale(base::TimeTicks monotonic_time); |
534 void AnimateScrollbars(base::TimeTicks monotonic_time); | 538 void AnimateScrollbars(base::TimeTicks monotonic_time); |
535 void AnimateTopControls(base::TimeTicks monotonic_time); | 539 void AnimateTopControls(base::TimeTicks monotonic_time); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 717 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
714 | 718 |
715 bool requires_high_res_to_draw_; | 719 bool requires_high_res_to_draw_; |
716 | 720 |
717 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 721 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
718 }; | 722 }; |
719 | 723 |
720 } // namespace cc | 724 } // namespace cc |
721 | 725 |
722 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 726 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |