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

Unified Diff: cc/trees/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/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 4793cc5ecf5c27d3458a870230af7569bea5d5c0..af09466e40a55b917a031655df7b5044c739bdd0 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -214,16 +214,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(
@@ -231,15 +225,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(

Powered by Google App Engine
This is Rietveld 408576698