Index: ui/compositor/layer.cc |
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
index 7b752f79464e4975086f480757c27adea91d553b..d6b2257f270d3c7a2f57172814ad2e4d599a2d7c 100644 |
--- a/ui/compositor/layer.cc |
+++ b/ui/compositor/layer.cc |
@@ -371,14 +371,10 @@ void Layer::SetExternalTexture(Texture* texture) { |
WebKit::WebLayer new_layer; |
if (layer_updated_externally_) { |
WebKit::WebExternalTextureLayer texture_layer = |
- WebKit::WebExternalTextureLayer::create(this); |
+ WebKit::WebExternalTextureLayer::create(); |
texture_layer.setFlipped(texture_->flipped()); |
new_layer = texture_layer; |
} else { |
- // Tell the compositor to clear references to the old texture. |
- WebKit::WebExternalTextureLayer texture_layer = |
- web_layer_.to<WebKit::WebExternalTextureLayer>(); |
- texture_layer.willModifyTexture(); |
new_layer = WebKit::WebContentLayer::create(this); |
} |
if (parent_) { |
@@ -507,16 +503,6 @@ void Layer::paintContents(WebKit::WebCanvas* web_canvas, |
canvas->Restore(); |
} |
-unsigned Layer::prepareTexture(WebKit::WebTextureUpdater& /* updater */) { |
- DCHECK(layer_updated_externally_); |
- return texture_->texture_id(); |
-} |
- |
-WebKit::WebGraphicsContext3D* Layer::context() { |
- DCHECK(layer_updated_externally_); |
- return texture_->HostContext3D(); |
-} |
- |
void Layer::SetForceRenderSurface(bool force) { |
if (force_render_surface_ == force) |
return; |
@@ -741,8 +727,10 @@ void Layer::RecomputeDrawsContentAndUVRect() { |
web_layer_.setBounds(ConvertSizeToPixel(this, bounds_.size())); |
} else { |
DCHECK(texture_); |
+ unsigned int texture_id = texture_->texture_id(); |
WebKit::WebExternalTextureLayer texture_layer = |
web_layer_.to<WebKit::WebExternalTextureLayer>(); |
+ texture_layer.setTextureId(should_draw ? texture_id : 0); |
gfx::Size texture_size; |
if (scale_content_) |