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

Unified Diff: cc/trees/thread_proxy.cc

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index e6ab017d37e221a5235d82502a341c22aa1bc35c..73bf79e5f4eb6d3f6b8a4979187b99aa642c7120 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -215,16 +215,10 @@ void ThreadProxy::RequestNewOutputSurface() {
}
void ThreadProxy::SetOutputSurface(scoped_ptr<OutputSurface> output_surface) {
- if (output_surface) {
- Proxy::ImplThreadTaskRunner()->PostTask(
- FROM_HERE,
- base::Bind(&ThreadProxy::InitializeOutputSurfaceOnImplThread,
- impl_thread_weak_ptr_,
- base::Passed(&output_surface)));
- return;
- }
-
- DidInitializeOutputSurface(false, RendererCapabilities());
+ Proxy::ImplThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ThreadProxy::InitializeOutputSurfaceOnImplThread,
+ impl_thread_weak_ptr_, base::Passed(&output_surface)));
}
void ThreadProxy::DidInitializeOutputSurface(
@@ -232,15 +226,13 @@ void ThreadProxy::DidInitializeOutputSurface(
const RendererCapabilities& capabilities) {
TRACE_EVENT0("cc", "ThreadProxy::DidInitializeOutputSurface");
DCHECK(IsMainThread());
- main().renderer_capabilities_main_thread_copy = capabilities;
- layer_tree_host()->OnCreateAndInitializeOutputSurfaceAttempted(success);
if (!success) {
- Proxy::MainThreadTaskRunner()->PostTask(
- FROM_HERE,
- base::Bind(&ThreadProxy::RequestNewOutputSurface,
- main_thread_weak_ptr_));
+ layer_tree_host()->DidFailToInitializeOutputSurface();
+ return;
}
+ main().renderer_capabilities_main_thread_copy = capabilities;
+ layer_tree_host()->DidInitializeOutputSurface();
}
void ThreadProxy::SetRendererCapabilitiesMainThreadCopy(
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698