Index: Source/platform/graphics/Image.cpp |
diff --git a/Source/platform/graphics/Image.cpp b/Source/platform/graphics/Image.cpp |
index 2d274af5828b2d4a593edc3a43222a21668acfa5..5d2d29e15a81bbe023a1bdb1ffa44ff67edc8327 100644 |
--- a/Source/platform/graphics/Image.cpp |
+++ b/Source/platform/graphics/Image.cpp |
@@ -39,6 +39,7 @@ |
#include "platform/graphics/BitmapImage.h" |
#include "platform/graphics/DeferredImageDecoder.h" |
#include "platform/graphics/GraphicsContext.h" |
+#include "platform/weborigin/KURL.h" |
#include "public/platform/Platform.h" |
#include "public/platform/WebData.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
@@ -96,7 +97,8 @@ bool Image::setData(PassRefPtr<SharedBuffer> data, bool allDataReceived) |
return dataChanged(allDataReceived); |
} |
-void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, SkXfermode::Mode op, const IntSize& repeatSpacing) |
+void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, |
+ const KURL& url, SkXfermode::Mode op, const IntSize& repeatSpacing) |
{ |
FloatSize intrinsicTileSize = size(); |
if (hasRelativeWidth()) |
@@ -120,19 +122,19 @@ 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()); |
- ctxt->drawImage(this, destRect, visibleSrcRect, op, DoNotRespectImageOrientation); |
+ ctxt->drawImage(this, destRect, visibleSrcRect, url, op, DoNotRespectImageOrientation); |
return; |
} |
FloatRect tileRect(FloatPoint(), intrinsicTileSize); |
- drawPattern(ctxt, tileRect, scale, oneTileRect.location(), op, destRect, repeatSpacing); |
+ drawPattern(ctxt, tileRect, scale, oneTileRect.location(), url, op, destRect, repeatSpacing); |
startAnimation(); |
} |
// FIXME: Merge with the other drawTiled eventually, since we need a combination of both for some things. |
void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, |
- const FloatSize& providedTileScaleFactor, TileRule hRule, TileRule vRule, SkXfermode::Mode op) |
+ const FloatSize& providedTileScaleFactor, const KURL& url, TileRule hRule, TileRule vRule, SkXfermode::Mode op) |
{ |
// FIXME: We do not support 'space' yet. For now just map it to 'repeat'. |
if (hRule == SpaceTile) |
@@ -175,10 +177,10 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const Flo |
if (useLowInterpolationQuality) { |
InterpolationQuality previousInterpolationQuality = ctxt->imageInterpolationQuality(); |
ctxt->setImageInterpolationQuality(InterpolationLow); |
- drawPattern(ctxt, srcRect, tileScaleFactor, patternPhase, op, dstRect); |
+ drawPattern(ctxt, srcRect, tileScaleFactor, patternPhase, KURL(), op, dstRect); // TODO(davve): empty url |
ctxt->setImageInterpolationQuality(previousInterpolationQuality); |
} else { |
- drawPattern(ctxt, srcRect, tileScaleFactor, patternPhase, op, dstRect); |
+ drawPattern(ctxt, srcRect, tileScaleFactor, patternPhase, KURL(), op, dstRect); // TODO(davve): empty url |
} |
startAnimation(); |
@@ -210,7 +212,7 @@ PassRefPtr<SkShader> createPatternShader(const SkImage* image, const SkMatrix& s |
} // anonymous namespace |
void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect, const FloatSize& scale, |
- const FloatPoint& phase, SkXfermode::Mode compositeOp, const FloatRect& destRect, const IntSize& repeatSpacing) |
+ const FloatPoint& phase, const KURL& url, SkXfermode::Mode compositeOp, const FloatRect& destRect, const IntSize& repeatSpacing) |
{ |
TRACE_EVENT0("skia", "Image::drawPattern"); |