From 07ea3cf0b3883979e84bd91a5dc6a7a126de3123 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Wed, 7 Nov 2012 11:01:08 +0100 Subject: qpa: Fix rendering issue in blitter engine (negative scaling factors) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Change-Id: Iee496b6bf0c90ffe36c4235ceaa2c80f296b2ca4 Reviewed-by: Samuel Rødal --- src/gui/painting/qpaintengine_blitter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp index 1acdf8c433..c45513b4aa 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; -- cgit v1.2.3