diff options
author | Derek Sollenberger <djsollen@google.com> | 2012-05-30 04:57:59 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-30 04:57:59 -0700 |
commit | dbc2ccff2fb99af1051f0ce73e3c34ebcd69db5f (patch) | |
tree | 288d8ca442c060ea47daefff13a38a6a84f78bd1 /src | |
parent | 9aae69c63423b9dc235516c60ee00bf4a322073c (diff) | |
parent | f37732cf5b2f45e434ef1374224b870f1a0f2ca6 (diff) | |
download | external_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.cpp | 6 |
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: |