[webkit-reviews] review denied: [Bug 29362] Qt build error in GraphicsContextQt.cpp (qt 4.4.0) : [Attachment 40040] Qt build fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 25 07:16:29 PDT 2009


Ariya Hidayat <ariya.hidayat at trolltech.com> has denied Fumitoshi Ukai
<ukai at chromium.org>'s request for review:
Bug 29362: Qt build error in GraphicsContextQt.cpp (qt 4.4.0)
https://bugs.webkit.org/show_bug.cgi?id=29362

Attachment 40040: Qt build fix
https://bugs.webkit.org/attachment.cgi?id=40040&action=review

------- Additional Comments from Ariya Hidayat <ariya.hidayat at trolltech.com>
The idea is good, the implementation needs some tweak.

> +	   In Qt 4.4, QBrush constructor that takes QColor was added additional

> +	   default parameter Qt::BrushStyle, so that WebCore::Color isn't
> +	   converted as QBrush implicitly.

Actually, it's more like "In Qt 4.5, a new function QPainter::fillRect(QRect,
QColor) is introduced".
The idea is to speed up solid color fill, because we can avoid the rather
expensive construction of QBrush.

> -	   p->fillRect(shadowRect, shadowColor);
> +	   p->fillRect(shadowRect, QBrush(shadowColor));

And therefore the right fix should be QColor(shadowColor). Otherwise, we keep
falling back to use QBrush, thereby cancelling out the intended optimization.


More information about the webkit-reviews mailing list