Index: cc/blink/web_image_layer_impl.cc |
diff --git a/cc/blink/web_image_layer_impl.cc b/cc/blink/web_image_layer_impl.cc |
index 1cc6e80d30c9dbd9976c0a817f3851d69765445a..d96bd7df78ccfe53befc795fdcaa873b26551b6a 100644 |
--- a/cc/blink/web_image_layer_impl.cc |
+++ b/cc/blink/web_image_layer_impl.cc |
@@ -12,12 +12,8 @@ |
namespace cc_blink { |
WebImageLayerImpl::WebImageLayerImpl() { |
- if (WebLayerImpl::UsingPictureLayer()) |
- layer_.reset(new WebLayerImplFixedBounds( |
- cc::PictureImageLayer::Create(WebLayerImpl::LayerSettings()))); |
- else |
- layer_.reset(new WebLayerImpl( |
- cc::ImageLayer::Create(WebLayerImpl::LayerSettings()))); |
+ layer_.reset(new WebLayerImplFixedBounds( |
+ cc::PictureImageLayer::Create(WebLayerImpl::LayerSettings()))); |
} |
WebImageLayerImpl::~WebImageLayerImpl() { |
@@ -28,20 +24,14 @@ blink::WebLayer* WebImageLayerImpl::layer() { |
} |
void WebImageLayerImpl::setImageBitmap(const SkBitmap& bitmap) { |
- if (WebLayerImpl::UsingPictureLayer()) { |
- static_cast<cc::PictureImageLayer*>(layer_->layer())->SetBitmap(bitmap); |
- static_cast<WebLayerImplFixedBounds*>(layer_.get()) |
- ->SetFixedBounds(gfx::Size(bitmap.width(), bitmap.height())); |
- } else { |
- static_cast<cc::ImageLayer*>(layer_->layer())->SetBitmap(bitmap); |
- } |
+ static_cast<cc::PictureImageLayer*>(layer_->layer())->SetBitmap(bitmap); |
+ static_cast<WebLayerImplFixedBounds*>(layer_.get()) |
+ ->SetFixedBounds(gfx::Size(bitmap.width(), bitmap.height())); |
} |
void WebImageLayerImpl::setNearestNeighbor(bool nearest_neighbor) { |
- if (WebLayerImpl::UsingPictureLayer()) { |
- static_cast<cc::PictureImageLayer*>(layer_->layer()) |
- ->SetNearestNeighbor(nearest_neighbor); |
- } |
+ static_cast<cc::PictureImageLayer*>(layer_->layer()) |
+ ->SetNearestNeighbor(nearest_neighbor); |
} |
} // namespace cc_blink |