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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 606113003: Revert of Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 97b06bc4894f892b1c2ba80b5aadf3500052d9c9..0e8c81c83d4e86c0ea2764ca1b535f77ae49f175 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -107,16 +107,15 @@
UpdateBackgroundAnimateTicking();
}
-void SingleThreadProxy::RequestNewOutputSurface() {
+void SingleThreadProxy::CreateAndInitializeOutputSurface() {
+ TRACE_EVENT0(
+ "cc", "SingleThreadProxy::CreateAndInitializeOutputSurface");
DCHECK(Proxy::IsMainThread());
DCHECK(layer_tree_host_->output_surface_lost());
- layer_tree_host_->RequestNewOutputSurface();
-}
-
-void SingleThreadProxy::SetOutputSurface(
- scoped_ptr<OutputSurface> output_surface) {
- DCHECK(Proxy::IsMainThread());
- DCHECK(layer_tree_host_->output_surface_lost());
+
+ scoped_ptr<OutputSurface> output_surface =
+ layer_tree_host_->CreateOutputSurface();
+
renderer_capabilities_for_main_thread_ = RendererCapabilities();
bool success = !!output_surface;
@@ -136,7 +135,7 @@
} else if (Proxy::MainThreadTaskRunner()) {
MainThreadTaskRunner()->PostTask(
FROM_HERE,
- base::Bind(&SingleThreadProxy::RequestNewOutputSurface,
+ base::Bind(&SingleThreadProxy::CreateAndInitializeOutputSurface,
weak_factory_.GetWeakPtr()));
}
}
@@ -665,10 +664,10 @@
if (Proxy::MainThreadTaskRunner()) {
MainThreadTaskRunner()->PostTask(
FROM_HERE,
- base::Bind(&SingleThreadProxy::RequestNewOutputSurface,
+ base::Bind(&SingleThreadProxy::CreateAndInitializeOutputSurface,
weak_factory_.GetWeakPtr()));
} else {
- RequestNewOutputSurface();
+ CreateAndInitializeOutputSurface();
}
}
« 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