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

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: Mac browser compositor fixes Created 6 years, 5 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 void ThreadProxy::SetNextCommitWaitsForActivation() { 460 void ThreadProxy::SetNextCommitWaitsForActivation() {
461 DCHECK(IsMainThread()); 461 DCHECK(IsMainThread());
462 DCHECK(!blocked_main().main_thread_inside_commit); 462 DCHECK(!blocked_main().main_thread_inside_commit);
463 blocked_main().commit_waits_for_activation = true; 463 blocked_main().commit_waits_for_activation = true;
464 } 464 }
465 465
466 void ThreadProxy::SetDeferCommits(bool defer_commits) { 466 void ThreadProxy::SetDeferCommits(bool defer_commits) {
467 DCHECK(IsMainThread()); 467 DCHECK(IsMainThread());
468 DCHECK_NE(main().defer_commits, defer_commits); 468 if (main().defer_commits == defer_commits)
469 return;
470
469 main().defer_commits = defer_commits; 471 main().defer_commits = defer_commits;
470
471 if (main().defer_commits) 472 if (main().defer_commits)
472 TRACE_EVENT_ASYNC_BEGIN0("cc", "ThreadProxy::SetDeferCommits", this); 473 TRACE_EVENT_ASYNC_BEGIN0("cc", "ThreadProxy::SetDeferCommits", this);
473 else 474 else
474 TRACE_EVENT_ASYNC_END0("cc", "ThreadProxy::SetDeferCommits", this); 475 TRACE_EVENT_ASYNC_END0("cc", "ThreadProxy::SetDeferCommits", this);
475 476
476 if (!main().defer_commits && main().pending_deferred_commit) { 477 if (!main().defer_commits && main().pending_deferred_commit) {
477 Proxy::MainThreadTaskRunner()->PostTask( 478 Proxy::MainThreadTaskRunner()->PostTask(
478 FROM_HERE, 479 FROM_HERE,
479 base::Bind(&ThreadProxy::BeginMainFrame, 480 base::Bind(&ThreadProxy::BeginMainFrame,
480 main_thread_weak_ptr_, 481 main_thread_weak_ptr_,
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 1438
1438 impl().timing_history.DidActivateSyncTree(); 1439 impl().timing_history.DidActivateSyncTree();
1439 } 1440 }
1440 1441
1441 void ThreadProxy::DidManageTiles() { 1442 void ThreadProxy::DidManageTiles() {
1442 DCHECK(IsImplThread()); 1443 DCHECK(IsImplThread());
1443 impl().scheduler->DidManageTiles(); 1444 impl().scheduler->DidManageTiles();
1444 } 1445 }
1445 1446
1446 } // namespace cc 1447 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698