Chromium Code Reviews| Index: ui/aura/window.cc |
| diff --git a/ui/aura/window.cc b/ui/aura/window.cc |
| index 84251126124a73826eba0e2902705ad7cd20139a..f43f0e0f3de19bd53bf84c386b400c2ea8342d4c 100644 |
| --- a/ui/aura/window.cc |
| +++ b/ui/aura/window.cc |
| @@ -144,14 +144,22 @@ ui::Layer* Window::RecreateLayer() { |
| return NULL; |
| old_layer->set_delegate(NULL); |
| - if (delegate_ && old_layer->external_texture()) |
| + scoped_refptr<ui::Texture> old_texture = old_layer->external_texture(); |
| + if (delegate_ && old_texture) |
| old_layer->SetExternalTexture(delegate_->CopyTexture()); |
| + |
| layer_ = new ui::Layer(old_layer->type()); |
| layer_owner_.reset(layer_); |
| layer_->SetVisible(old_layer->visible()); |
| layer_->set_scale_content(old_layer->scale_content()); |
| layer_->set_delegate(this); |
| layer_->SetMasksToBounds(old_layer->GetMasksToBounds()); |
| + // Move the original texture to the new layer if the old layer has a |
| + // texture and we could copy it into the old layer, |
| + // crbug.com/175211. |
| + if (delegate_ && old_texture) |
|
sky
2013/02/12 03:31:54
This code is also hit when maximizing. Does settin
oshima
2013/02/12 04:03:23
I tested (un)maximizing as well and it looks fine.
sky
2013/02/12 17:01:24
When you maximize/restore we change the size immed
|
| + layer_->SetExternalTexture(old_texture); |
| + |
| UpdateLayerName(name_); |
| layer_->SetFillsBoundsOpaquely(!transparent_); |
| // Install new layer as a sibling of the old layer, stacked on top of it. |