aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2012-05-30 05:00:09 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-30 05:00:09 -0700
commitcd4bd4e21445a1acefecc67d8a97b7329be5f94b (patch)
tree3bbc11c434a0daab781dd90f5398f88e049640b8
parent429f9177e6b66a07fbc41b4f76fa45a454f72d05 (diff)
parentdbc2ccff2fb99af1051f0ce73e3c34ebcd69db5f (diff)
downloadexternal_skia-cd4bd4e21445a1acefecc67d8a97b7329be5f94b.zip
external_skia-cd4bd4e21445a1acefecc67d8a97b7329be5f94b.tar.gz
external_skia-cd4bd4e21445a1acefecc67d8a97b7329be5f94b.tar.bz2
am dbc2ccff: am f37732cf: Merge "detect all masks, and don\'t use masksuperblitter with those." into jb-dev
* commit 'dbc2ccff2fb99af1051f0ce73e3c34ebcd69db5f': detect all masks, and don't use masksuperblitter with those.
-rw-r--r--src/core/SkScan_AntiPath.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp
index 9def060..0834caa 100644
--- a/src/core/SkScan_AntiPath.cpp
+++ b/src/core/SkScan_AntiPath.cpp
@@ -392,10 +392,12 @@ public:
return false;
#endif
int width = bounds.width();
- int rb = SkAlign4(width);
+ int64_t rb = SkAlign4(width);
+ // use 64bits to detect overflow
+ int64_t storage = rb * bounds.height();
return (width <= MaskSuperBlitter::kMAX_WIDTH) &&
- (rb * bounds.height() <= MaskSuperBlitter::kMAX_STORAGE);
+ (storage <= MaskSuperBlitter::kMAX_STORAGE);
}
private: