| Index: Source/platform/graphics/GraphicsContext.cpp
|
| diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
|
| index 9f62b29a780eb6f06ee663c9839aeaec46aa7def..6abe21495fcb98ab816c019efaf7ee542d297120 100644
|
| --- a/Source/platform/graphics/GraphicsContext.cpp
|
| +++ b/Source/platform/graphics/GraphicsContext.cpp
|
| @@ -1027,16 +1027,16 @@ void GraphicsContext::drawImage(Image* image, const IntPoint& p, CompositeOperat
|
| drawImage(image, FloatRect(IntRect(p, image->size())), FloatRect(FloatPoint(), FloatSize(image->size())), op, shouldRespectImageOrientation);
|
| }
|
|
|
| -void GraphicsContext::drawImage(Image* image, const IntRect& r, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale)
|
| +void GraphicsContext::drawImage(Image* image, const IntRect& r, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation)
|
| {
|
| if (!image)
|
| return;
|
| - drawImage(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), op, shouldRespectImageOrientation, useLowQualityScale);
|
| + drawImage(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), op, shouldRespectImageOrientation);
|
| }
|
|
|
| -void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const FloatRect& src, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale)
|
| +void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const FloatRect& src, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation)
|
| {
|
| - drawImage(image, dest, src, op, blink::WebBlendModeNormal, shouldRespectImageOrientation, useLowQualityScale);
|
| + drawImage(image, dest, src, op, blink::WebBlendModeNormal, shouldRespectImageOrientation);
|
| }
|
|
|
| void GraphicsContext::drawImage(Image* image, const FloatRect& dest)
|
| @@ -1046,40 +1046,22 @@ void GraphicsContext::drawImage(Image* image, const FloatRect& dest)
|
| drawImage(image, dest, FloatRect(IntRect(IntPoint(), image->size())));
|
| }
|
|
|
| -void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale)
|
| -{ if (paintingDisabled() || !image)
|
| +void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode, RespectImageOrientationEnum shouldRespectImageOrientation)
|
| +{
|
| + if (paintingDisabled() || !image)
|
| return;
|
| -
|
| - InterpolationQuality previousInterpolationQuality = InterpolationDefault;
|
| -
|
| - if (useLowQualityScale) {
|
| - previousInterpolationQuality = imageInterpolationQuality();
|
| - setImageInterpolationQuality(InterpolationLow);
|
| - }
|
| -
|
| image->draw(this, dest, src, op, blendMode, shouldRespectImageOrientation);
|
| -
|
| - if (useLowQualityScale)
|
| - setImageInterpolationQuality(previousInterpolationQuality);
|
| }
|
|
|
| -void GraphicsContext::drawTiledImage(Image* image, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, bool useLowQualityScale, WebBlendMode blendMode, const IntSize& repeatSpacing)
|
| +void GraphicsContext::drawTiledImage(Image* image, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, WebBlendMode blendMode, const IntSize& repeatSpacing)
|
| {
|
| if (paintingDisabled() || !image)
|
| return;
|
| -
|
| - if (useLowQualityScale) {
|
| - InterpolationQuality previousInterpolationQuality = imageInterpolationQuality();
|
| - setImageInterpolationQuality(InterpolationLow);
|
| - image->drawTiled(this, destRect, srcPoint, tileSize, op, blendMode, repeatSpacing);
|
| - setImageInterpolationQuality(previousInterpolationQuality);
|
| - } else {
|
| - image->drawTiled(this, destRect, srcPoint, tileSize, op, blendMode, repeatSpacing);
|
| - }
|
| + image->drawTiled(this, destRect, srcPoint, tileSize, op, blendMode, repeatSpacing);
|
| }
|
|
|
| void GraphicsContext::drawTiledImage(Image* image, const IntRect& dest, const IntRect& srcRect,
|
| - const FloatSize& tileScaleFactor, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op, bool useLowQualityScale)
|
| + const FloatSize& tileScaleFactor, Image::TileRule hRule, Image::TileRule vRule, CompositeOperator op)
|
| {
|
| if (paintingDisabled() || !image)
|
| return;
|
| @@ -1090,14 +1072,7 @@ void GraphicsContext::drawTiledImage(Image* image, const IntRect& dest, const In
|
| return;
|
| }
|
|
|
| - if (useLowQualityScale) {
|
| - InterpolationQuality previousInterpolationQuality = imageInterpolationQuality();
|
| - setImageInterpolationQuality(InterpolationLow);
|
| - image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op);
|
| - setImageInterpolationQuality(previousInterpolationQuality);
|
| - } else {
|
| - image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op);
|
| - }
|
| + image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op);
|
| }
|
|
|
| void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntPoint& p, CompositeOperator op, WebBlendMode blendMode)
|
| @@ -1107,11 +1082,11 @@ void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntPoint& p, Com
|
| drawImageBuffer(image, FloatRect(IntRect(p, image->size())), FloatRect(FloatPoint(), FloatSize(image->size())), op, blendMode);
|
| }
|
|
|
| -void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntRect& r, CompositeOperator op, WebBlendMode blendMode, bool useLowQualityScale)
|
| +void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntRect& r, CompositeOperator op, WebBlendMode blendMode)
|
| {
|
| if (!image)
|
| return;
|
| - drawImageBuffer(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), op, blendMode, useLowQualityScale);
|
| + drawImageBuffer(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), op, blendMode);
|
| }
|
|
|
| void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op, WebBlendMode blendMode)
|
| @@ -1119,9 +1094,9 @@ void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntPoint& dest,
|
| drawImageBuffer(image, FloatRect(IntRect(dest, srcRect.size())), FloatRect(srcRect), op, blendMode);
|
| }
|
|
|
| -void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, WebBlendMode blendMode, bool useLowQualityScale)
|
| +void GraphicsContext::drawImageBuffer(ImageBuffer* image, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, WebBlendMode blendMode)
|
| {
|
| - drawImageBuffer(image, FloatRect(dest), FloatRect(srcRect), op, blendMode, useLowQualityScale);
|
| + drawImageBuffer(image, FloatRect(dest), FloatRect(srcRect), op, blendMode);
|
| }
|
|
|
| void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest)
|
| @@ -1131,19 +1106,11 @@ void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest)
|
| drawImageBuffer(image, dest, FloatRect(IntRect(IntPoint(), image->size())));
|
| }
|
|
|
| -void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode, bool useLowQualityScale)
|
| +void GraphicsContext::drawImageBuffer(ImageBuffer* image, const FloatRect& dest, const FloatRect& src, CompositeOperator op, WebBlendMode blendMode)
|
| {
|
| if (paintingDisabled() || !image)
|
| return;
|
| -
|
| - if (useLowQualityScale) {
|
| - InterpolationQuality previousInterpolationQuality = imageInterpolationQuality();
|
| - setImageInterpolationQuality(InterpolationLow);
|
| - image->draw(this, dest, src, op, blendMode, useLowQualityScale);
|
| - setImageInterpolationQuality(previousInterpolationQuality);
|
| - } else {
|
| - image->draw(this, dest, src, op, blendMode, useLowQualityScale);
|
| - }
|
| + image->draw(this, dest, src, op, blendMode);
|
| }
|
|
|
| void GraphicsContext::writePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes, int x, int y)
|
|
|