D25611: [scene] Fix decoration texture bleeding
David Edmundson <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
davidedmundson added a comment.
> There is a good chance that the new padding stuff may make you vomit. If
it does so, I'm all ears for the suggestions how to make the code more
nicer.
The QSG code looks quite simple, but they go via another QImage buffer.
QPainter p(&tmp);
p.setCompositionMode(QPainter::CompositionMode_Source);
int w = r.width(); //Dave <- image.width+padding*2
int h = r.height();
int iw = image.width();
int ih = image.height();
p.drawImage(1, 1, image);
p.drawImage(1, 0, image, 0, 0, iw, 1);
p.drawImage(1, h - 1, image, 0, ih - 1, iw, 1);
p.drawImage(0, 1, image, 0, 0, 1, ih);
p.drawImage(w - 1, 1, image, iw - 1, 0, 1, ih);
p.drawImage(0, 0, image, 0, 0, 1, 1);
p.drawImage(0, h - 1, image, 0, ih - 1, 1, 1);
p.drawImage(w - 1, 0, image, iw - 1, 0, 1, 1);
p.drawImage(w - 1, h - 1, image, iw - 1, ih - 1, 1, 1);
Assuming Qt copes with rendering into the image it reads from we could have done the same.
We have the extra complexity of partial updates, but if we have the clipRect set correctly that should just quietly no-op
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D25611
To: zzag, #kwin
Cc: davidedmundson, fredrik, kwin, fvogt, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart