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

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

Issue 789503003: Remove SVGImage::drawPatternForContainer() tile workaround (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove suppressions Created 6 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index 23b77ddbd921f1cce331f6581f1286d794c695f1..51f24c138f05f4823295c78bfa0f434b5f7fa549 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -243,14 +243,11 @@ void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize
blink::WebBlendModeNormal);
RefPtr<Picture> tilePicture = recordingContext.endRecording();
- // FIXME: SkPictureShader ignores the picture offset - so we must compensate here.
- SkRect tileRect = SkRect::MakeXYWH(-spacedTile.x(), -spacedTile.y(),
- spacedTile.width(), spacedTile.height());
SkMatrix patternTransform;
patternTransform.setTranslate(phase.x() + spacedTile.x(), phase.y() + spacedTile.y());
RefPtr<SkShader> patternShader = adoptRef(SkShader::CreatePictureShader(
tilePicture.get(), SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode,
- &patternTransform, &tileRect));
+ &patternTransform, nullptr));
SkPaint paint;
paint.setShader(patternShader.get());
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698