| 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 821e926b920292a78c772e4541580b97678b260e..6e9bfe2e66eab5c8f425dfd53826f6d3eca69897 100644
|
| --- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| @@ -304,12 +304,18 @@ PassRefPtr<SkImage> SVGImage::imageForCurrentFrameForContainer(const KURL& url,
|
| if (!m_page)
|
| return nullptr;
|
|
|
| + const FloatRect containerRect(FloatPoint(), containerSize);
|
| +
|
| SkPictureRecorder recorder;
|
| - SkCanvas* canvas = recorder.beginRecording(width(), height());
|
| - drawForContainer(canvas, SkPaint(), containerSize, 1, rect(), rect(), url);
|
| + SkCanvas* canvas = recorder.beginRecording(containerRect);
|
| + drawForContainer(canvas, SkPaint(), containerSize, 1, containerRect, containerRect, url);
|
|
|
| + const IntSize imageSize = roundedIntSize(containerSize);
|
| + const SkMatrix residualScale = SkMatrix::MakeScale(
|
| + static_cast<float>(imageSize.width()) / containerSize.width(),
|
| + static_cast<float>(imageSize.height()) / containerSize.height());
|
| return fromSkSp(SkImage::MakeFromPicture(recorder.finishRecordingAsPicture(),
|
| - SkISize::Make(width(), height()), nullptr, nullptr));
|
| + SkISize::Make(imageSize.width(), imageSize.height()), &residualScale, nullptr));
|
| }
|
|
|
| static bool drawNeedsLayer(const SkPaint& paint)
|
|
|