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

Unified Diff: cc/blink/web_image_layer_impl.cc

Issue 1179653004: Remove non-impl-side painting as an option for blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removenoimplblink: . Created 5 years, 6 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 | « cc/blink/web_content_layer_impl.cc ('k') | cc/blink/web_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « cc/blink/web_content_layer_impl.cc ('k') | cc/blink/web_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698