[webkit-qt] performance opportunities in graphics processing
Ariya Hidayat
ariya.hidayat at gmail.com
Tue Oct 26 09:22:42 PDT 2010
> (1) I see that since
> https://bugs.webkit.org/show_bug.cgi?id=41774 smooth pixmap transforms are
> enabled but with some overhead.
> In my understanding we do not need such transforms if we
> draw/scale a pixmap to a smaller size. Isn't it?
Technically you still need it, otherwise the lack of filtering will
potentially yield the Moire pattern.
> (2) Also from ImageQt.cpp I see statements due to
> https://bugs.webkit.org/show_bug.cgi?id=24229
> if (!image->hasAlpha() && painter->compositionMode() ==
> QPainter::CompositionMode_SourceOver)
> compositionMode = QPainter::CompositionMode_Source;
>
> This statement often disable raster graphics engine optimization in
> void QRasterPaintEnginePrivate::recalculateFastImages()
> {
> ......
> s->flags.fast_images = !(s->renderHints &
> QPainter::SmoothPixmapTransform)
> && rasterBuffer->compositionMode ==
> QPainter::CompositionMode_SourceOver
> && s->matrix.type() <= QTransform::TxShear;
> ......
> }
> 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?
It's still useful for paint engines other than raster. But I agree,
maybe fast_images should include CompositionMode_Source as well?
--
Ariya Hidayat
http://www.linkedin.com/in/ariyahidayat
More information about the webkit-qt
mailing list