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

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 1039533002: cc: Add support for sending BeginFrames for video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@misc_video_refactoring
Patch Set: Fix comment. Created 5 years, 8 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
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | 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/trees/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToDraw"); 394 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToDraw");
395 impl().scheduler->NotifyReadyToDraw(); 395 impl().scheduler->NotifyReadyToDraw();
396 } 396 }
397 397
398 void ThreadProxy::SetNeedsCommitOnImplThread() { 398 void ThreadProxy::SetNeedsCommitOnImplThread() {
399 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsCommitOnImplThread"); 399 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsCommitOnImplThread");
400 DCHECK(IsImplThread()); 400 DCHECK(IsImplThread());
401 impl().scheduler->SetNeedsCommit(); 401 impl().scheduler->SetNeedsCommit();
402 } 402 }
403 403
404 void ThreadProxy::SetVideoNeedsBeginFrames(bool needs_begin_frames) {
405 TRACE_EVENT1("cc", "ThreadProxy::SetVideoNeedsBeginFrames",
406 "needs_begin_frames", needs_begin_frames);
407 DCHECK(IsImplThread());
408 // In tests the layer tree is destroyed after the scheduler is.
409 if (impl().scheduler)
410 impl().scheduler->SetVideoNeedsBeginFrames(needs_begin_frames);
411 }
412
404 void ThreadProxy::PostAnimationEventsToMainThreadOnImplThread( 413 void ThreadProxy::PostAnimationEventsToMainThreadOnImplThread(
405 scoped_ptr<AnimationEventsVector> events) { 414 scoped_ptr<AnimationEventsVector> events) {
406 TRACE_EVENT0("cc", 415 TRACE_EVENT0("cc",
407 "ThreadProxy::PostAnimationEventsToMainThreadOnImplThread"); 416 "ThreadProxy::PostAnimationEventsToMainThreadOnImplThread");
408 DCHECK(IsImplThread()); 417 DCHECK(IsImplThread());
409 Proxy::MainThreadTaskRunner()->PostTask( 418 Proxy::MainThreadTaskRunner()->PostTask(
410 FROM_HERE, 419 FROM_HERE,
411 base::Bind(&ThreadProxy::SetAnimationEvents, 420 base::Bind(&ThreadProxy::SetAnimationEvents,
412 main_thread_weak_ptr_, 421 main_thread_weak_ptr_,
413 base::Passed(&events))); 422 base::Passed(&events)));
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1408 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1400 main_thread_weak_ptr_)); 1409 main_thread_weak_ptr_));
1401 } 1410 }
1402 1411
1403 void ThreadProxy::OnDrawForOutputSurface() { 1412 void ThreadProxy::OnDrawForOutputSurface() {
1404 DCHECK(IsImplThread()); 1413 DCHECK(IsImplThread());
1405 impl().scheduler->OnDrawForOutputSurface(); 1414 impl().scheduler->OnDrawForOutputSurface();
1406 } 1415 }
1407 1416
1408 } // namespace cc 1417 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698