mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 11:36:25 +00:00
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:
parent
be4f382d99
commit
b7b8c2424c
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue