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

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: tests 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 PostDelayedScrollbarFadeOnImplThread( 106 virtual void PostDelayedScrollbarFadeOnImplThread(
107 const base::Closure& start_fade, 107 const base::Closure& start_fade,
108 base::TimeDelta delay) = 0; 108 base::TimeDelta delay) = 0;
109 virtual void DidActivateSyncTree() = 0; 109 virtual void DidActivateSyncTree() = 0;
110 virtual void DidPrepareTiles() = 0; 110 virtual void DidPrepareTiles() = 0;
111 virtual base::TimeTicks GetNextBeginImplFrameTimeIfRequested() const = 0;
111 112
112 // Called when page scale animation has completed on the impl thread. 113 // Called when page scale animation has completed on the impl thread.
113 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; 114 virtual void DidCompletePageScaleAnimationOnImplThread() = 0;
114 115
115 protected: 116 protected:
116 virtual ~LayerTreeHostImplClient() {} 117 virtual ~LayerTreeHostImplClient() {}
117 }; 118 };
118 119
119 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 120 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
120 // state. 121 // state.
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 510 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
510 scoped_ptr<ResourcePool>* resource_pool, 511 scoped_ptr<ResourcePool>* resource_pool,
511 scoped_ptr<ResourcePool>* staging_resource_pool); 512 scoped_ptr<ResourcePool>* staging_resource_pool);
512 513
513 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } 514 bool prepare_tiles_needed() const { return tile_priorities_dirty_; }
514 515
515 FrameTimingTracker* frame_timing_tracker() { 516 FrameTimingTracker* frame_timing_tracker() {
516 return frame_timing_tracker_.get(); 517 return frame_timing_tracker_.get();
517 } 518 }
518 519
520 void SetBeginMainFrameTime(base::TimeTicks frame_time);
521 void RecordMainFrameTiming();
522
519 protected: 523 protected:
520 LayerTreeHostImpl( 524 LayerTreeHostImpl(
521 const LayerTreeSettings& settings, 525 const LayerTreeSettings& settings,
522 LayerTreeHostImplClient* client, 526 LayerTreeHostImplClient* client,
523 Proxy* proxy, 527 Proxy* proxy,
524 RenderingStatsInstrumentation* rendering_stats_instrumentation, 528 RenderingStatsInstrumentation* rendering_stats_instrumentation,
525 SharedBitmapManager* shared_bitmap_manager, 529 SharedBitmapManager* shared_bitmap_manager,
526 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 530 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
527 int id); 531 int id);
528 532
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 730 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
727 int id_; 731 int id_;
728 732
729 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 733 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
730 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 734 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
731 735
732 bool requires_high_res_to_draw_; 736 bool requires_high_res_to_draw_;
733 bool is_likely_to_require_a_draw_; 737 bool is_likely_to_require_a_draw_;
734 738
735 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; 739 scoped_ptr<FrameTimingTracker> frame_timing_tracker_;
740 base::TimeTicks main_frame_time_;
736 741
737 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 742 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
738 }; 743 };
739 744
740 } // namespace cc 745 } // namespace cc
741 746
742 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 747 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698