[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/misc
From: Maks Orlovich <maksim () kde ! org>
Date: 2009-02-08 18:09:03
Message-ID: 1234116543.875001.17957.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 923405 by orlovich:
automatically merged revision 923396:
Source has worked on QPixmap's for a while now --- this uber-slow
workaround should no longer be triggered unconditionally. Removing it
should hopefully make things much smoother.
M +7 -3 loader.cpp
--- trunk/KDE/kdelibs/khtml/misc/loader.cpp #923404:923405
@@ -85,6 +85,8 @@
#include "blocked_icon.cpp"
+#include <QPaintEngine>
+
using namespace khtml;
using namespace DOM;
using namespace khtmlImLoad;
@@ -613,18 +615,20 @@
int w = i->size().width();
int h = i->size().height();
- if (i->hasAlpha()) {
+ QPixmap pm(w, h);
+ if (i->hasAlpha() && !pm.paintEngine()->hasFeature(QPaintEngine::PorterDuff)) {
QImage im(w, h, QImage::Format_ARGB32_Premultiplied);
QPainter paint(&im);
- paint.setCompositionMode(QPainter::CompositionMode_Source);
ImagePainter pi(i);
pi.paint(0, 0, &paint);
paint.end();
return QPixmap::fromImage( im );
} else {
- QPixmap pm(w, h);
+ pm.fill(Qt::transparent);
QPainter paint(&pm);
+ if (i->hasAlpha())
+ paint.setCompositionMode(QPainter::CompositionMode_Source);
ImagePainter pi(i);
pi.paint(0, 0, &paint);
paint.end();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic