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

Unified Diff: cc/trees/thread_proxy.cc

Issue 199523002: cc: Throttle swaps in Scheduler instead of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index bf55546f6e31c5b5a9aba4b647e98a150ab3e78b..f29acd76e592493b64c91a5119afb43dfbdf43d9 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -435,9 +435,18 @@ void ThreadProxy::CheckOutputSurfaceStatusOnImplThread() {
impl().scheduler->DidLoseOutputSurface();
}
+void ThreadProxy::SetMaxSwapsPending(int max) {
+ impl().scheduler->SetMaxSwapsPending(max);
+}
+
+void ThreadProxy::DidSwapBuffersOnImplThread() {
+ impl().scheduler->DidSwapBuffers();
+}
+
void ThreadProxy::OnSwapBuffersCompleteOnImplThread() {
TRACE_EVENT0("cc", "ThreadProxy::OnSwapBuffersCompleteOnImplThread");
DCHECK(IsImplThread());
+ impl().scheduler->OnSwapBuffersComplete();
Proxy::MainThreadTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_));

Powered by Google App Engine
This is Rietveld 408576698