| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index c808ade6c67d7d4b03393079858311bc3a3b3aeb..f45b2dec309b2376649ba13effee75811b8219d3 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -1546,8 +1546,8 @@ bool SkGpuDevice::filterImage(const SkImageFilter* filter, const SkBitmap& src,
|
| filter, ctx, result, offset);
|
| }
|
|
|
| -static bool wrap_as_bm(const SkImage* image, SkBitmap* bm) {
|
| - GrTexture* tex = as_IB(image)->getTexture();
|
| +static bool wrap_as_bm(GrContext* ctx, const SkImage* image, SkBitmap* bm) {
|
| + SkAutoTUnref<GrTexture> tex(as_IB(image)->asTextureRef(ctx, kUntiled_SkImageUsageType));
|
| if (tex) {
|
| GrWrapTextureInBitmap(tex, image->width(), image->height(), image->isOpaque(), bm);
|
| return true;
|
| @@ -1559,7 +1559,7 @@ static bool wrap_as_bm(const SkImage* image, SkBitmap* bm) {
|
| void SkGpuDevice::drawImage(const SkDraw& draw, const SkImage* image, SkScalar x, SkScalar y,
|
| const SkPaint& paint) {
|
| SkBitmap bm;
|
| - if (wrap_as_bm(image, &bm)) {
|
| + if (wrap_as_bm(this->context(), image, &bm)) {
|
| this->drawBitmap(draw, bm, SkMatrix::MakeTrans(x, y), paint);
|
| }
|
| }
|
| @@ -1568,7 +1568,7 @@ void SkGpuDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const
|
| const SkRect& dst, const SkPaint& paint,
|
| SkCanvas::SrcRectConstraint constraint) {
|
| SkBitmap bm;
|
| - if (wrap_as_bm(image, &bm)) {
|
| + if (wrap_as_bm(this->context(), image, &bm)) {
|
| this->drawBitmapRect(draw, bm, src, dst, paint, constraint);
|
| }
|
| }
|
|
|