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

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

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android working Created 6 years, 6 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/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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 } 466 }
467 467
468 void ThreadProxy::SetNextCommitWaitsForActivation() { 468 void ThreadProxy::SetNextCommitWaitsForActivation() {
469 DCHECK(IsMainThread()); 469 DCHECK(IsMainThread());
470 DCHECK(!blocked_main().main_thread_inside_commit); 470 DCHECK(!blocked_main().main_thread_inside_commit);
471 blocked_main().commit_waits_for_activation = true; 471 blocked_main().commit_waits_for_activation = true;
472 } 472 }
473 473
474 void ThreadProxy::SetDeferCommits(bool defer_commits) { 474 void ThreadProxy::SetDeferCommits(bool defer_commits) {
475 DCHECK(IsMainThread()); 475 DCHECK(IsMainThread());
476 DCHECK_NE(main().defer_commits, defer_commits); 476 if (main().defer_commits == defer_commits)
477 return;
478
477 main().defer_commits = defer_commits; 479 main().defer_commits = defer_commits;
478
479 if (main().defer_commits) 480 if (main().defer_commits)
480 TRACE_EVENT_ASYNC_BEGIN0("cc", "ThreadProxy::SetDeferCommits", this); 481 TRACE_EVENT_ASYNC_BEGIN0("cc", "ThreadProxy::SetDeferCommits", this);
481 else 482 else
482 TRACE_EVENT_ASYNC_END0("cc", "ThreadProxy::SetDeferCommits", this); 483 TRACE_EVENT_ASYNC_END0("cc", "ThreadProxy::SetDeferCommits", this);
483 484
484 if (!main().defer_commits && main().pending_deferred_commit) 485 if (!main().defer_commits && main().pending_deferred_commit)
485 Proxy::MainThreadTaskRunner()->PostTask( 486 Proxy::MainThreadTaskRunner()->PostTask(
486 FROM_HERE, 487 FROM_HERE,
487 base::Bind(&ThreadProxy::BeginMainFrame, 488 base::Bind(&ThreadProxy::BeginMainFrame,
488 main_thread_weak_ptr_, 489 main_thread_weak_ptr_,
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 1456
1456 impl().timing_history.DidActivatePendingTree(); 1457 impl().timing_history.DidActivatePendingTree();
1457 } 1458 }
1458 1459
1459 void ThreadProxy::DidManageTiles() { 1460 void ThreadProxy::DidManageTiles() {
1460 DCHECK(IsImplThread()); 1461 DCHECK(IsImplThread());
1461 impl().scheduler->DidManageTiles(); 1462 impl().scheduler->DidManageTiles();
1462 } 1463 }
1463 1464
1464 } // namespace cc 1465 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698