summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-11-26 12:45:08 +0100
committerSamuel Rødal <samuel.rodal@nokia.com>2010-11-26 12:52:57 +0100
commita061f032bc36f03d31ba39d2565857d1a14d9112 (patch)
treed009e24c42b631ed7604af092b5271419acb7158
parent2d7464febd762203a9bbfc6e202913eb93253f98 (diff)
downloadqt4-tools-a061f032bc36f03d31ba39d2565857d1a14d9112.tar.gz
Fixed OpenGL state getting out of sync.
Forward begin / endNativePainting from the emulation paint engine. Task-number: QTBUG-15498 Reviewed-by: Gunnar Sletta
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp9
-rw-r--r--src/gui/painting/qemulationpaintengine_p.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index 0510b103a7..714d5de6c6 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -268,6 +268,15 @@ void QEmulationPaintEngine::setState(QPainterState *s)
real_engine->setState(s);
}
+void QEmulationPaintEngine::beginNativePainting()
+{
+ real_engine->beginNativePainting();
+}
+
+void QEmulationPaintEngine::endNativePainting()
+{
+ real_engine->endNativePainting();
+}
void QEmulationPaintEngine::fillBGRect(const QRectF &r)
{
diff --git a/src/gui/painting/qemulationpaintengine_p.h b/src/gui/painting/qemulationpaintengine_p.h
index 5835f10afb..e283645621 100644
--- a/src/gui/painting/qemulationpaintengine_p.h
+++ b/src/gui/painting/qemulationpaintengine_p.h
@@ -93,6 +93,9 @@ public:
virtual void setState(QPainterState *s);
+ virtual void beginNativePainting();
+ virtual void endNativePainting();
+
virtual uint flags() const {return QPaintEngineEx::IsEmulationEngine | QPaintEngineEx::DoNotEmulate;}
inline QPainterState *state() { return (QPainterState *)QPaintEngine::state; }