Index: Source/platform/graphics/Image.cpp |
diff --git a/Source/platform/graphics/Image.cpp b/Source/platform/graphics/Image.cpp |
index f83616e1a7b407d797b1a4c8d1555d70d73611a1..f33021fe1c647355b4b3b293a08df9739b6d56ec 100644 |
--- a/Source/platform/graphics/Image.cpp |
+++ b/Source/platform/graphics/Image.cpp |
@@ -152,7 +152,7 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const Fl |
visibleSrcRect.setY((destRect.y() - oneTileRect.y()) / scale.height()); |
visibleSrcRect.setWidth(destRect.width() / scale.width()); |
visibleSrcRect.setHeight(destRect.height() / scale.height()); |
- draw(ctxt, destRect, visibleSrcRect, op, DoNotRespectImageOrientation); |
+ ctxt->drawImage(this, destRect, visibleSrcRect, op, DoNotRespectImageOrientation); |
return; |
} |
@@ -278,19 +278,17 @@ void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect, |
repeatSpacing.width() * ctmScaleX / scale.width(), |
repeatSpacing.height() * ctmScaleY / scale.height()); |
} |
- RefPtr<SkShader> shader = adoptRef(SkShader::CreateBitmapShader(bitmapToPaint, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix)); |
- bool isLazyDecoded = DeferredImageDecoder::isLazyDecoded(bitmap); |
{ |
- SkPaint paint; |
- int initialSaveCount = context->preparePaintForDrawRectToRect(&paint, floatSrcRect, |
- destRect, compositeOp, !bitmap.isOpaque(), isLazyDecoded, bitmap.isImmutable()); |
+ SkPaint paint = context->fillPaint(); |
+ paint.setXfermodeMode(compositeOp); |
+ paint.setFilterQuality(context->getFilterQuality(this, destRect, floatSrcRect)); |
+ RefPtr<SkShader> shader = adoptRef(SkShader::CreateBitmapShader(bitmapToPaint, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix)); |
paint.setShader(shader.get()); |
context->drawRect(destRect, paint); |
- context->canvas()->restoreToCount(initialSaveCount); |
} |
- if (isLazyDecoded) |
+ if (DeferredImageDecoder::isLazyDecoded(bitmap)) |
PlatformInstrumentation::didDrawLazyPixelRef(bitmap.getGenerationID()); |
} |