blitter: Fix the 'solid' detection for the brush in case of fillRect

A default QPainter will set a QBrush with Qt::NoBrush BrushStyle, the
current code detects this as a non solid fill and all calls with fillRect
and a color will not go through QBlittable. Check for Solid or NoBrush
style. Manually verified that a p.fillRect(rect, Qt::red) goes through
the accelerated path now.

Change-Id: Ic0d98030e94f5d11abbe61628fbf71d1e08219c2
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This commit is contained in:
Holger Hans Peter Freyther 2012-01-01 15:49:44 +01:00 committed by Qt by Nokia
parent feb6211dfb
commit cef3eb5211

View File

@ -251,9 +251,9 @@ void QBlitterPaintEnginePrivate::updatePenState(QPainterState *s)
void QBlitterPaintEnginePrivate::updateBrushState(QPainterState *s)
{
bool solid = qbrush_style(s->brush) == Qt::SolidPattern;
Qt::BrushStyle style = qbrush_style(s->brush);
caps.updateState(STATE_BRUSH_PATTERN, !solid);
caps.updateState(STATE_BRUSH_PATTERN, style > Qt::SolidPattern);
caps.updateState(STATE_BRUSH_ALPHA,
qbrush_color(s->brush).alpha() < 255);
}