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

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

Issue 448713002: Revert of Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 460
461 void ThreadProxy::SetNextCommitWaitsForActivation() { 461 void ThreadProxy::SetNextCommitWaitsForActivation() {
462 DCHECK(IsMainThread()); 462 DCHECK(IsMainThread());
463 DCHECK(!blocked_main().main_thread_inside_commit); 463 DCHECK(!blocked_main().main_thread_inside_commit);
464 blocked_main().commit_waits_for_activation = true; 464 blocked_main().commit_waits_for_activation = true;
465 } 465 }
466 466
467 void ThreadProxy::SetDeferCommits(bool defer_commits) { 467 void ThreadProxy::SetDeferCommits(bool defer_commits) {
468 DCHECK(IsMainThread()); 468 DCHECK(IsMainThread());
469 if (main().defer_commits == defer_commits) 469 DCHECK_NE(main().defer_commits, defer_commits);
470 return; 470 main().defer_commits = defer_commits;
471 471
472 main().defer_commits = defer_commits;
473 if (main().defer_commits) 472 if (main().defer_commits)
474 TRACE_EVENT_ASYNC_BEGIN0("cc", "ThreadProxy::SetDeferCommits", this); 473 TRACE_EVENT_ASYNC_BEGIN0("cc", "ThreadProxy::SetDeferCommits", this);
475 else 474 else
476 TRACE_EVENT_ASYNC_END0("cc", "ThreadProxy::SetDeferCommits", this); 475 TRACE_EVENT_ASYNC_END0("cc", "ThreadProxy::SetDeferCommits", this);
477 476
478 if (!main().defer_commits && main().pending_deferred_commit) { 477 if (!main().defer_commits && main().pending_deferred_commit) {
479 Proxy::MainThreadTaskRunner()->PostTask( 478 Proxy::MainThreadTaskRunner()->PostTask(
480 FROM_HERE, 479 FROM_HERE,
481 base::Bind(&ThreadProxy::BeginMainFrame, 480 base::Bind(&ThreadProxy::BeginMainFrame,
482 main_thread_weak_ptr_, 481 main_thread_weak_ptr_,
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 1413
1415 impl().timing_history.DidActivateSyncTree(); 1414 impl().timing_history.DidActivateSyncTree();
1416 } 1415 }
1417 1416
1418 void ThreadProxy::DidManageTiles() { 1417 void ThreadProxy::DidManageTiles() {
1419 DCHECK(IsImplThread()); 1418 DCHECK(IsImplThread());
1420 impl().scheduler->DidManageTiles(); 1419 impl().scheduler->DidManageTiles();
1421 } 1420 }
1422 1421
1423 } // namespace cc 1422 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698