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

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

Issue 774413002: Update from https://crrev.com/306724 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class RenderingStatsInstrumentation; 55 class RenderingStatsInstrumentation;
56 class ResourcePool; 56 class ResourcePool;
57 class ScrollElasticityHelper; 57 class ScrollElasticityHelper;
58 class ScrollbarLayerImplBase; 58 class ScrollbarLayerImplBase;
59 class TextureMailboxDeleter; 59 class TextureMailboxDeleter;
60 class TopControlsManager; 60 class TopControlsManager;
61 class UIResourceBitmap; 61 class UIResourceBitmap;
62 class UIResourceRequest; 62 class UIResourceRequest;
63 struct RendererCapabilitiesImpl; 63 struct RendererCapabilitiesImpl;
64 64
65 enum class GpuRasterizationStatus {
66 ON,
67 ON_FORCED,
68 OFF_DEVICE,
69 OFF_VIEWPORT,
70 OFF_CONTENT
71 };
72
65 // LayerTreeHost->Proxy callback interface. 73 // LayerTreeHost->Proxy callback interface.
66 class LayerTreeHostImplClient { 74 class LayerTreeHostImplClient {
67 public: 75 public:
68 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; 76 virtual void UpdateRendererCapabilitiesOnImplThread() = 0;
69 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 77 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
70 virtual void CommitVSyncParameters(base::TimeTicks timebase, 78 virtual void CommitVSyncParameters(base::TimeTicks timebase,
71 base::TimeDelta interval) = 0; 79 base::TimeDelta interval) = 0;
72 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0; 80 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) = 0;
73 virtual void SetMaxSwapsPendingOnImplThread(int max) = 0; 81 virtual void SetMaxSwapsPendingOnImplThread(int max) = 0;
74 virtual void DidSwapBuffersOnImplThread() = 0; 82 virtual void DidSwapBuffersOnImplThread() = 0;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 280
273 std::string LayerTreeAsJson() const; 281 std::string LayerTreeAsJson() const;
274 282
275 void FinishAllRendering(); 283 void FinishAllRendering();
276 int SourceAnimationFrameNumber() const; 284 int SourceAnimationFrameNumber() const;
277 285
278 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); 286 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface);
279 TileManager* tile_manager() { return tile_manager_.get(); } 287 TileManager* tile_manager() { return tile_manager_.get(); }
280 void SetUseGpuRasterization(bool use_gpu); 288 void SetUseGpuRasterization(bool use_gpu);
281 bool use_gpu_rasterization() const { return use_gpu_rasterization_; } 289 bool use_gpu_rasterization() const { return use_gpu_rasterization_; }
290
291 GpuRasterizationStatus gpu_rasterization_status() const {
292 return gpu_rasterization_status_;
293 }
294 void set_gpu_rasterization_status(
295 GpuRasterizationStatus gpu_rasterization_status) {
296 gpu_rasterization_status_ = gpu_rasterization_status;
297 }
298
282 bool create_low_res_tiling() const { 299 bool create_low_res_tiling() const {
283 return settings_.create_low_res_tiling && !use_gpu_rasterization_; 300 return settings_.create_low_res_tiling && !use_gpu_rasterization_;
284 } 301 }
285 ResourcePool* resource_pool() { return resource_pool_.get(); } 302 ResourcePool* resource_pool() { return resource_pool_.get(); }
286 Renderer* renderer() { return renderer_.get(); } 303 Renderer* renderer() { return renderer_.get(); }
287 const RendererCapabilitiesImpl& GetRendererCapabilities() const; 304 const RendererCapabilitiesImpl& GetRendererCapabilities() const;
288 305
289 virtual bool SwapBuffers(const FrameData& frame); 306 virtual bool SwapBuffers(const FrameData& frame);
290 virtual void WillBeginImplFrame(const BeginFrameArgs& args); 307 virtual void WillBeginImplFrame(const BeginFrameArgs& args);
291 void DidModifyTilePriorities(); 308 void DidModifyTilePriorities();
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 // request queue. 601 // request queue.
585 std::set<UIResourceId> evicted_ui_resources_; 602 std::set<UIResourceId> evicted_ui_resources_;
586 603
587 scoped_ptr<OutputSurface> output_surface_; 604 scoped_ptr<OutputSurface> output_surface_;
588 605
589 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- 606 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile-
590 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). 607 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice().
591 scoped_ptr<ResourceProvider> resource_provider_; 608 scoped_ptr<ResourceProvider> resource_provider_;
592 scoped_ptr<TileManager> tile_manager_; 609 scoped_ptr<TileManager> tile_manager_;
593 bool use_gpu_rasterization_; 610 bool use_gpu_rasterization_;
611 GpuRasterizationStatus gpu_rasterization_status_;
594 scoped_ptr<RasterWorkerPool> raster_worker_pool_; 612 scoped_ptr<RasterWorkerPool> raster_worker_pool_;
595 scoped_ptr<ResourcePool> resource_pool_; 613 scoped_ptr<ResourcePool> resource_pool_;
596 scoped_ptr<ResourcePool> staging_resource_pool_; 614 scoped_ptr<ResourcePool> staging_resource_pool_;
597 scoped_ptr<Renderer> renderer_; 615 scoped_ptr<Renderer> renderer_;
598 616
599 GlobalStateThatImpactsTilePriority global_tile_state_; 617 GlobalStateThatImpactsTilePriority global_tile_state_;
600 618
601 // Tree currently being drawn. 619 // Tree currently being drawn.
602 scoped_ptr<LayerTreeImpl> active_tree_; 620 scoped_ptr<LayerTreeImpl> active_tree_;
603 621
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 725
708 bool requires_high_res_to_draw_; 726 bool requires_high_res_to_draw_;
709 bool required_for_draw_tile_is_top_of_raster_queue_; 727 bool required_for_draw_tile_is_top_of_raster_queue_;
710 728
711 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 729 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
712 }; 730 };
713 731
714 } // namespace cc 732 } // namespace cc
715 733
716 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 734 #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