[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/rendering
From: Allan Sandfeld Jensen <kde () carewolf ! com>
Date: 2010-02-09 12:53:28
Message-ID: 1265720008.358664.12140.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1087713 by carewolf:
Paint directly to qimage instead of going over qpixmap.
The roundtrip to the X-server was slowing down painting of the new www.kde.org style.
M +3 -4 render_text.cpp
--- trunk/KDE/kdelibs/khtml/rendering/render_text.cpp #1087712:1087713
@@ -326,11 +326,11 @@
const int gray = qGray(color);
const bool inverse = (gray < 100);
const QRgb bgColor = (inverse) ? qRgb(255,255,255) : qRgb(0,0,0);
- QPixmap pixmap(w, h);
- pixmap.fill(bgColor);
+ QImage img(w, h, QImage::Format_RGB32);
+ img.fill(bgColor);
QPainter p;
- p.begin(&pixmap);
+ p.begin(&img);
p.setPen(shadow->color);
p.setFont(pt->font());
f->drawText(&p, thickness, thickness+m_baseline, text->str->s, text->str->l,
@@ -338,7 +338,6 @@
m_reversed ? Qt::RightToLeft : Qt::LeftToRight);
p.end();
- QImage img = pixmap.toImage().convertToFormat(QImage::Format_RGB32);
int md = thickness*thickness; // max-dist^2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic