[webkit-qt] performance opportunities in graphics processing

Benjamin Poulain benjamin.poulain at nokia.com
Tue Oct 26 09:41:09 PDT 2010


On 10/26/2010 06:11 PM, ext chunrong lai wrote:
 >  In my understanding we do not need such transforms if we draw/scale
 > a pixmap to a smaller size. Isn't it?

I am not sure why you think that.

> + float tsw = src.width();
> + float tsh = src.height();
> + float tw = dst.width();
> + float th = dst.height();
> + if( tw <= tsw && th <= tsh )
> painter->setRenderHint(QPainter::SmoothPixmapTransform, false);
> painter->drawPixmap(dst, *image, src);

This will give aliasing when you rotate + scale.

> for some QImage::Format_RGB32 pages which are stored using a 32-bit RGB
> format (0xffRRGGBB) but regarded as without alpha channel according to
> qt/src/gui/image/qimage.cpp
> I wonder if QImage::Format_RGB32 can be just regarded as a special case
> (always 0xFF alpha) of Format_ARGB32? What is the side-effect to keep
> the CompositionMode_SourceOver mode here beside the observed performance
> gain?

You definitively don't want to consider RGB32 as a special case of 
ARGB32. Composition source over of an opaque pixel is a memcopy, a 
non-opaque pixel require alpha blending.

As Ariya mentioned, I would extend the definition of fast_images.


More information about the webkit-qt mailing list