Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 475
476 void GetPictureLayerImplPairs( 476 void GetPictureLayerImplPairs(
477 std::vector<PictureLayerImpl::Pair>* layers) const; 477 std::vector<PictureLayerImpl::Pair>* layers) const;
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.
486 void SynchronouslyInitializeAllTiles();
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
485 protected: 495 protected:
486 LayerTreeHostImpl( 496 LayerTreeHostImpl(
487 const LayerTreeSettings& settings, 497 const LayerTreeSettings& settings,
488 LayerTreeHostImplClient* client, 498 LayerTreeHostImplClient* client,
489 Proxy* proxy, 499 Proxy* proxy,
490 RenderingStatsInstrumentation* rendering_stats_instrumentation, 500 RenderingStatsInstrumentation* rendering_stats_instrumentation,
491 SharedBitmapManager* shared_bitmap_manager, 501 SharedBitmapManager* shared_bitmap_manager,
492 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 502 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
493 int id); 503 int id);
494 504
495 void UpdateViewportContainerSizes(); 505 void UpdateViewportContainerSizes();
496 506
497 // Virtual for testing. 507 // Virtual for testing.
498 virtual void AnimateLayers(base::TimeTicks monotonic_time); 508 virtual void AnimateLayers(base::TimeTicks monotonic_time);
499
500 // Virtual for testing.
501 virtual base::TimeDelta LowFrequencyAnimationInterval() const; 509 virtual base::TimeDelta LowFrequencyAnimationInterval() const;
502 510
503 const AnimationRegistrar::AnimationControllerMap& 511 const AnimationRegistrar::AnimationControllerMap&
504 active_animation_controllers() const { 512 active_animation_controllers() const {
505 return animation_registrar_->active_animation_controllers(); 513 return animation_registrar_->active_animation_controllers();
506 } 514 }
507 515
508 bool manage_tiles_needed() const { return tile_priorities_dirty_; } 516 bool manage_tiles_needed() const { return tile_priorities_dirty_; }
509 517
510 LayerTreeHostImplClient* client_; 518 LayerTreeHostImplClient* client_;
511 Proxy* proxy_; 519 Proxy* proxy_;
512 520
513 private: 521 private:
514 void CreateAndSetRenderer(); 522 void CreateAndSetRenderer();
515 void CreateAndSetTileManager(); 523 void CreateAndSetTileManager();
516 void DestroyTileManager(); 524 void DestroyTileManager();
517 void ReleaseTreeResources(); 525 void ReleaseTreeResources();
518 void EnforceZeroBudget(bool zero_budget); 526 void EnforceZeroBudget(bool zero_budget);
519 527
520 bool UsePendingTreeForSync() const; 528 bool UsePendingTreeForSync() const;
521 bool UseZeroCopyRasterizer() const; 529 bool IsSynchronousSingleThreaded() const;
522 bool UseOneCopyRasterizer() const;
523 530
524 // 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
525 // inner if the outer is at its scroll extents. 532 // inner if the outer is at its scroll extents.
526 void ScrollViewportBy(gfx::Vector2dF scroll_delta); 533 void ScrollViewportBy(gfx::Vector2dF scroll_delta);
527 // 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
528 // outer if the inner is at its scroll extents. 535 // outer if the inner is at its scroll extents.
529 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); 536 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta);
530 void AnimatePageScale(base::TimeTicks monotonic_time); 537 void AnimatePageScale(base::TimeTicks monotonic_time);
531 void AnimateScrollbars(base::TimeTicks monotonic_time); 538 void AnimateScrollbars(base::TimeTicks monotonic_time);
532 void AnimateTopControls(base::TimeTicks monotonic_time); 539 void AnimateTopControls(base::TimeTicks monotonic_time);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 693
687 BeginFrameArgs current_begin_frame_args_; 694 BeginFrameArgs current_begin_frame_args_;
688 695
689 // Expected time between two begin impl frame calls. 696 // Expected time between two begin impl frame calls.
690 base::TimeDelta begin_impl_frame_interval_; 697 base::TimeDelta begin_impl_frame_interval_;
691 698
692 scoped_ptr<AnimationRegistrar> animation_registrar_; 699 scoped_ptr<AnimationRegistrar> animation_registrar_;
693 700
694 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 701 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
695 MicroBenchmarkControllerImpl micro_benchmark_controller_; 702 MicroBenchmarkControllerImpl micro_benchmark_controller_;
703 scoped_ptr<TaskGraphRunner> single_thread_synchronous_task_graph_runner_;
696 704
697 bool need_to_update_visible_tiles_before_draw_; 705 bool need_to_update_visible_tiles_before_draw_;
698 706
699 // Optional callback to notify of new tree activations. 707 // Optional callback to notify of new tree activations.
700 base::Closure tree_activation_callback_; 708 base::Closure tree_activation_callback_;
701 709
702 SharedBitmapManager* shared_bitmap_manager_; 710 SharedBitmapManager* shared_bitmap_manager_;
703 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 711 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
704 int id_; 712 int id_;
705 713
706 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 714 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
707 715
708 std::vector<PictureLayerImpl*> picture_layers_; 716 std::vector<PictureLayerImpl*> picture_layers_;
709 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 717 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
710 718
711 bool requires_high_res_to_draw_; 719 bool requires_high_res_to_draw_;
712 720
713 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 721 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
714 }; 722 };
715 723
716 } // namespace cc 724 } // namespace cc
717 725
718 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 726 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698