For the performance reasons, regardless of the set/default
mask-type value, if the mask is white, the alpha masking is
used. To qualify a mask as white, not only its fill has to be
checked, but its stroke as well. The second was missing.
Change-Id: I407ec17f1b8dfd8fda5948319cf11bd609e7ab91
if (isMaskWhite) {
uint8_t r, g, b;
shape->fillColor(&r, &g, &b, nullptr);
- if (shape->fill() || r < 255 || g < 255 || b < 255) *isMaskWhite = false;
+ if (shape->fill() || r < 255 || g < 255 || b < 255 || shape->strokeFill() ||
+ (shape->strokeColor(&r, &g, &b, nullptr) == Result::Success && (r < 255 || g < 255 || b < 255))) {
+ *isMaskWhite = false;
+ }
}
scene->push(move(shape));
}