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

Side by Side Diff: cc/thread_proxy.cc

Issue 11854013: Use input events to improve vsync scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't set last-input-for-vsync bit on pages with touch handlers. 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
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « cc/thread_proxy.h ('k') | cc/vsync_time_source.h » ('j') | cc/vsync_time_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698