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

Side by Side Diff: cc/thread_proxy.cc

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor input event changes Created 8 years 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 | Annotate | Revision Log
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/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/delay_based_time_source.h" 9 #include "cc/delay_based_time_source.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 } 839 }
840 840
841 void ThreadProxy::didCommitAndDrawFrame() 841 void ThreadProxy::didCommitAndDrawFrame()
842 { 842 {
843 DCHECK(isMainThread()); 843 DCHECK(isMainThread());
844 if (!m_layerTreeHost) 844 if (!m_layerTreeHost)
845 return; 845 return;
846 m_layerTreeHost->didCommitAndDrawFrame(); 846 m_layerTreeHost->didCommitAndDrawFrame();
847 } 847 }
848 848
849 void ThreadProxy::onReceivedLatencyInfo(const WebKit::WebLatencyInfoImpl& latenc yInfo)
850 {
851 DCHECK(isImplThread());
852 m_mainThreadProxy->postTask(FROM_HERE, base::Bind(&ThreadProxy::receivedLate ncyInfo, base::Unretained(this), latencyInfo));
853 }
854
855 void ThreadProxy::receivedLatencyInfo(const WebKit::WebLatencyInfoImpl& latencyI nfo)
856 {
857 DCHECK(isMainThread());
858 if (!m_layerTreeHost)
859 return;
860 m_layerTreeHost->onReceivedLatencyInfo(latencyInfo);
861 }
862
849 void ThreadProxy::didCompleteSwapBuffers() 863 void ThreadProxy::didCompleteSwapBuffers()
850 { 864 {
851 DCHECK(isMainThread()); 865 DCHECK(isMainThread());
852 if (!m_layerTreeHost) 866 if (!m_layerTreeHost)
853 return; 867 return;
854 m_layerTreeHost->didCompleteSwapBuffers(); 868 m_layerTreeHost->didCompleteSwapBuffers();
855 } 869 }
856 870
857 void ThreadProxy::setAnimationEvents(scoped_ptr<AnimationEventsVector> events, b ase::Time wallClockTime) 871 void ThreadProxy::setAnimationEvents(scoped_ptr<AnimationEventsVector> events, b ase::Time wallClockTime)
858 { 872 {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() 985 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState()
972 : memoryAllocationLimitBytes(0) 986 : memoryAllocationLimitBytes(0)
973 { 987 {
974 } 988 }
975 989
976 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() 990 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState()
977 { 991 {
978 } 992 }
979 993
980 } // namespace cc 994 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698