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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 738983002: Move output surface fallback from cc to embedders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 9995a97098c85f1af15a7039390bb28cdbe93a72..284571fe2baa9086802c02a5d28ee85af08854f2 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -128,8 +128,8 @@ void SingleThreadProxy::SetOutputSurface(
output_surface_creation_requested_ = false;
renderer_capabilities_for_main_thread_ = RendererCapabilities();
- bool success = !!output_surface;
- if (success) {
+ bool success;
+ {
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
DebugScopedSetImplThread impl(this);
layer_tree_host_->DeleteContentsTexturesOnImplThread(
@@ -137,15 +137,14 @@ void SingleThreadProxy::SetOutputSurface(
success = layer_tree_host_impl_->InitializeRenderer(output_surface.Pass());
}
- layer_tree_host_->OnCreateAndInitializeOutputSurfaceAttempted(success);
-
if (success) {
+ layer_tree_host_->DidInitializeOutputSurface();
if (scheduler_on_impl_thread_)
scheduler_on_impl_thread_->DidCreateAndInitializeOutputSurface();
else if (!inside_synchronous_composite_)
SetNeedsCommit();
- } else if (Proxy::MainThreadTaskRunner()) {
- ScheduleRequestNewOutputSurface();
+ } else {
+ layer_tree_host_->DidFailToInitializeOutputSurface();
}
}

Powered by Google App Engine
This is Rietveld 408576698