Index: src/effects/SkTileImageFilter.cpp |
diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp |
index 46c4d9af678948db7513a34ecb9766213b984bbe..c098bc29550a8d7a185d23eba34f2678dfdbc80d 100644 |
--- a/src/effects/SkTileImageFilter.cpp |
+++ b/src/effects/SkTileImageFilter.cpp |
@@ -55,7 +55,9 @@ |
} |
const SkIRect dstIRect = dstRect.roundOut(); |
- if (!fSrcRect.width() || !fSrcRect.height() || !dstIRect.width() || !dstIRect.height()) { |
+ int dstWidth = dstIRect.width(); |
+ int dstHeight = dstIRect.height(); |
+ if (!fSrcRect.width() || !fSrcRect.height() || !dstWidth || !dstHeight) { |
return nullptr; |
} |
@@ -78,7 +80,9 @@ |
return nullptr; |
} |
} else { |
- sk_sp<SkSurface> surf(input->makeTightSurface(ctx.outputProperties(), srcIRect.size())); |
+ const SkImageInfo info = SkImageInfo::MakeN32(srcIRect.width(), srcIRect.height(), |
+ kPremul_SkAlphaType); |
+ sk_sp<SkSurface> surf(input->makeTightSurface(info)); |
if (!surf) { |
return nullptr; |
} |
@@ -98,7 +102,9 @@ |
SkASSERT(subset->width() == srcIRect.width()); |
SkASSERT(subset->height() == srcIRect.height()); |
- sk_sp<SkSpecialSurface> surf(source->makeSurface(ctx.outputProperties(), dstIRect.size())); |
+ const SkImageInfo info = SkImageInfo::MakeN32(dstWidth, dstHeight, kPremul_SkAlphaType); |
+ |
+ sk_sp<SkSpecialSurface> surf(source->makeSurface(info)); |
if (!surf) { |
return nullptr; |
} |