[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    [Bug 199735] [4.3RC2] Regression: sometimes corrupted window borders
From:       Thomas Lübking  <thomas.luebking () web ! de>
Date:       2009-08-30 22:51:03
Message-ID: 20090830225103.CF2B41BAB7 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=199735





--- Comment #29 from Thomas Lübking <thomas luebking web de>  2009-08-31 00:50:59 ---
It's the QGradient (in conflict with the redirected paint)
Internally it uses the raster paintengine on X11 and after the experiences
below, i did a simple testcase:
(from Bespin deco, kwin/client.cpp:690)
------
QImage img(32,32, QImage::Format_RGB32); // using ARGB32 fixes it
QPainter p2(&img); p2.setBrush(QColor(255,0,0,255)); p2.drawRect(img.rect());
p2.end();
QPixmap pix = QPixmap::fromImage(img);
p.setPen(shadow);
p.setBrush(pix);
p.setRenderHint( QPainter::Antialiasing );
p.drawPath(buttonCorner);
----

The result was exactly the same glitch i experienced as below - just now
persistent.

Experiences with the Bespin deco:
- It does not happen if i pick a pre-fabbed gradient QPixmap out of the cache
- It does not happen if i copy a Xrender Picture into a QPixmap and paint that
- It does not happen if i paint a QColor
- It does not happen if the gradient colors have an alpha channel (thus an
ARGB32 image is used, see above)

- It happens for sure whenever i create a new QGradient buffer pixmap (cached
and referce returned)
Simply painting twice "fixes" it - so when performing a simplified dumping pass
for the button backgrounds, everything's ok.
 ° Reassigning the brush twice "setBrush(); setBrush();" won't help.
 ° calling the gradient (to ensure it's cached) and then fetch it from the cache
for painting won't either
 ° setBrush(QPixmap&); paintPath(); setBrush(QPixmap&); paintPath(); (ouch!)
"fixes" it (both set from a reference to the cache entry)
 ° setBrush(); paintPath(); paintPath(); not :-?
 ° usleep(longtime) or XSync(dpy,0) between setBrush() and drawPath() make no
difference.

- It looks like the new gradient pixmap doesn't get painted tiled but only once
(or the painter/paintdevice is internally clipped by the gradient pixmap
dimensions, which have just been a clip when creating the pixmap) - It only
covers exactly 32px (the buffer width for vertical gradients)
- I tried to install the deco eventFilter past the PaintRedirector, but that
will just add more trouble.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic