Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2771)

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 1334703002: NOT FOR LANDING Pass URL to Image::draw (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/platform/graphics/Image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 1a0ac7d6435a5fba7b84caffaa3ebfb94d754ec2..89a970d8da1bb5ead30af9b4c9187f22b423558d 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -871,14 +871,14 @@ void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run,
fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor);
}
-void GraphicsContext::drawImage(Image* image, const IntRect& r, SkXfermode::Mode op, RespectImageOrientationEnum shouldRespectImageOrientation)
+void GraphicsContext::drawImage(Image* image, const IntRect& r, const KURL& url, SkXfermode::Mode op, RespectImageOrientationEnum shouldRespectImageOrientation)
{
if (!image)
return;
- drawImage(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), op, shouldRespectImageOrientation);
+ drawImage(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), url, op, shouldRespectImageOrientation);
}
-void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const FloatRect& src, SkXfermode::Mode op, RespectImageOrientationEnum shouldRespectImageOrientation)
+void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const FloatRect& src, const KURL& url, SkXfermode::Mode op, RespectImageOrientationEnum shouldRespectImageOrientation)
{
if (contextDisabled() || !image)
return;
@@ -888,7 +888,7 @@ void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const Float
imagePaint.setColor(SK_ColorBLACK);
imagePaint.setFilterQuality(computeFilterQuality(image, dest, src));
imagePaint.setAntiAlias(shouldAntialias());
- image->draw(m_canvas, imagePaint, dest, src, shouldRespectImageOrientation, Image::ClampImageToSourceRect);
+ image->draw(m_canvas, imagePaint, dest, src, shouldRespectImageOrientation, Image::ClampImageToSourceRect, url);
}
SkFilterQuality GraphicsContext::computeFilterQuality(Image* image, const FloatRect& dest, const FloatRect& src) const
@@ -914,26 +914,26 @@ SkFilterQuality GraphicsContext::computeFilterQuality(Image* image, const FloatR
return static_cast<SkFilterQuality>(limitInterpolationQuality(this, resampling));
}
-void GraphicsContext::drawTiledImage(Image* image, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, SkXfermode::Mode op, const IntSize& repeatSpacing)
+void GraphicsContext::drawTiledImage(Image* image, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize, const KURL& url, SkXfermode::Mode op, const IntSize& repeatSpacing)
{
if (contextDisabled() || !image)
return;
- image->drawTiled(this, destRect, srcPoint, tileSize, op, repeatSpacing);
+ image->drawTiled(this, destRect, srcPoint, tileSize, url, op, repeatSpacing);
}
void GraphicsContext::drawTiledImage(Image* image, const IntRect& dest, const IntRect& srcRect,
- const FloatSize& tileScaleFactor, Image::TileRule hRule, Image::TileRule vRule, SkXfermode::Mode op)
+ const FloatSize& tileScaleFactor, const KURL& url, Image::TileRule hRule, Image::TileRule vRule, SkXfermode::Mode op)
{
if (contextDisabled() || !image)
return;
if (hRule == Image::StretchTile && vRule == Image::StretchTile) {
// Just do a scale.
- drawImage(image, dest, srcRect, op);
+ drawImage(image, dest, srcRect, url, op);
return;
}
- image->drawTiled(this, dest, srcRect, tileScaleFactor, hRule, vRule, op);
+ image->drawTiled(this, dest, srcRect, tileScaleFactor, url, hRule, vRule, op);
}
void GraphicsContext::drawOval(const SkRect& oval, const SkPaint& paint)
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698