| Index: Source/platform/graphics/Image.cpp
|
| diff --git a/Source/platform/graphics/Image.cpp b/Source/platform/graphics/Image.cpp
|
| index 960d338fd2521df74be573fbb4ebe0499f5d3da8..a61f77f59d8d58d0244fd232bb19a898e791cd61 100644
|
| --- a/Source/platform/graphics/Image.cpp
|
| +++ b/Source/platform/graphics/Image.cpp
|
| @@ -153,7 +153,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;
|
| }
|
|
|
| @@ -279,20 +279,20 @@ void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect,
|
| SkBitmap bitmapToPaint;
|
| bitmap.extractSubset(&bitmapToPaint, enclosingIntRect(normSrcRect));
|
|
|
| - 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.setColor(SK_ColorBLACK);
|
| + paint.setXfermodeMode(compositeOp);
|
| + GraphicsContextImageFilterQualityHelper filterHelper(context);
|
| + paint.setFilterQuality(filterHelper.computeFilterQuality(this, destRect, normSrcRect));
|
| + paint.setAntiAlias(filterHelper.shouldDrawAntiAliased(destRect));
|
| RefPtr<SkShader> shader = createPatternShader(bitmapToPaint, localMatrix, paint,
|
| FloatSize(repeatSpacing.width() / scale.width(), repeatSpacing.height() / scale.height()));
|
| -
|
| paint.setShader(shader.get());
|
| context->drawRect(destRect, paint);
|
| - context->canvas()->restoreToCount(initialSaveCount);
|
| }
|
|
|
| - if (isLazyDecoded)
|
| + if (DeferredImageDecoder::isLazyDecoded(bitmap))
|
| PlatformInstrumentation::didDrawLazyPixelRef(bitmap.getGenerationID());
|
| }
|
|
|
|
|