mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
plasma: simplify alpha mask creation
This commit is contained in:
parent
beabc2a9ec
commit
61212b4527
1 changed files with 3 additions and 1 deletions
|
@ -462,7 +462,9 @@ QRegion FrameSvg::mask() const
|
|||
if (frame->cachedMasks.count() > frame->MAX_CACHED_MASKS) {
|
||||
frame->cachedMasks.clear();
|
||||
}
|
||||
frame->cachedMasks.insert(id, QRegion(QBitmap(d->alphaMask().alphaChannel().createMaskFromColor(Qt::black))));
|
||||
|
||||
const QPixmap pixmap = d->alphaMask();
|
||||
frame->cachedMasks.insert(id, QRegion(pixmap.createMaskFromColor(Qt::black)));
|
||||
}
|
||||
return frame->cachedMasks[id];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue