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

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

Issue 1131633003: cc: Use multiple PrepareTiles approaches Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('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/trees/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/debug/benchmark_instrumentation.h" 10 #include "cc/debug/benchmark_instrumentation.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 scheduler_on_impl_thread_->NotifyReadyToActivate(); 429 scheduler_on_impl_thread_->NotifyReadyToActivate();
430 } 430 }
431 431
432 void SingleThreadProxy::NotifyReadyToDraw() { 432 void SingleThreadProxy::NotifyReadyToDraw() {
433 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToDraw"); 433 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToDraw");
434 DebugScopedSetImplThread impl(this); 434 DebugScopedSetImplThread impl(this);
435 if (scheduler_on_impl_thread_) 435 if (scheduler_on_impl_thread_)
436 scheduler_on_impl_thread_->NotifyReadyToDraw(); 436 scheduler_on_impl_thread_->NotifyReadyToDraw();
437 } 437 }
438 438
439 void SingleThreadProxy::SetRequiresHighResToDraw(bool required) {
440 if (scheduler_on_impl_thread_)
441 scheduler_on_impl_thread_->SetRequiresHighResToDraw(required);
442 }
443
439 void SingleThreadProxy::SetNeedsRedrawOnImplThread() { 444 void SingleThreadProxy::SetNeedsRedrawOnImplThread() {
440 client_->ScheduleComposite(); 445 client_->ScheduleComposite();
441 if (scheduler_on_impl_thread_) 446 if (scheduler_on_impl_thread_)
442 scheduler_on_impl_thread_->SetNeedsRedraw(); 447 scheduler_on_impl_thread_->SetNeedsRedraw();
443 } 448 }
444 449
445 void SingleThreadProxy::SetNeedsAnimateOnImplThread() { 450 void SingleThreadProxy::SetNeedsAnimateOnImplThread() {
446 client_->ScheduleComposite(); 451 client_->ScheduleComposite();
447 if (scheduler_on_impl_thread_) 452 if (scheduler_on_impl_thread_)
448 scheduler_on_impl_thread_->SetNeedsAnimate(); 453 scheduler_on_impl_thread_->SetNeedsAnimate();
449 } 454 }
450 455
451 void SingleThreadProxy::SetNeedsPrepareTilesOnImplThread() { 456 void SingleThreadProxy::SetNeedsPrepareTilesOnImplThread(bool for_commit) {
452 TRACE_EVENT0("cc", "SingleThreadProxy::SetNeedsPrepareTilesOnImplThread"); 457 TRACE_EVENT0("cc", "SingleThreadProxy::SetNeedsPrepareTilesOnImplThread");
453 if (scheduler_on_impl_thread_) 458 if (scheduler_on_impl_thread_)
454 scheduler_on_impl_thread_->SetNeedsPrepareTiles(); 459 scheduler_on_impl_thread_->SetNeedsPrepareTiles(for_commit);
455 } 460 }
456 461
457 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread( 462 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(
458 const gfx::Rect& damage_rect) { 463 const gfx::Rect& damage_rect) {
459 layer_tree_host_impl_->SetViewportDamage(damage_rect); 464 layer_tree_host_impl_->SetViewportDamage(damage_rect);
460 SetNeedsRedrawOnImplThread(); 465 SetNeedsRedrawOnImplThread();
461 } 466 }
462 467
463 void SingleThreadProxy::SetNeedsCommitOnImplThread() { 468 void SingleThreadProxy::SetNeedsCommitOnImplThread() {
464 client_->ScheduleComposite(); 469 client_->ScheduleComposite();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 518
514 // Synchronously call to CommitComplete. Resetting 519 // Synchronously call to CommitComplete. Resetting
515 // |commit_blocking_task_runner| would make sure all tasks posted during 520 // |commit_blocking_task_runner| would make sure all tasks posted during
516 // commit/activation before CommitComplete. 521 // commit/activation before CommitComplete.
517 CommitComplete(); 522 CommitComplete();
518 } 523 }
519 524
520 timing_history_.DidActivateSyncTree(); 525 timing_history_.DidActivateSyncTree();
521 } 526 }
522 527
523 void SingleThreadProxy::DidPrepareTiles() {
524 DCHECK(layer_tree_host_impl_->settings().impl_side_painting);
525 DCHECK(Proxy::IsImplThread());
526 if (scheduler_on_impl_thread_)
527 scheduler_on_impl_thread_->DidPrepareTiles();
528 }
529
530 void SingleThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 528 void SingleThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
531 layer_tree_host_->DidCompletePageScaleAnimation(); 529 layer_tree_host_->DidCompletePageScaleAnimation();
532 } 530 }
533 531
534 void SingleThreadProxy::UpdateRendererCapabilitiesOnImplThread() { 532 void SingleThreadProxy::UpdateRendererCapabilitiesOnImplThread() {
535 DCHECK(IsImplThread()); 533 DCHECK(IsImplThread());
536 renderer_capabilities_for_main_thread_ = 534 renderer_capabilities_for_main_thread_ =
537 layer_tree_host_impl_->GetRendererCapabilities().MainThreadCapabilities(); 535 layer_tree_host_impl_->GetRendererCapabilities().MainThreadCapabilities();
538 } 536 }
539 537
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 << "DidFinishImplFrame called while not inside an impl frame!"; 992 << "DidFinishImplFrame called while not inside an impl frame!";
995 inside_impl_frame_ = false; 993 inside_impl_frame_ = false;
996 #endif 994 #endif
997 } 995 }
998 996
999 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 997 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
1000 layer_tree_host_->SendBeginFramesToChildren(args); 998 layer_tree_host_->SendBeginFramesToChildren(args);
1001 } 999 }
1002 1000
1003 } // namespace cc 1001 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698