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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 256573003: cc: Remove the capability to give up and leave compositing mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 b5968fe43b86ffd990cc1a5cea50a511769b26e0..a70e08f970cd5b2dd298afdd908f0901d5fe1299 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -116,34 +116,21 @@ void SingleThreadProxy::CreateAndInitializeOutputSurface() {
scoped_ptr<OutputSurface> output_surface =
layer_tree_host_->CreateOutputSurface();
- if (!output_surface) {
- OnOutputSurfaceInitializeAttempted(false);
- return;
- }
- {
+ renderer_capabilities_for_main_thread_ = RendererCapabilities();
+
+ bool success = !!output_surface;
+ if (success) {
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
DebugScopedSetImplThread impl(this);
layer_tree_host_->DeleteContentsTexturesOnImplThread(
layer_tree_host_impl_->resource_provider());
+ success = layer_tree_host_impl_->InitializeRenderer(output_surface.Pass());
}
- bool initialized;
- {
- DebugScopedSetImplThread impl(this);
-
- DCHECK(output_surface);
- initialized = layer_tree_host_impl_->InitializeRenderer(
- output_surface.Pass());
- }
-
- OnOutputSurfaceInitializeAttempted(initialized);
-}
+ layer_tree_host_->OnCreateAndInitializeOutputSurfaceAttempted(success);
-void SingleThreadProxy::OnOutputSurfaceInitializeAttempted(bool success) {
- LayerTreeHost::CreateResult result =
- layer_tree_host_->OnCreateAndInitializeOutputSurfaceAttempted(success);
- if (result == LayerTreeHost::CreateFailedButTryAgain) {
+ if (!success) {
// Force another recreation attempt to happen by requesting another commit.
SetNeedsCommit();
}
« 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