Chromium Code Reviews| Index: src/core/SkImageFilter.cpp |
| diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
| index 46d9ee4b9b007c64de7452e88c45a6247293db95..d9b62e460643a34eb9c1585069bcbbc731a25ecf 100644 |
| --- a/src/core/SkImageFilter.cpp |
| +++ b/src/core/SkImageFilter.cpp |
| @@ -10,6 +10,7 @@ |
| #include "SkBitmap.h" |
| #include "SkFlattenableBuffers.h" |
| #include "SkRect.h" |
| +#include "SkValidationUtils.h" |
| #if SK_SUPPORT_GPU |
| #include "GrContext.h" |
| #include "GrTexture.h" |
| @@ -65,6 +66,9 @@ SkImageFilter::SkImageFilter(SkFlattenableReadBuffer& buffer) |
| buffer.readRect(&rect); |
| uint32_t flags = buffer.readUInt(); |
| fCropRect = CropRect(rect, flags); |
| + // Do not use SkIsValidRect() here, since width() and height() are allowed |
| + // to be larger than SK_MaxS32 in this specific case. Check inversion instead. |
|
Stephen White
2013/10/16 20:27:24
Actually, this should no longer be the case. The "
sugoi1
2013/10/17 15:20:39
Done.
|
| + buffer.validate(!rect.isInverted()); |
| } |
| void SkImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const { |