| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 318 } |
| 319 | 319 |
| 320 void ThreadProxy::didVSync(base::TimeTicks frameTime) | 320 void ThreadProxy::didVSync(base::TimeTicks frameTime) |
| 321 { | 321 { |
| 322 DCHECK(isImplThread()); | 322 DCHECK(isImplThread()); |
| 323 TRACE_EVENT0("cc", "ThreadProxy::didVSync"); | 323 TRACE_EVENT0("cc", "ThreadProxy::didVSync"); |
| 324 if (m_vsyncClient) | 324 if (m_vsyncClient) |
| 325 m_vsyncClient->DidVSync(frameTime); | 325 m_vsyncClient->DidVSync(frameTime); |
| 326 } | 326 } |
| 327 | 327 |
| 328 void ThreadProxy::didReceiveLastInputEventForVSync() |
| 329 { |
| 330 DCHECK(isImplThread()); |
| 331 TRACE_EVENT0("cc", "ThreadProxy::didReceiveLastInputEventForVSync"); |
| 332 if (m_vsyncClient) |
| 333 m_vsyncClient->DidReceiveLastInputEventForVSync(); |
| 334 } |
| 335 |
| 328 void ThreadProxy::onCanDrawStateChanged(bool canDraw) | 336 void ThreadProxy::onCanDrawStateChanged(bool canDraw) |
| 329 { | 337 { |
| 330 DCHECK(isImplThread()); | 338 DCHECK(isImplThread()); |
| 331 TRACE_EVENT1("cc", "ThreadProxy::onCanDrawStateChanged", "canDraw", canDraw)
; | 339 TRACE_EVENT1("cc", "ThreadProxy::onCanDrawStateChanged", "canDraw", canDraw)
; |
| 332 m_schedulerOnImplThread->setCanDraw(canDraw); | 340 m_schedulerOnImplThread->setCanDraw(canDraw); |
| 333 } | 341 } |
| 334 | 342 |
| 335 void ThreadProxy::onHasPendingTreeStateChanged(bool hasPendingTree) | 343 void ThreadProxy::onHasPendingTreeStateChanged(bool hasPendingTree) |
| 336 { | 344 { |
| 337 DCHECK(isImplThread()); | 345 DCHECK(isImplThread()); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 } | 1066 } |
| 1059 | 1067 |
| 1060 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia::
RefPtr<SkPicture>* picture) | 1068 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia::
RefPtr<SkPicture>* picture) |
| 1061 { | 1069 { |
| 1062 DCHECK(isImplThread()); | 1070 DCHECK(isImplThread()); |
| 1063 *picture = m_layerTreeHostImpl->capturePicture(); | 1071 *picture = m_layerTreeHostImpl->capturePicture(); |
| 1064 completion->signal(); | 1072 completion->signal(); |
| 1065 } | 1073 } |
| 1066 | 1074 |
| 1067 } // namespace cc | 1075 } // namespace cc |
| OLD | NEW |