summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2012-01-01 15:49:44 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-02 10:44:00 +0100
commitcef3eb52110c140a09f41276a1452f80f21fb9c6 (patch)
tree9ea8276ee15b23621da7a5fd3ffe358695037572 /src/gui
parentfeb6211dfbee0c73b0749cfe6be8b6504ea056e6 (diff)
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>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index 039e69e048..0b7571b949 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -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);
}