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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 years 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
Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
index a3c2663dd170da1662f00a76945eba4c4d9b6710..430607ee27c597cdd3c2c9159a7c3548b5db21b9 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -218,7 +218,7 @@ PassRefPtr<SkImage> SVGImage::imageForCurrentFrame()
return imageForCurrentFrameForContainer(KURL());
}
-void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize containerSize,
+void SVGImage::drawPatternForContainer(GraphicsContext& context, const FloatSize containerSize,
float zoom, const FloatRect& srcRect, const FloatSize& tileScale, const FloatPoint& phase,
SkXfermode::Mode compositeOp, const FloatRect& dstRect,
const FloatSize& repeatSpacing, const KURL& url)
@@ -231,7 +231,7 @@ void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize
FloatRect spacedTile(tile);
spacedTile.expand(FloatSize(repeatSpacing));
- SkPictureBuilder patternPicture(spacedTile, nullptr, context);
+ SkPictureBuilder patternPicture(spacedTile, nullptr, &context);
if (!DrawingRecorder::useCachedDrawingIfPossible(patternPicture.context(), *this, DisplayItem::Type::SVGImage)) {
DrawingRecorder patternPictureRecorder(patternPicture.context(), *this, DisplayItem::Type::SVGImage, spacedTile);
// When generating an expanded tile, make sure we don't draw into the spacing area.
@@ -251,8 +251,8 @@ void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize
SkPaint paint;
paint.setShader(patternShader.get());
paint.setXfermodeMode(compositeOp);
- paint.setColorFilter(context->colorFilter());
- context->drawRect(dstRect, paint);
+ paint.setColorFilter(context.colorFilter());
+ context.drawRect(dstRect, paint);
}
PassRefPtr<SkImage> SVGImage::imageForCurrentFrameForContainer(const KURL& url)

Powered by Google App Engine
This is Rietveld 408576698