Chromium Code Reviews| Index: src/core/SkImageFilter.cpp |
| diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
| index 222a02999715b658862474098a2cf0216665ab57..40ad6730cf284e35d136c872d3eac561b6891487 100644 |
| --- a/src/core/SkImageFilter.cpp |
| +++ b/src/core/SkImageFilter.cpp |
| @@ -62,6 +62,15 @@ SkImageFilter::SkImageFilter(SkFlattenableReadBuffer& buffer) |
| } |
| } |
| buffer.readIRect(&fCropRect); |
| + |
| + if (!SkScalarIsFinite(fCropRect.fLeft) || |
|
reed1
2013/08/22 15:41:14
SkIRect stores ints, so calling isfinite does not
sugoi1
2013/08/22 17:37:02
Oops, fixed.
|
| + !SkScalarIsFinite(fCropRect.fRight) || |
| + !SkScalarIsFinite(fCropRect.fTop) || |
| + !SkScalarIsFinite(fCropRect.fBottom) || |
| + (fCropRect.fLeft > fCropRect.fRight) || |
| + (fCropRect.fTop > fCropRect.fBottom)) { |
|
sugoi
2013/08/21 20:19:39
Although it's counter intuitive, "top" really has
scroggo
2013/08/21 23:56:00
Depends on which way you think the y-axis should g
|
| + buffer.setError(); |
| + } |
| } |
| void SkImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const { |