summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulien Brianceau <jbrianceau@nds.com>2012-11-07 15:35:34 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-08 10:35:15 (GMT)
commit5a9cdc701e6f7a5e9af09dddad9ca3a4834c252b (patch)
tree582b3a051847f48523e36945b49b20350593fe64 /src
parent708985baa7753ad12aad986b4ab175f49b922be9 (diff)
downloadQt-5a9cdc701e6f7a5e9af09dddad9ca3a4834c252b.zip
Qt-5a9cdc701e6f7a5e9af09dddad9ca3a4834c252b.tar.gz
Qt-5a9cdc701e6f7a5e9af09dddad9ca3a4834c252b.tar.bz2
qpa: Fix rendering issue in blitter engine (negative scaling factors)
A 180° rotation results in a TxScale QTransform with negative scaling factors (x=-1.0 y=-1.0). This is not properly handled by blitter paint engine yet, so use software rendering fallback in this case. This rendering issue can be seen when using "-webkit-transform" CSS property in WebKit with DirectFB QPA platform. cherry-picked from qt5/qtbase 07ea3cf0b3883979e84bd91a5dc6a7a126de3123 Change-Id: I0911fd1166a3968d0a1d6bcca47ce2b26866de44 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index cbf42bb..5ee2bc9 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -330,7 +330,11 @@ void QBlitterPaintEnginePrivate::updateTransformState(QPainterState *s)
{
QTransform::TransformationType type = s->matrix.type();
- caps.updateState(STATE_XFORM_COMPLEX, type > QTransform::TxScale);
+ // consider scaling operations with a negative factor as "complex" for now.
+ // as some blitters could handle axisymmetrical operations, we should improve blitter
+ // paint engine to handle them as a capability
+ caps.updateState(STATE_XFORM_COMPLEX, (type > QTransform::TxScale) ||
+ ((type == QTransform::TxScale) && ((s->matrix.m11() < 0.0) || (s->matrix.m22() < 0.0))));
caps.updateState(STATE_XFORM_SCALE, type > QTransform::TxTranslate);
hasXForm = type >= QTransform::TxTranslate;