| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |