Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 5972a9f8303986a65849be5b35357767753d8066..6dc3096b5985c89beda940cda6739805696ac50c 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -67,6 +67,18 @@ RendererCapabilities::RendererCapabilities() |
RendererCapabilities::~RendererCapabilities() {} |
+bool RendererCapabilities::operator==(const RendererCapabilities& other) const { |
+ return best_texture_format == other.best_texture_format && |
+ allow_partial_texture_updates == other.allow_partial_texture_updates && |
+ using_offscreen_context3d == other.using_offscreen_context3d && |
+ max_texture_size == other.max_texture_size && |
+ using_shared_memory_resources == other.using_shared_memory_resources; |
+} |
+ |
+bool RendererCapabilities::operator!=(const RendererCapabilities& other) const { |
+ return !(*this == other); |
+} |
+ |
scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded( |
LayerTreeHostClient* client, |
SharedBitmapManager* manager, |
@@ -178,10 +190,18 @@ 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 +220,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; |
} |