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

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: 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
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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 787 }
788 788
789 if (!rootScrollLayer()) 789 if (!rootScrollLayer())
790 return metadata; 790 return metadata;
791 791
792 metadata.root_scroll_offset = rootScrollLayer()->scroll_offset() + rootScrol lLayer()->scroll_delta(); 792 metadata.root_scroll_offset = rootScrollLayer()->scroll_offset() + rootScrol lLayer()->scroll_delta();
793 793
794 return metadata; 794 return metadata;
795 } 795 }
796 796
797 void LayerTreeHostImpl::drawLayers(FrameData& frame) 797 void LayerTreeHostImpl::drawLayers(FrameData& frame, base::TimeTicks frameBeginT ime)
798 { 798 {
799 TRACE_EVENT0("cc", "LayerTreeHostImpl::drawLayers"); 799 TRACE_EVENT0("cc", "LayerTreeHostImpl::drawLayers");
800 DCHECK(canDraw()); 800 DCHECK(canDraw());
801 DCHECK(!frame.renderPasses.empty()); 801 DCHECK(!frame.renderPasses.empty());
802 802
803 // FIXME: use the frame begin time from the overall compositor scheduler. 803 m_fpsCounter->saveTimeStamp(frameBeginTime);
804 // This value is currently inaccessible because it is up in Chromium's
805 // RenderWidget.
806 m_fpsCounter->saveTimeStamp(base::TimeTicks::Now());
807 804
808 if (m_tileManager) { 805 if (m_tileManager) {
809 m_memoryHistory->SaveEntry( 806 m_memoryHistory->SaveEntry(
810 m_tileManager->memory_stats_from_last_assign()); 807 m_tileManager->memory_stats_from_last_assign());
811 } 808 }
812 809
813 if (m_debugState.showHudRects()) 810 if (m_debugState.showHudRects())
814 m_debugRectHistory->saveDebugRectsForCurrentFrame(rootLayer(), *frame.re nderSurfaceLayerList, frame.occludingScreenSpaceRects, frame.nonOccludingScreenS paceRects, m_debugState); 811 m_debugRectHistory->saveDebugRectsForCurrentFrame(rootLayer(), *frame.re nderSurfaceLayerList, frame.occludingScreenSpaceRects, frame.nonOccludingScreenS paceRects, m_debugState);
815 812
816 if (m_debugState.traceAllRenderedFrames) { 813 if (m_debugState.traceAllRenderedFrames) {
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats ()); 1727 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats ());
1731 } 1728 }
1732 1729
1733 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime, int commitNumber) 1730 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime, int commitNumber)
1734 { 1731 {
1735 DCHECK(m_debugState.continuousPainting); 1732 DCHECK(m_debugState.continuousPainting);
1736 m_paintTimeCounter->SavePaintTime(totalPaintTime, commitNumber); 1733 m_paintTimeCounter->SavePaintTime(totalPaintTime, commitNumber);
1737 } 1734 }
1738 1735
1739 } // namespace cc 1736 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698