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

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: create cc::LatencyInfo Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/thread_proxy.h ('k') | content/browser/browser_plugin/browser_plugin_guest.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/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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 } 860 }
861 861
862 void ThreadProxy::didCommitAndDrawFrame() 862 void ThreadProxy::didCommitAndDrawFrame()
863 { 863 {
864 DCHECK(isMainThread()); 864 DCHECK(isMainThread());
865 if (!m_layerTreeHost) 865 if (!m_layerTreeHost)
866 return; 866 return;
867 m_layerTreeHost->didCommitAndDrawFrame(); 867 m_layerTreeHost->didCommitAndDrawFrame();
868 } 868 }
869 869
870 void ThreadProxy::onReceivedLatencyInfo(const LatencyInfo& latencyInfo)
871 {
872 DCHECK(isImplThread());
873 Proxy::mainThread()->postTask(base::Bind(&ThreadProxy::receivedLatencyInfo, base::Unretained(this), latencyInfo));
874 }
875
876 void ThreadProxy::receivedLatencyInfo(const LatencyInfo& latencyInfo)
877 {
878 DCHECK(isMainThread());
879 if (!m_layerTreeHost)
880 return;
881 m_layerTreeHost->onReceivedLatencyInfo(latencyInfo);
882 }
883
870 void ThreadProxy::didCompleteSwapBuffers() 884 void ThreadProxy::didCompleteSwapBuffers()
871 { 885 {
872 DCHECK(isMainThread()); 886 DCHECK(isMainThread());
873 if (!m_layerTreeHost) 887 if (!m_layerTreeHost)
874 return; 888 return;
875 m_layerTreeHost->didCompleteSwapBuffers(); 889 m_layerTreeHost->didCompleteSwapBuffers();
876 } 890 }
877 891
878 void ThreadProxy::setAnimationEvents(scoped_ptr<AnimationEventsVector> events, b ase::Time wallClockTime) 892 void ThreadProxy::setAnimationEvents(scoped_ptr<AnimationEventsVector> events, b ase::Time wallClockTime)
879 { 893 {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 } 1027 }
1014 1028
1015 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est) 1029 void ThreadProxy::commitPendingOnImplThreadForTesting(CommitPendingRequest* requ est)
1016 { 1030 {
1017 DCHECK(isImplThread()); 1031 DCHECK(isImplThread());
1018 request->commitPending = m_schedulerOnImplThread->commitPending(); 1032 request->commitPending = m_schedulerOnImplThread->commitPending();
1019 request->completion.signal(); 1033 request->completion.signal();
1020 } 1034 }
1021 1035
1022 } // namespace cc 1036 } // namespace cc
OLDNEW
« no previous file with comments | « cc/thread_proxy.h ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698