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