Index: src/codec/SkWebpCodec.cpp |
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp |
index a0fab0a153d67f0d32375ac7405d06314a7bb317..3c61b937622097d5e1c5be483770a6fb2336543a 100644 |
--- a/src/codec/SkWebpCodec.cpp |
+++ b/src/codec/SkWebpCodec.cpp |
@@ -144,8 +144,8 @@ bool SkWebpCodec::onGetValidSubset(SkIRect* desiredSubset) const { |
return false; |
} |
- SkIRect bounds = SkIRect::MakeSize(this->getInfo().dimensions()); |
- if (!desiredSubset->intersect(bounds)) { |
+ SkIRect dimensions = SkIRect::MakeSize(this->getInfo().dimensions()); |
+ if (!dimensions.contains(*desiredSubset)) { |
return false; |
} |