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

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

Issue 1063493002: cc: Remove all traces of synchronous GPU rasterization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 8 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/test/layer_tree_test.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 12 matching lines...) Expand all
23 #include "cc/input/input_handler.h" 23 #include "cc/input/input_handler.h"
24 #include "cc/input/layer_scroll_offset_delegate.h" 24 #include "cc/input/layer_scroll_offset_delegate.h"
25 #include "cc/input/top_controls_manager_client.h" 25 #include "cc/input/top_controls_manager_client.h"
26 #include "cc/layers/layer_lists.h" 26 #include "cc/layers/layer_lists.h"
27 #include "cc/layers/render_pass_sink.h" 27 #include "cc/layers/render_pass_sink.h"
28 #include "cc/output/begin_frame_args.h" 28 #include "cc/output/begin_frame_args.h"
29 #include "cc/output/managed_memory_policy.h" 29 #include "cc/output/managed_memory_policy.h"
30 #include "cc/output/output_surface_client.h" 30 #include "cc/output/output_surface_client.h"
31 #include "cc/output/renderer.h" 31 #include "cc/output/renderer.h"
32 #include "cc/quads/render_pass.h" 32 #include "cc/quads/render_pass.h"
33 #include "cc/resources/rasterizer.h"
34 #include "cc/resources/resource_provider.h" 33 #include "cc/resources/resource_provider.h"
35 #include "cc/resources/tile_manager.h" 34 #include "cc/resources/tile_manager.h"
36 #include "cc/resources/ui_resource_client.h" 35 #include "cc/resources/ui_resource_client.h"
37 #include "cc/scheduler/commit_earlyout_reason.h" 36 #include "cc/scheduler/commit_earlyout_reason.h"
38 #include "cc/scheduler/draw_result.h" 37 #include "cc/scheduler/draw_result.h"
39 #include "cc/trees/layer_tree_settings.h" 38 #include "cc/trees/layer_tree_settings.h"
40 #include "cc/trees/proxy.h" 39 #include "cc/trees/proxy.h"
41 #include "skia/ext/refptr.h" 40 #include "skia/ext/refptr.h"
42 #include "third_party/skia/include/core/SkColor.h" 41 #include "third_party/skia/include/core/SkColor.h"
43 #include "ui/gfx/geometry/rect.h" 42 #include "ui/gfx/geometry/rect.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 void set_gpu_rasterization_status( 323 void set_gpu_rasterization_status(
325 GpuRasterizationStatus gpu_rasterization_status) { 324 GpuRasterizationStatus gpu_rasterization_status) {
326 gpu_rasterization_status_ = gpu_rasterization_status; 325 gpu_rasterization_status_ = gpu_rasterization_status;
327 } 326 }
328 327
329 bool create_low_res_tiling() const { 328 bool create_low_res_tiling() const {
330 return settings_.create_low_res_tiling && !use_gpu_rasterization_; 329 return settings_.create_low_res_tiling && !use_gpu_rasterization_;
331 } 330 }
332 ResourcePool* resource_pool() { return resource_pool_.get(); } 331 ResourcePool* resource_pool() { return resource_pool_.get(); }
333 Renderer* renderer() { return renderer_.get(); } 332 Renderer* renderer() { return renderer_.get(); }
334 Rasterizer* rasterizer() { return rasterizer_.get(); }
335 const RendererCapabilitiesImpl& GetRendererCapabilities() const; 333 const RendererCapabilitiesImpl& GetRendererCapabilities() const;
336 334
337 virtual bool SwapBuffers(const FrameData& frame); 335 virtual bool SwapBuffers(const FrameData& frame);
338 virtual void WillBeginImplFrame(const BeginFrameArgs& args); 336 virtual void WillBeginImplFrame(const BeginFrameArgs& args);
339 void DidModifyTilePriorities(); 337 void DidModifyTilePriorities();
340 338
341 LayerTreeImpl* active_tree() { return active_tree_.get(); } 339 LayerTreeImpl* active_tree() { return active_tree_.get(); }
342 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } 340 const LayerTreeImpl* active_tree() const { return active_tree_.get(); }
343 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } 341 LayerTreeImpl* pending_tree() { return pending_tree_.get(); }
344 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } 342 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 510
513 // TODO(weiliangc): Replace RequiresHighResToDraw with scheduler waits for 511 // TODO(weiliangc): Replace RequiresHighResToDraw with scheduler waits for
514 // ReadyToDraw. crbug.com/469175 512 // ReadyToDraw. crbug.com/469175
515 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } 513 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; }
516 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } 514 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; }
517 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } 515 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; }
518 516
519 // Only valid for synchronous (non-scheduled) single-threaded case. 517 // Only valid for synchronous (non-scheduled) single-threaded case.
520 void SynchronouslyInitializeAllTiles(); 518 void SynchronouslyInitializeAllTiles();
521 519
522 virtual scoped_ptr<Rasterizer> CreateRasterizer();
523 virtual void CreateResourceAndTileTaskWorkerPool( 520 virtual void CreateResourceAndTileTaskWorkerPool(
524 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 521 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
525 scoped_ptr<ResourcePool>* resource_pool, 522 scoped_ptr<ResourcePool>* resource_pool,
526 scoped_ptr<ResourcePool>* staging_resource_pool); 523 scoped_ptr<ResourcePool>* staging_resource_pool);
527 524
528 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } 525 bool prepare_tiles_needed() const { return tile_priorities_dirty_; }
529 526
530 FrameTimingTracker* frame_timing_tracker() { 527 FrameTimingTracker* frame_timing_tracker() {
531 return frame_timing_tracker_.get(); 528 return frame_timing_tracker_.get();
532 } 529 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 scoped_ptr<OutputSurface> output_surface_; 646 scoped_ptr<OutputSurface> output_surface_;
650 647
651 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- 648 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile-
652 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). 649 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice().
653 // |tile_manager_| can also be NULL when raster_enabled is false. 650 // |tile_manager_| can also be NULL when raster_enabled is false.
654 scoped_ptr<ResourceProvider> resource_provider_; 651 scoped_ptr<ResourceProvider> resource_provider_;
655 scoped_ptr<TileManager> tile_manager_; 652 scoped_ptr<TileManager> tile_manager_;
656 bool use_gpu_rasterization_; 653 bool use_gpu_rasterization_;
657 GpuRasterizationStatus gpu_rasterization_status_; 654 GpuRasterizationStatus gpu_rasterization_status_;
658 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; 655 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
659 scoped_ptr<Rasterizer> rasterizer_;
660 scoped_ptr<ResourcePool> resource_pool_; 656 scoped_ptr<ResourcePool> resource_pool_;
661 scoped_ptr<ResourcePool> staging_resource_pool_; 657 scoped_ptr<ResourcePool> staging_resource_pool_;
662 scoped_ptr<Renderer> renderer_; 658 scoped_ptr<Renderer> renderer_;
663 659
664 GlobalStateThatImpactsTilePriority global_tile_state_; 660 GlobalStateThatImpactsTilePriority global_tile_state_;
665 661
666 // Tree currently being drawn. 662 // Tree currently being drawn.
667 scoped_ptr<LayerTreeImpl> active_tree_; 663 scoped_ptr<LayerTreeImpl> active_tree_;
668 664
669 // In impl-side painting mode, tree with possibly incomplete rasterized 665 // In impl-side painting mode, tree with possibly incomplete rasterized
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 768 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
773 769
774 scoped_ptr<Viewport> viewport_; 770 scoped_ptr<Viewport> viewport_;
775 771
776 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 772 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
777 }; 773 };
778 774
779 } // namespace cc 775 } // namespace cc
780 776
781 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 777 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698