use gpu-image instead of wrapping in a bitmap for specialimage
BUG=skia:5531
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147023002
Review-Url: https://codereview.chromium.org/2147023002
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index 081b2a5..f903270 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -473,12 +473,11 @@
SkRect dst = SkRect::MakeXYWH(x, y,
this->subset().width(), this->subset().height());
- SkBitmap bm;
+ auto img = sk_sp<SkImage>(new SkImage_Gpu(fTexture->width(), fTexture->height(),
+ this->uniqueID(), fAlphaType, fTexture.get(),
+ SkBudgeted::kNo));
- GrWrapTextureInBitmap(fTexture.get(),
- fTexture->width(), fTexture->height(), this->isOpaque(), &bm);
-
- canvas->drawBitmapRect(bm, this->subset(),
+ canvas->drawImageRect(img, this->subset(),
dst, paint, SkCanvas::kStrict_SrcRectConstraint);
}