| Index: Source/platform/graphics/skia/NativeImageSkia.cpp
|
| diff --git a/Source/platform/graphics/skia/NativeImageSkia.cpp b/Source/platform/graphics/skia/NativeImageSkia.cpp
|
| index 1952f6b951dfb05d047ef6497c1f33b34ea0c0c6..b2f56642eeff57398394b23b204af52dd0df838b 100644
|
| --- a/Source/platform/graphics/skia/NativeImageSkia.cpp
|
| +++ b/Source/platform/graphics/skia/NativeImageSkia.cpp
|
| @@ -258,14 +258,13 @@ void NativeImageSkia::drawPattern(
|
| localMatrix.setTranslate(SkFloatToScalar(adjustedX), SkFloatToScalar(adjustedY));
|
|
|
| RefPtr<SkShader> shader;
|
| + SkPaint::FilterLevel filterLevel = static_cast<SkPaint::FilterLevel>(resampling);
|
|
|
| // Bicubic filter is only applied to defer-decoded images, see
|
| // NativeImageSkia::draw for details.
|
| - bool useBicubicFilter = resampling == InterpolationHigh && isLazyDecoded;
|
| - bool isResampled = false;
|
| - if (resampling == InterpolationHigh && !useBicubicFilter) {
|
| + if (resampling == InterpolationHigh && !isLazyDecoded) {
|
| // Do nice resampling.
|
| - isResampled = true;
|
| + filterLevel = SkPaint::kNone_FilterLevel;
|
| float scaleX = destBitmapWidth / normSrcRect.width();
|
| float scaleY = destBitmapHeight / normSrcRect.height();
|
| SkRect scaledSrcRect;
|
| @@ -311,7 +310,7 @@ void NativeImageSkia::drawPattern(
|
| paint.setShader(shader.get());
|
| paint.setXfermode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode).get());
|
| paint.setColorFilter(context->colorFilter());
|
| - paint.setFilterLevel(isResampled ? SkPaint::kNone_FilterLevel : static_cast<SkPaint::FilterLevel>(resampling));
|
| + paint.setFilterLevel(filterLevel);
|
|
|
| if (isLazyDecoded)
|
| PlatformInstrumentation::didDrawLazyPixelRef(bitmap().getGenerationID());
|
|
|