aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-07-13 12:24:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-13 12:24:48 -0700
commit77d6f7d0186a04233df0a56320cf5852bde493f4 (patch)
treedc2efc1ed299afe42f8badca5d0335100d7ecc3f
parent82945560e61f2996d2749b74359d219f56c92dda (diff)
use gpu-image instead of wrapping in a bitmap for specialimage
-rw-r--r--src/core/SkSpecialImage.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index 081b2a5b76..f903270dff 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -473,12 +473,11 @@ public:
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);
}