Pass sampling to drawImage

Bug: skia:7650
Change-Id: I78ea4ed5cfa06efa5ac174f7d9ef811a1b9a61bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361520
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2021-01-28 13:22:05 -05:00 committed by Skia Commit-Bot
parent 02bc52284d
commit 9ced5e6a3e
2 changed files with 2 additions and 5 deletions

View File

@ -95,10 +95,7 @@ protected:
SkCanvas* canvas, SkString*) override {
SkASSERT(fYCbCrImage);
SkPaint paint;
paint.setFilterQuality(kLow_SkFilterQuality);
canvas->drawImage(fYCbCrImage, kPad, kPad, &paint);
canvas->drawImage(fYCbCrImage, kPad, kPad, SkSamplingOptions(SkFilterMode::kLinear));
return DrawResult::kOk;
}

View File

@ -1113,7 +1113,7 @@ void SkScalerContext_DW::generatePngGlyphImage(const SkGlyph& glyph) {
SkScalar ratio = fTextSizeRender / glyphData.pixelsPerEm;
canvas.scale(ratio, ratio);
canvas.translate(-glyphData.horizontalLeftOrigin.x, -glyphData.horizontalLeftOrigin.y);
canvas.drawImage(image, 0, 0, nullptr);
canvas.drawImage(image, 0, 0);
}
void SkScalerContext_DW::generateImage(const SkGlyph& glyph) {