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

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

Issue 1134123005: cc: split UpdateGpuRasterizationStatus() into two parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 7 months 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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 OutputSurface* output_surface() const { return output_surface_.get(); } 314 OutputSurface* output_surface() const { return output_surface_.get(); }
315 315
316 std::string LayerTreeAsJson() const; 316 std::string LayerTreeAsJson() const;
317 317
318 void FinishAllRendering(); 318 void FinishAllRendering();
319 int SourceAnimationFrameNumber() const; 319 int SourceAnimationFrameNumber() const;
320 320
321 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); 321 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface);
322 TileManager* tile_manager() { return tile_manager_.get(); } 322 TileManager* tile_manager() { return tile_manager_.get(); }
323 323
324 void set_has_gpu_rasterization_trigger(bool flag) { 324 void SetHasGpuRasterizationTrigger(bool flag) {
325 has_gpu_rasterization_trigger_ = flag; 325 has_gpu_rasterization_trigger_ = flag;
326 UpdateGpuRasterizationStatus();
326 } 327 }
327 void set_content_is_suitable_for_gpu_rasterization(bool flag) { 328 void SetContentIsSuitableForGpuRasterization(bool flag) {
328 content_is_suitable_for_gpu_rasterization_ = flag; 329 content_is_suitable_for_gpu_rasterization_ = flag;
330 UpdateGpuRasterizationStatus();
329 } 331 }
330 bool CanUseGpuRasterization(); 332 bool CanUseGpuRasterization();
331 void UpdateGpuRasterizationStatus(); 333 void UpdateTreeResourcesForGpuRasterizationIfNeeded();
332 bool use_gpu_rasterization() const { return use_gpu_rasterization_; } 334 bool use_gpu_rasterization() const { return use_gpu_rasterization_; }
333 bool use_msaa() const { return use_msaa_; } 335 bool use_msaa() const { return use_msaa_; }
334 336
335 GpuRasterizationStatus gpu_rasterization_status() const { 337 GpuRasterizationStatus gpu_rasterization_status() const {
336 return gpu_rasterization_status_; 338 return gpu_rasterization_status_;
337 } 339 }
338 340
339 bool create_low_res_tiling() const { 341 bool create_low_res_tiling() const {
340 return settings_.create_low_res_tiling && !use_gpu_rasterization_; 342 return settings_.create_low_res_tiling && !use_gpu_rasterization_;
341 } 343 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 LayerImpl* layer_impl, 567 LayerImpl* layer_impl,
566 const gfx::PointF& viewport_point, 568 const gfx::PointF& viewport_point,
567 const gfx::Vector2dF& viewport_delta); 569 const gfx::Vector2dF& viewport_delta);
568 570
569 void CreateAndSetRenderer(); 571 void CreateAndSetRenderer();
570 void CreateAndSetTileManager(); 572 void CreateAndSetTileManager();
571 void DestroyTileManager(); 573 void DestroyTileManager();
572 void ReleaseTreeResources(); 574 void ReleaseTreeResources();
573 void RecreateTreeResources(); 575 void RecreateTreeResources();
574 576
577 void UpdateGpuRasterizationStatus();
578
575 bool IsSynchronousSingleThreaded() const; 579 bool IsSynchronousSingleThreaded() const;
576 580
577 Viewport* viewport() { return viewport_.get(); } 581 Viewport* viewport() { return viewport_.get(); }
578 582
579 // Scroll by preferring to move the outer viewport first, only moving the 583 // Scroll by preferring to move the outer viewport first, only moving the
580 // inner if the outer is at its scroll extents. 584 // inner if the outer is at its scroll extents.
581 void ScrollViewportBy(gfx::Vector2dF scroll_delta); 585 void ScrollViewportBy(gfx::Vector2dF scroll_delta);
582 // Scroll by preferring to move the inner viewport first, only moving the 586 // Scroll by preferring to move the inner viewport first, only moving the
583 // outer if the inner is at its scroll extents. 587 // outer if the inner is at its scroll extents.
584 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta); 588 void ScrollViewportInnerFirst(gfx::Vector2dF scroll_delta);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- 644 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile-
641 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). 645 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice().
642 // |tile_manager_| can also be NULL when raster_enabled is false. 646 // |tile_manager_| can also be NULL when raster_enabled is false.
643 scoped_ptr<ResourceProvider> resource_provider_; 647 scoped_ptr<ResourceProvider> resource_provider_;
644 scoped_ptr<TileManager> tile_manager_; 648 scoped_ptr<TileManager> tile_manager_;
645 bool content_is_suitable_for_gpu_rasterization_; 649 bool content_is_suitable_for_gpu_rasterization_;
646 bool has_gpu_rasterization_trigger_; 650 bool has_gpu_rasterization_trigger_;
647 bool use_gpu_rasterization_; 651 bool use_gpu_rasterization_;
648 bool use_msaa_; 652 bool use_msaa_;
649 GpuRasterizationStatus gpu_rasterization_status_; 653 GpuRasterizationStatus gpu_rasterization_status_;
654 bool tree_resources_for_gpu_rasterization_dirty_;
650 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; 655 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
651 scoped_ptr<ResourcePool> resource_pool_; 656 scoped_ptr<ResourcePool> resource_pool_;
652 scoped_ptr<ResourcePool> staging_resource_pool_; 657 scoped_ptr<ResourcePool> staging_resource_pool_;
653 scoped_ptr<Renderer> renderer_; 658 scoped_ptr<Renderer> renderer_;
654 659
655 GlobalStateThatImpactsTilePriority global_tile_state_; 660 GlobalStateThatImpactsTilePriority global_tile_state_;
656 661
657 // Tree currently being drawn. 662 // Tree currently being drawn.
658 scoped_ptr<LayerTreeImpl> active_tree_; 663 scoped_ptr<LayerTreeImpl> active_tree_;
659 664
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 766 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
762 767
763 scoped_ptr<Viewport> viewport_; 768 scoped_ptr<Viewport> viewport_;
764 769
765 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 770 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
766 }; 771 };
767 772
768 } // namespace cc 773 } // namespace cc
769 774
770 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 775 #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