Commit 4b55c781 authored by oshima@chromium.org's avatar oshima@chromium.org

Set the original external texture to new layer when it's copied to the old layer.

Looks like this is a bug in https://codereview.chromium.org/10910242.

BUG=175211
TEST=manual. see bug

Review URL: https://chromiumcodereview.appspot.com/12211121

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181980 0039d316-1c4b-4281-b951-d872f2087c98
parent 10833355
......@@ -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)
layer_->SetExternalTexture(old_texture);
UpdateLayerName(name_);
layer_->SetFillsBoundsOpaquely(!transparent_);
// Install new layer as a sibling of the old layer, stacked on top of it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment