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

Unified Diff: cc/blink/web_image_layer_impl.cc

Issue 2835373003: Plumb PaintImage to the PictureImageLayer. (Closed)
Patch Set: update Created 3 years, 8 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_image_layer_impl.h ('k') | cc/layers/picture_image_layer.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 f9ab77718d85cce5ae3231250516b402bbc2fef6..7c965e79e71605ff3b3b44a125a55e67632b4c46 100644
--- a/cc/blink/web_image_layer_impl.cc
+++ b/cc/blink/web_image_layer_impl.cc
@@ -22,11 +22,12 @@ blink::WebLayer* WebImageLayerImpl::Layer() {
return layer_.get();
}
-void WebImageLayerImpl::SetImage(const SkImage* image) {
- static_cast<cc::PictureImageLayer*>(layer_->layer())
- ->SetImage(sk_ref_sp(image));
+void WebImageLayerImpl::SetImage(cc::PaintImage image) {
static_cast<WebLayerImplFixedBounds*>(layer_.get())
- ->SetFixedBounds(gfx::Size(image->width(), image->height()));
+ ->SetFixedBounds(
+ gfx::Size(image.sk_image()->width(), image.sk_image()->height()));
+ static_cast<cc::PictureImageLayer*>(layer_->layer())
+ ->SetImage(std::move(image));
}
void WebImageLayerImpl::SetNearestNeighbor(bool nearest_neighbor) {
« no previous file with comments | « cc/blink/web_image_layer_impl.h ('k') | cc/layers/picture_image_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698