[Nouveau] [Bug 30135] The KDE icons is broken
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Nov 23 07:50:59 PST 2010
https://bugs.freedesktop.org/show_bug.cgi?id=30135
--- Comment #2 from Allan Sandfeld <kde at carewolf.com> 2010-11-23 07:50:58 PST ---
A bit investigation reveals a bit of xrender-code in KDE's plasma library
(kdelibs/plasma/paintutils.cpp). The bug only occurs with icons inside plasma,
and it is triggered by pixmaps transitions (like those that happens during
mouseover).
I've inserted the code that triggers it below. It seems pretty straight
forward, the only thing that seems interesting is the PictStandardA8 format. I
can see nv30_exa.c and nv40_exa.c has specific code to handle the a8 format,
but nv50_exa.c has no special handling of A8. I don't know much about exa, but
could this be the source of the problem?
// QX11PaintEngine doesn't implement CompositionMode_Plus in Qt 4.3,
// which we need to be able to do a transition from one pixmap to
// another.
//
// In order to avoid the overhead of converting the pixmaps to images
// and doing the operation entirely in software, this function has a
// specialized path for X11 that uses Xrender directly to do the
// transition. This operation can be fully accelerated in HW.
//
// This specialization can be removed when QX11PaintEngine supports
// CompositionMode_Plus.
QPixmap source(targetPixmap), destination(startPixmap);
source.detach();
destination.detach();
Display *dpy = QX11Info::display();
XRenderPictFormat *format = XRenderFindStandardFormat(dpy,
PictStandardA8);
XRenderPictureAttributes pa;
pa.repeat = 1; // RepeatNormal
// Create a 1x1 8 bit repeating alpha picture
Pixmap pixmap = XCreatePixmap(dpy, destination.handle(), 1, 1, 8);
Picture alpha = XRenderCreatePicture(dpy, pixmap, format, CPRepeat,
&pa);
XFreePixmap(dpy, pixmap);
// Fill the alpha picture with the opacity value
XRenderColor xcolor;
xcolor.alpha = quint16(0xffff * amount);
XRenderFillRectangle(dpy, PictOpSrc, alpha, &xcolor, 0, 0, 1, 1);
// Reduce the alpha of the destination with 1 - opacity
XRenderComposite(dpy, PictOpOutReverse, alpha, None,
destination.x11PictureHandle(),
0, 0, 0, 0, 0, 0, destination.width(),
destination.height());
// Add source * opacity to the destination
XRenderComposite(dpy, PictOpAdd, source.x11PictureHandle(), alpha,
destination.x11PictureHandle(),
toRect.x(), toRect.y(), 0, 0, 0, 0,
destination.width(), destination.height());
XRenderFreePicture(dpy, alpha);
return destination;
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Nouveau
mailing list