aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-07-03 14:10:20 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-04 10:12:10 +0200
commitf2fcac1929a178eaa6ac2d8514d9138e3bbe113f (patch)
tree0fa19a0020cf9f411d4b5ef2911c6872f50d1269 /src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
parent8a9c661568a3caa3dd72dfe92aeed92ba2a03383 (diff)
Compile without RTTI support
We need to be able to compile without RTTI support. Fortunately QPaintEngine has built-in type info. No RTTI support is the default configuration on Windows with MSVC2010, so this is required to fix the build there. Change-Id: I89b1ed4879fd0e8e0d61ef12d77f6961fd0b07e5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp')
-rw-r--r--src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
index d231609151..196981d971 100644
--- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
+++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
@@ -465,8 +465,10 @@ void QQuickContext2DCommandBuffer::replay(QPainter* p, QQuickContext2D::State& s
sr.setTop(srBottom);
tex->bind();
- QOpenGL2PaintEngineEx *engine = dynamic_cast<QOpenGL2PaintEngineEx *>(p->paintEngine());
- engine->drawTexture(dr, tex->textureId(), tex->textureSize(), sr);
+ if (p->paintEngine()->type() == QPaintEngine::OpenGL2) {
+ QOpenGL2PaintEngineEx *engine = static_cast<QOpenGL2PaintEngineEx *>(p->paintEngine());
+ engine->drawTexture(dr, tex->textureId(), tex->textureSize(), sr);
+ }
}
}
break;