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

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

Issue 900073003: cc: Rework how picture layer tiling set gets into raster queues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unrelated changes Created 5 years, 10 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
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // Viewport rect in view space used for tiling prioritization. 240 // Viewport rect in view space used for tiling prioritization.
241 const gfx::Rect ViewportRectForTilePriority() const; 241 const gfx::Rect ViewportRectForTilePriority() const;
242 242
243 // RendererClient implementation. 243 // RendererClient implementation.
244 void SetFullRootLayerDamage() override; 244 void SetFullRootLayerDamage() override;
245 245
246 // TileManagerClient implementation. 246 // TileManagerClient implementation.
247 void NotifyReadyToActivate() override; 247 void NotifyReadyToActivate() override;
248 void NotifyReadyToDraw() override; 248 void NotifyReadyToDraw() override;
249 void NotifyTileStateChanged(const Tile* tile) override; 249 void NotifyTileStateChanged(const Tile* tile) override;
250 scoped_ptr<RasterTilePriorityQueue> BuildRasterQueue(
251 TreePriority tree_priority,
252 RasterTilePriorityQueue::Type type) override;
253 scoped_ptr<EvictionTilePriorityQueue> BuildEvictionQueue(
254 TreePriority tree_priority) override;
255 void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override; 250 void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override;
256 251 bool PendingTreeExists() override;
257 // Returns existing picture layers.
258 // TODO(vmpstr): Remove this, it's only used in tests.
259 const std::vector<PictureLayerImpl*>& GetPictureLayers() const;
260 252
261 // ScrollbarAnimationControllerClient implementation. 253 // ScrollbarAnimationControllerClient implementation.
262 void PostDelayedScrollbarFade(const base::Closure& start_fade, 254 void PostDelayedScrollbarFade(const base::Closure& start_fade,
263 base::TimeDelta delay) override; 255 base::TimeDelta delay) override;
264 void SetNeedsScrollbarAnimationFrame() override; 256 void SetNeedsScrollbarAnimationFrame() override;
265 257
266 // OutputSurfaceClient implementation. 258 // OutputSurfaceClient implementation.
267 void DeferredInitialize() override; 259 void DeferredInitialize() override;
268 void ReleaseGL() override; 260 void ReleaseGL() override;
269 void CommitVSyncParameters(base::TimeTicks timebase, 261 void CommitVSyncParameters(base::TimeTicks timebase,
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 gfx::Rect DeviceViewport() const; 480 gfx::Rect DeviceViewport() const;
489 gfx::Rect DeviceClip() const; 481 gfx::Rect DeviceClip() const;
490 482
491 // When a SwapPromiseMonitor is created on the impl thread, it calls 483 // When a SwapPromiseMonitor is created on the impl thread, it calls
492 // InsertSwapPromiseMonitor() to register itself with LayerTreeHostImpl. 484 // InsertSwapPromiseMonitor() to register itself with LayerTreeHostImpl.
493 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() 485 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor()
494 // to unregister itself. 486 // to unregister itself.
495 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); 487 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor);
496 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); 488 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor);
497 489
498 void RegisterPictureLayerImpl(PictureLayerImpl* layer);
499 void UnregisterPictureLayerImpl(PictureLayerImpl* layer);
500
501 void GetPictureLayerImplPairs(std::vector<PictureLayerImpl::Pair>* layers,
502 bool need_valid_tile_priorities) const;
503
504 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } 490 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; }
505 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } 491 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; }
506 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } 492 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; }
507 493
508 // Only valid for synchronous (non-scheduled) single-threaded case. 494 // Only valid for synchronous (non-scheduled) single-threaded case.
509 void SynchronouslyInitializeAllTiles(); 495 void SynchronouslyInitializeAllTiles();
510 496
511 virtual scoped_ptr<Rasterizer> CreateRasterizer(); 497 virtual scoped_ptr<Rasterizer> CreateRasterizer();
512 virtual void CreateResourceAndTileTaskWorkerPool( 498 virtual void CreateResourceAndTileTaskWorkerPool(
513 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 499 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 712
727 // Optional callback to notify of new tree activations. 713 // Optional callback to notify of new tree activations.
728 base::Closure tree_activation_callback_; 714 base::Closure tree_activation_callback_;
729 715
730 SharedBitmapManager* shared_bitmap_manager_; 716 SharedBitmapManager* shared_bitmap_manager_;
731 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 717 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
732 int id_; 718 int id_;
733 719
734 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 720 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
735 721
736 std::vector<PictureLayerImpl*> picture_layers_;
737 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
738
739 bool requires_high_res_to_draw_; 722 bool requires_high_res_to_draw_;
740 bool is_likely_to_require_a_draw_; 723 bool is_likely_to_require_a_draw_;
741 724
742 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 725 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
743 726
744 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 727 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
745 }; 728 };
746 729
747 } // namespace cc 730 } // namespace cc
748 731
749 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 732 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698