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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 12804006: cc: Save correct frame begin time to FrameRateCounter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 188402 Created 7 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
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.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 #include "cc/layer_tree_host_impl.h" 5 #include "cc/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 923
924 if (!RootScrollLayer()) 924 if (!RootScrollLayer())
925 return metadata; 925 return metadata;
926 926
927 metadata.root_scroll_offset = RootScrollLayer()->scroll_offset() + 927 metadata.root_scroll_offset = RootScrollLayer()->scroll_offset() +
928 RootScrollLayer()->scroll_delta(); 928 RootScrollLayer()->scroll_delta();
929 929
930 return metadata; 930 return metadata;
931 } 931 }
932 932
933 void LayerTreeHostImpl::DrawLayers(FrameData* frame) { 933 void LayerTreeHostImpl::DrawLayers(FrameData* frame,
934 base::TimeTicks frame_begin_time) {
934 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); 935 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers");
935 DCHECK(CanDraw()); 936 DCHECK(CanDraw());
936 DCHECK(!frame->render_passes.empty()); 937 DCHECK(!frame->render_passes.empty());
937 938
938 // FIXME: use the frame begin time from the overall compositor scheduler. 939 fps_counter_->saveTimeStamp(frame_begin_time);
939 // This value is currently inaccessible because it is up in Chromium's
940 // RenderWidget.
941 fps_counter_->saveTimeStamp(base::TimeTicks::Now());
942 940
943 if (tile_manager_) { 941 if (tile_manager_) {
944 memory_history_->SaveEntry( 942 memory_history_->SaveEntry(
945 tile_manager_->memory_stats_from_last_assign()); 943 tile_manager_->memory_stats_from_last_assign());
946 } 944 }
947 945
948 if (debug_state_.showHudRects()) { 946 if (debug_state_.showHudRects()) {
949 debug_rect_history_->SaveDebugRectsForCurrentFrame( 947 debug_rect_history_->SaveDebugRectsForCurrentFrame(
950 active_tree_->root_layer(), 948 active_tree_->root_layer(),
951 *frame->render_surface_layer_list, 949 *frame->render_surface_layer_list,
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 tile_manager_->SetRecordRenderingStats(debug_state_.recordRenderingStats()); 1920 tile_manager_->SetRecordRenderingStats(debug_state_.recordRenderingStats());
1923 } 1921 }
1924 1922
1925 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time, 1923 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time,
1926 int commit_number) { 1924 int commit_number) {
1927 DCHECK(debug_state_.continuousPainting); 1925 DCHECK(debug_state_.continuousPainting);
1928 paint_time_counter_->SavePaintTime(total_paint_time, commit_number); 1926 paint_time_counter_->SavePaintTime(total_paint_time, commit_number);
1929 } 1927 }
1930 1928
1931 } // namespace cc 1929 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698