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

Unified Diff: ui/compositor/layer.cc

Issue 10827435: aura: Fix layer type change logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | 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 94caf4bd2a178e5357a50a6b00c905f6f7e2ab18..b1e8f8f347c3db271576e220d723717ea6d735af 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -409,8 +409,12 @@ void Layer::SetExternalTexture(Texture* texture) {
// Switch to a different type of layer.
#if defined(WEBLAYER_IS_PURE_VIRTUAL)
web_layer_->removeAllChildren();
- content_layer_.reset();
- solid_color_layer_.reset();
+ scoped_ptr<WebKit::WebContentLayer> old_content_layer(
+ content_layer_.release());
+ scoped_ptr<WebKit::WebSolidColorLayer> old_solid_layer(
+ solid_color_layer_.release());
+ scoped_ptr<WebKit::WebExternalTextureLayer> old_texture_layer(
+ texture_layer_.release());
WebKit::WebLayer* new_layer = NULL;
#else
web_layer_.removeAllChildren();
@@ -429,8 +433,6 @@ void Layer::SetExternalTexture(Texture* texture) {
#endif
} else {
#if defined(WEBLAYER_IS_PURE_VIRTUAL)
- texture_layer_.reset();
- solid_color_layer_.reset();
content_layer_.reset(WebKit::WebContentLayer::create(this));
new_layer = content_layer_->layer();
#else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698