D14784: [scenes/opengl] Fix overlaps in shadow texture atlas
Vlad Zagorodniy <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
zzag added inline comments. INLINE COMMENTS > davidedmundson wrote in scene_opengl.cpp:2425-2426 > If left is wider than topleft then we'll end up with a gap between the topleft and top. > > Personally I'd call that a corrupt data and not care, which is what the code currently does. > But this whole patch is about handling corrupt shadows. > > --- > > We could either p.drawPixmap(QRect, QImage) so it scales to fill the quadrant > > or > > p.drawPixmap( innerRectLeft - shadowElementTopLeft.width(), ....) > > so that we align the topLeft element to the right of it's allocated rectangle. > > (or the equivalent with style()->drawItemPixmap) > If left is wider than topleft then we'll end up with a gap between the topleft and top. Yes, there will be gap. That's fault of whoever provided such corrupted tiles, not ours. Normally, the texture atlas won't have gaps between tiles. I don't think that's good idea to stretch tiles. FWIW, plasma provides corner tiles that are bigger than left/top/right/bottom tiles (because of rounded corners). REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D14784 To: zzag, #kwin Cc: davidedmundson, abetts, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, sebas, apol, mart