summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2012-01-23 10:42:15 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-01-27 17:49:24 (GMT)
commit5debd05d2fd5f898c793b464aa1cfb5020275543 (patch)
tree4a98a99e454c6790270b26b66237b341943f8331 /src/gui/painting
parent342fb21a7f6ffdade7dca5871f44a8874a462789 (diff)
downloadQt-5debd05d2fd5f898c793b464aa1cfb5020275543.zip
Qt-5debd05d2fd5f898c793b464aa1cfb5020275543.tar.gz
Qt-5debd05d2fd5f898c793b464aa1cfb5020275543.tar.bz2
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: Ie53abf0a7ba349ba70742a94086708aca0beaa37 Based-On: Ic0d98030e94f5d11abbe61628fbf71d1e08219c2 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/gui/painting')
-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 f3a021f..7b6ee50 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);
}