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

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

Issue 914403003: cc: Add main frame timing info to frame timing tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 9 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Returns true if resources were deleted by this call. 100 // Returns true if resources were deleted by this call.
101 virtual bool ReduceContentsTextureMemoryOnImplThread( 101 virtual bool ReduceContentsTextureMemoryOnImplThread(
102 size_t limit_bytes, 102 size_t limit_bytes,
103 int priority_cutoff) = 0; 103 int priority_cutoff) = 0;
104 virtual bool IsInsideDraw() = 0; 104 virtual bool IsInsideDraw() = 0;
105 virtual void RenewTreePriority() = 0; 105 virtual void RenewTreePriority() = 0;
106 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, 106 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
107 base::TimeDelta delay) = 0; 107 base::TimeDelta delay) = 0;
108 virtual void DidActivateSyncTree() = 0; 108 virtual void DidActivateSyncTree() = 0;
109 virtual void DidPrepareTiles() = 0; 109 virtual void DidPrepareTiles() = 0;
110 virtual base::TimeTicks GetNextBeginImplFrameTimeIfRequested() const = 0;
110 111
111 // Called when page scale animation has completed on the impl thread. 112 // Called when page scale animation has completed on the impl thread.
112 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; 113 virtual void DidCompletePageScaleAnimationOnImplThread() = 0;
113 114
114 protected: 115 protected:
115 virtual ~LayerTreeHostImplClient() {} 116 virtual ~LayerTreeHostImplClient() {}
116 }; 117 };
117 118
118 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 119 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
119 // state. 120 // state.
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 512 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
512 scoped_ptr<ResourcePool>* resource_pool, 513 scoped_ptr<ResourcePool>* resource_pool,
513 scoped_ptr<ResourcePool>* staging_resource_pool); 514 scoped_ptr<ResourcePool>* staging_resource_pool);
514 515
515 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } 516 bool prepare_tiles_needed() const { return tile_priorities_dirty_; }
516 517
517 FrameTimingTracker* frame_timing_tracker() { 518 FrameTimingTracker* frame_timing_tracker() {
518 return frame_timing_tracker_.get(); 519 return frame_timing_tracker_.get();
519 } 520 }
520 521
522 void SetBeginMainFrameTime(base::TimeTicks frame_time);
523 void RecordMainFrameTiming();
524
521 protected: 525 protected:
522 LayerTreeHostImpl( 526 LayerTreeHostImpl(
523 const LayerTreeSettings& settings, 527 const LayerTreeSettings& settings,
524 LayerTreeHostImplClient* client, 528 LayerTreeHostImplClient* client,
525 Proxy* proxy, 529 Proxy* proxy,
526 RenderingStatsInstrumentation* rendering_stats_instrumentation, 530 RenderingStatsInstrumentation* rendering_stats_instrumentation,
527 SharedBitmapManager* shared_bitmap_manager, 531 SharedBitmapManager* shared_bitmap_manager,
528 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 532 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
529 int id); 533 int id);
530 534
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 725 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
722 int id_; 726 int id_;
723 727
724 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 728 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
725 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 729 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
726 730
727 bool requires_high_res_to_draw_; 731 bool requires_high_res_to_draw_;
728 bool is_likely_to_require_a_draw_; 732 bool is_likely_to_require_a_draw_;
729 733
730 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 734 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
735 base::TimeTicks main_frame_time_;
731 736
732 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 737 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
733 }; 738 };
734 739
735 } // namespace cc 740 } // namespace cc
736 741
737 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 742 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698