svg_loader: No skip luma mask when composition node is image

Improved to skip Luma Mask when conditions are the same
as AlphaMask for optimization in e409bb29.
If the composition node is an image, it is not skipped because
it is not known for sure whether to skip it.
This commit is contained in:
JunsuChoi 2022-08-31 18:07:40 +09:00 committed by Mira Grudzinska
parent be4f382d99
commit b7b8c2424c

View file

@ -659,7 +659,10 @@ static unique_ptr<Scene> _sceneBuildHelper(const SvgNode* node, const Box& vBox,
scene->push(_sceneBuildHelper(*child, vBox, svgPath, false, isMaskWhite));
} else if ((*child)->type == SvgNodeType::Image) {
auto image = _imageBuildHelper(*child, vBox, svgPath);
if (image) scene->push(move(image));
if (image) {
scene->push(move(image));
if (isMaskWhite) *isMaskWhite = false;
}
} else if ((*child)->type != SvgNodeType::Mask) {
auto shape = _shapeBuildHelper(*child, vBox, svgPath);
if (shape) {