Version: 3.5.2 (using KDE 3.5.2, Debian Package 4:3.5.2-2+b1 (testing/unstable)) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.15-1-k7 If the image is loaded with an img tag (with src pointing to the image) it shows ok, but if it is loaded with background-image, it shows gibberish. It seems to appear only with small images, regardless of wether it is loaded with data:urls or not. Here is a page showing that problem: http://ministeyr.free.fr/konqueror/gibberish.php The background image should always be white, but it shows gibberish on the first two divs.
*** Bug 127444 has been marked as a duplicate of this bug. ***
What X11 driver do you use? We have had problems with tiled painting in nvidia chipset (because we unlike everyone else use the tiled painting call, rather than tiling ourself).
I'm using radeon xorg driver (9200 chipset) and I see that gibberish.
Created attachment 16171 [details] Disable pretiling. Yeah. Turned out to be our pre-tiling that breaks. Disabling fixes the bug
Okay.. replacing copyBlt by bitBlt fixes the bug. The question is if copyBlt is broken in Qt 3.3
bitBlt is wrong for images with alpha, you -need- to use copyBlt for them
SVN commit 543129 by carewolf: Make sure copyBlt doesn't fail because of different depth. BUG:127189 M +8 -7 loader.cpp --- branches/KDE/3.5/kdelibs/khtml/misc/loader.cpp #543128:543129 @@ -489,7 +489,6 @@ #define BGMINWIDTH 32 #define BGMINHEIGHT 32 - const QPixmap &CachedImage::tiled_pixmap(const QColor& newc) { static QRgb bgTransparent = qRgba( 0, 0, 0, 0xFF ); @@ -511,11 +510,12 @@ QSize s(pixmap_size()); int w = r.width(); int h = r.height(); + assert(s.width() == r.width() && s.height() == s.height()); const QPixmap* src; //source for pretiling, if any //See whether we can - and should - pre-blend if (isvalid && (r.hasAlphaChannel() || r.mask() )) { - bg = new QPixmap(w, h); + bg = new QPixmap(w, h, r.depth()); bg->fill(newc); bitBlt(bg, 0, 0, &r); bgColor = newc.rgb(); @@ -529,15 +529,16 @@ if ( w*h < 8192 ) { if ( r.width() < BGMINWIDTH ) - w = ((BGMINWIDTH / s.width())+1) * s.width(); + w = ((BGMINWIDTH-1) / s.width() + 1) * s.width(); if ( r.height() < BGMINHEIGHT ) - h = ((BGMINHEIGHT / s.height())+1) * s.height(); + h = ((BGMINHEIGHT-1) / s.height() + 1) * s.height(); } - if ( w != r.width() || h != r.height() ) { - QPixmap* oldbg = bg; - bg = new QPixmap(w, h); +// kdDebug() << "pre-tiling " << s.width() << "," << s.height() << " to " << w << "," << h << endl; + QPixmap* oldbg = bg; + bg = new QPixmap(w, h, r.depth()); + //Tile horizontally on the first stripe for (int x = 0; x < w; x += r.width()) copyBlt(bg, x, 0, src, 0, 0, r.width(), r.height());