aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Derek Sollenberger <djsollen@google.com>2017-08-11 14:18:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-11 20:14:10 +0000
commitdbb9e3682eaa330df10b112a4b0c7860ee34c20e (patch)
tree2129a2bc8905e3d86907ea22648be93d4d0eb3fe /src
parent528751873a8378bca27c51a6b08f0e5f3f041cc7 (diff)
Avoid converting drawImage/drawImageRect into drawBitmap calls
Change-Id: I1ae551afa93222126852bb9e429a565379a93f24 Reviewed-on: https://skia-review.googlesource.com/33661 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/SkGpuDevice.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 76352d0240..2d024b014b 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1317,7 +1317,9 @@ void SkGpuDevice::drawImage(const SkImage* image, SkScalar x, SkScalar y,
this->drawTextureProducer(&maker, nullptr, nullptr, SkCanvas::kFast_SrcRectConstraint,
viewMatrix, this->clip(), paint);
} else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->getColorSpace())) {
- this->drawBitmap(bm, x, y, paint);
+ GrBitmapTextureMaker maker(fContext.get(), bm);
+ this->drawTextureProducer(&maker, nullptr, nullptr, SkCanvas::kFast_SrcRectConstraint,
+ viewMatrix, this->clip(), paint);
}
}
}
@@ -1350,7 +1352,8 @@ void SkGpuDevice::drawImageRect(const SkImage* image, const SkRect* src,
GrImageTextureMaker maker(fContext.get(), image, SkImage::kAllow_CachingHint);
this->drawTextureProducer(&maker, src, &dst, constraint, this->ctm(), this->clip(), paint);
} else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->getColorSpace())) {
- this->drawBitmapRect(bm, src, dst, paint, constraint);
+ GrBitmapTextureMaker maker(fContext.get(), bm);
+ this->drawTextureProducer(&maker, src, &dst, constraint, this->ctm(), this->clip(), paint);
}
}