aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2012-05-30 04:57:59 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-30 04:57:59 -0700
commitdbc2ccff2fb99af1051f0ce73e3c34ebcd69db5f (patch)
tree288d8ca442c060ea47daefff13a38a6a84f78bd1 /src
parent9aae69c63423b9dc235516c60ee00bf4a322073c (diff)
parentf37732cf5b2f45e434ef1374224b870f1a0f2ca6 (diff)
downloadexternal_skia-dbc2ccff2fb99af1051f0ce73e3c34ebcd69db5f.zip
external_skia-dbc2ccff2fb99af1051f0ce73e3c34ebcd69db5f.tar.gz
external_skia-dbc2ccff2fb99af1051f0ce73e3c34ebcd69db5f.tar.bz2
am f37732cf: Merge "detect all masks, and don\'t use masksuperblitter with those." into jb-dev
* commit 'f37732cf5b2f45e434ef1374224b870f1a0f2ca6': detect all masks, and don't use masksuperblitter with those.
Diffstat (limited to 'src')
-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: