}
mDrawableList.clear();
renderList(mDrawableList);
- VRle mask = inheritMask;
+
+ VRle mask;
if (hasMask()) {
- if (mask.isEmpty())
- mask = maskRle(painter->clipBoundingRect());
- else
+ mask = maskRle(painter->clipBoundingRect());
+ if (!inheritMask.isEmpty())
mask = mask & inheritMask;
+ // if resulting mask is empty then return.
+ if (mask.isEmpty())
+ return;
+ } else {
+ mask = inheritMask;
}
for (auto &i : mDrawableList) {
painter->setBrush(i->mBrush);
VRle rle = i->rle();
- if (!mask.isEmpty()) rle = i->rle() & mask;
+ if (!mask.isEmpty()) rle = rle & mask;
+
+ if (rle.isEmpty()) continue;
if (!matteRle.isEmpty()) {
if (mLayerData->mMatteType == MatteType::AlphaInv) {
}
}
- VRle mask = inheritMask;
-
+ VRle mask;
if (hasMask()) {
- if (mask.isEmpty())
- mask = maskRle(painter->clipBoundingRect());
- else
+ mask = maskRle(painter->clipBoundingRect());
+ if (!inheritMask.isEmpty())
mask = mask & inheritMask;
+ // if resulting mask is empty then return.
+ if (mask.isEmpty())
+ return;
+ } else {
+ mask = inheritMask;
}
LOTLayerItem *matteLayer = nullptr;