Chromium Code Reviews| Index: src/core/SkImageFilter.cpp |
| diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
| index be48ca17ba101b231b7708af7ef7804bcef583f5..9373dc1a1d3cc5f28badce7355f32ef9cea59990 100644 |
| --- a/src/core/SkImageFilter.cpp |
| +++ b/src/core/SkImageFilter.cpp |
| @@ -348,9 +348,9 @@ bool SkImageFilter::applyCropRect(const Context& ctx, const SkIRect& srcBounds, |
| // around it. |
| static sk_sp<SkSpecialImage> pad_image(SkSpecialImage* src, |
| int newWidth, int newHeight, int offX, int offY) { |
|
robertphillips
2016/09/23 14:11:28
Although SpecialImages are inextricably tied to Im
|
| - |
| - SkImageInfo info = SkImageInfo::MakeN32Premul(newWidth, newHeight); |
| - sk_sp<SkSpecialSurface> surf(src->makeSurface(info)); |
| + // We explicitly want to operate in the source's color space here |
| + SkImageFilter::OutputProperties outProps(src->getColorSpace()); |
| + sk_sp<SkSpecialSurface> surf(src->makeSurface(outProps, SkISize::Make(newWidth, newHeight))); |
| if (!surf) { |
| return nullptr; |
| } |