aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2012-05-29 09:24:53 -0400
committerDerek Sollenberger <djsollen@google.com>2012-05-29 09:24:53 -0400
commit1665b8697536e7d7b38b6532c18452eb5363d932 (patch)
tree7001450fdceafc465955f9b43f48f469bf8d62ea /src
parent17e8e7f090bf84986b3fc2c9822daa83c8719ecc (diff)
downloadexternal_skia-1665b8697536e7d7b38b6532c18452eb5363d932.zip
external_skia-1665b8697536e7d7b38b6532c18452eb5363d932.tar.gz
external_skia-1665b8697536e7d7b38b6532c18452eb5363d932.tar.bz2
detect all masks, and don't use masksuperblitter with those.
This is a cherry-pick of Skia r3364. bug: 6522740 Change-Id: I9f9360a0fd5d8bfd936072f0f9bae0709768a1b6
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: