diff options
author | Marcin Miklas <marcin.miklas@teleca.com> | 2010-11-26 10:46:16 +0100 |
---|---|---|
committer | Stanislav Ionascu <stanislav.ionascu@nokia.com> | 2010-11-26 12:54:21 +0200 |
commit | 996e70be122d7ab47b1f462fedb8bf5edfb72c04 (patch) | |
tree | a4b9973e10affa87b54cbc77a9552acf5360e794 /src/corelib/painting | |
parent | 14a356e85f93bd0877db2618d37213bf8b2aae53 (diff) |
Fixes: NB#206036 - When minimized combobox shows some additional lines.
RevBy: Stanislav Ionascu
Details: We are now switching rendering modes in runtime, minimized applications
are drawn in software mode.
MScalableImage was using MComponentDate::softwareRendering to determine
if software mode is enabled. But this method checks only if -software was given
in command line (or in environment variable), not if current rendering mode
is software.
Now paintEngine()->type() is used to determine which rendering mode
is currently active.
Diffstat (limited to 'src/corelib/painting')
-rw-r--r-- | src/corelib/painting/mscalableimage.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/painting/mscalableimage.cpp b/src/corelib/painting/mscalableimage.cpp index e5dfe4fe..17bc7432 100644 --- a/src/corelib/painting/mscalableimage.cpp +++ b/src/corelib/painting/mscalableimage.cpp @@ -26,8 +26,6 @@ #include <QPainter> #include <QPixmapCache> #include <MDebug> -#include <MComponentData> -#include <MDebug> MScalableImagePrivate::MScalableImagePrivate() : m_imageType(MScalable9), m_image(NULL), @@ -105,7 +103,8 @@ void MScalableImagePrivate::drawScalable9(qreal x, qreal y, qreal w, qreal h, QP else { //the image doesn't fit directly into the required size. //check whether or not we're allowed to cache - bool docache = MComponentData::softwareRendering(); + bool docache = painter->paintEngine()->type() != QPaintEngine::OpenGL + && painter->paintEngine()->type() != QPaintEngine::OpenGL2; if (docache) { //software rendering is not fast when scaling pixmaps, so we use the |