layer_->owner_ = this;
}
-Layer* LayerOwner::AcquireLayer() {
+scoped_ptr<Layer> LayerOwner::AcquireLayer() {
if (layer_owner_)
layer_owner_->owner_ = NULL;
- return layer_owner_.release();
+ return layer_owner_.Pass();
}
scoped_ptr<Layer> LayerOwner::RecreateLayer() {
const gfx::Rect layer_bounds(old_layer->bounds());
Layer* new_layer = new ui::Layer(old_layer->type());
SetLayer(new_layer);
- new_layer->SetVisible(old_layer->visible());
- new_layer->set_scale_content(old_layer->scale_content());
+ new_layer->SetVisible(old_layer->GetTargetVisibility());
+ new_layer->SetOpacity(old_layer->GetTargetOpacity());
new_layer->SetBounds(layer_bounds);
new_layer->SetMasksToBounds(old_layer->GetMasksToBounds());
new_layer->set_name(old_layer->name());
new_layer->SetFillsBoundsOpaquely(old_layer->fills_bounds_opaquely());
new_layer->SetFillsBoundsCompletely(old_layer->FillsBoundsCompletely());
+ new_layer->SetSubpixelPositionOffset(old_layer->subpixel_position_offset());
+ SkRegion* alpha_shape = old_layer->alpha_shape();
+ if (alpha_shape)
+ new_layer->SetAlphaShape(make_scoped_ptr(new SkRegion(*alpha_shape)));
// Install new layer as a sibling of the old layer, stacked below it.
if (old_layer->parent()) {