summaryrefslogtreecommitdiffstats
path: root/ui/compositor
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 18:52:09 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 18:52:09 +0000
commit40bc30993f055407aec84048f2f048924f900dbe (patch)
tree5c5c11e0f6967b757f1af7bcbb7fab9c06b2e5fe /ui/compositor
parent7ba4ac11d65d849c979ddd52fc3e3b235c732c5b (diff)
downloadchromium_src-40bc30993f055407aec84048f2f048924f900dbe.zip
chromium_src-40bc30993f055407aec84048f2f048924f900dbe.tar.gz
chromium_src-40bc30993f055407aec84048f2f048924f900dbe.tar.bz2
Aura: Keep the external texture until we've updated compositor references to it.
BUG=170229 TEST=by hand as per repro on bug Review URL: https://codereview.chromium.org/13972011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/compositor')
-rw-r--r--ui/compositor/layer.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 9bb17da..c96ac53 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -487,6 +487,10 @@ void Layer::SwitchCCLayerForTest() {
}
void Layer::SetExternalTexture(Texture* texture) {
+ // Hold a ref to the old |Texture| until we have updated all
+ // compositor references to the texture id that it holds.
+ scoped_refptr<ui::Texture> old_texture = texture_;
+
DCHECK_EQ(type_, LAYER_TEXTURED);
DCHECK(!solid_color_layer_);
bool has_texture = !!texture;