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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 151093005: cc: Update Main RendererCapabilities on DeferredInitialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with tests Created 6 years, 10 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
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 874296bfdf656653981a212b5fe96b4c9ad9e154..874c452ccb6610d180592459bf587e595fbe975e 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -178,10 +178,19 @@ void LayerTreeHost::SetLayerTreeHostClientReady() {
proxy_->SetLayerTreeHostClientReady();
}
-static void LayerTreeHostOnOutputSurfaceCreatedCallback(Layer* layer) {
+static void LayerTreeHostRendererCapabilitiesChanged(Layer* layer) {
+ // TODO(boliu): Rename this to Layer::RendererCapabilitiesChanged.
layer->OnOutputSurfaceCreated();
}
+void LayerTreeHost::RendererCapabilitiesChanged() {
+ if (root_layer()) {
+ LayerTreeHostCommon::CallFunctionForSubtree(
+ root_layer(),
+ base::Bind(&LayerTreeHostRendererCapabilitiesChanged));
+ }
+}
+
LayerTreeHost::CreateResult
LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
TRACE_EVENT1("cc",
@@ -200,12 +209,6 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
contents_texture_manager_->CreateTexture(gfx::Size(), RGBA_8888);
}
- if (root_layer()) {
- LayerTreeHostCommon::CallFunctionForSubtree(
- root_layer(),
- base::Bind(&LayerTreeHostOnOutputSurfaceCreatedCallback));
- }
-
client_->DidInitializeOutputSurface(true);
return CreateSucceeded;
}

Powered by Google App Engine
This is Rietveld 408576698