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

Unified Diff: ui/compositor/layer.cc

Issue 23701005: Fix cc::Layer debug name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index f5bf42c25670137fc990645f4a41b0e277428a29..c464ed733d9ca6baaffe4792b7bc6fb50be45df2 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -444,6 +444,7 @@ void Layer::SwitchToLayer(scoped_refptr<cc::Layer> new_layer) {
DCHECK(parent_->cc_layer_);
parent_->cc_layer_->ReplaceChild(cc_layer_, new_layer);
}
+ cc_layer_->SetLayerClient(NULL);
cc_layer_->RemoveLayerAnimationEventObserver(this);
new_layer->SetOpacity(cc_layer_->opacity());
new_layer->SetTransform(cc_layer_->transform());
@@ -460,6 +461,7 @@ void Layer::SwitchToLayer(scoped_refptr<cc::Layer> new_layer) {
DCHECK(children_[i]->cc_layer_);
cc_layer_->AddChild(children_[i]->cc_layer_);
}
+ cc_layer_->SetLayerClient(this);
cc_layer_->SetAnchorPoint(gfx::PointF());
cc_layer_->SetContentsOpaque(fills_bounds_opaquely_);
cc_layer_->SetForceRenderSurface(force_render_surface_);
@@ -675,6 +677,10 @@ void Layer::SetForceRenderSurface(bool force) {
cc_layer_->SetForceRenderSurface(force_render_surface_);
}
+std::string Layer::DebugName() {
+ return name_;
+}
+
void Layer::OnAnimationStarted(const cc::AnimationEvent& event) {
if (animator_.get())
animator_->OnThreadedAnimationStarted(event);
@@ -917,6 +923,7 @@ void Layer::CreateWebLayer() {
cc_layer_->SetContentsOpaque(true);
cc_layer_->SetIsDrawable(type_ != LAYER_NOT_DRAWN);
cc_layer_->AddLayerAnimationEventObserver(this);
+ cc_layer_->SetLayerClient(this);
RecomputePosition();
}
« no previous file with comments | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698