summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolina Gomes <ext-carolina.s.gomes@nomovok.com>2010-03-29 03:34:12 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-14 12:57:00 (GMT)
commit131f634a2595ca7910c34bd07c311aea9de2bb62 (patch)
tree7109acd5b947093efa19a26d963e3d09e43a1e76
parent65536764c06200762ea6308703eae7ee3df17b15 (diff)
downloadQt-131f634a2595ca7910c34bd07c311aea9de2bb62.zip
Qt-131f634a2595ca7910c34bd07c311aea9de2bb62.tar.gz
Qt-131f634a2595ca7910c34bd07c311aea9de2bb62.tar.bz2
More adjustments to QTBUG-6800
Merge-request: 2344 Reviewed-by: Tom Cooksey
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp5
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h5
-rw-r--r--src/opengl/qgl.cpp14
3 files changed, 11 insertions, 13 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 0ef9204..0534233 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -510,11 +510,6 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
-bool QGL2PaintEngineEx::isNativePaintingActive()
-{
- return nativePaintingActive;
-}
-
void QGL2PaintEngineEx::beginNativePainting()
{
Q_D(QGL2PaintEngineEx);
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index e91d7ac..0538107 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -154,12 +154,15 @@ public:
void setRenderTextActive(bool);
- bool isNativePaintingActive();
+ bool isNativePaintingActive() const;
private:
Q_DISABLE_COPY(QGL2PaintEngineEx)
bool nativePaintingActive;
};
+inline bool QGL2PaintEngineEx::isNativePaintingActive() const {
+ return nativePaintingActive;
+}
class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate
{
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index c20c058..394bcbc 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2771,9 +2771,9 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text
if (d_ptr->active_engine &&
d_ptr->active_engine->type() == QPaintEngine::OpenGL2) {
QGL2PaintEngineEx *eng = static_cast<QGL2PaintEngineEx*>(d_ptr->active_engine);
- if (eng->isNativePaintingActive() == false) {
- QRectF src = QRectF(0, 0, target.width(), target.height());
- QSize size = QSize(target.width(), target.height());
+ if (!eng->isNativePaintingActive()) {
+ QRectF src(0, 0, target.width(), target.height());
+ QSize size(target.width(), target.height());
eng->drawTexture(target, textureId, size, src);
return;
}
@@ -2846,10 +2846,10 @@ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum text
if (d_ptr->active_engine &&
d_ptr->active_engine->type() == QPaintEngine::OpenGL2) {
QGL2PaintEngineEx *eng = static_cast<QGL2PaintEngineEx*>(d_ptr->active_engine);
- if (eng->isNativePaintingActive() == false) {
- QRectF dest = QRectF(point, QSizeF(textureWidth, textureHeight));
- QRectF src = QRectF(0, 0, textureWidth, textureHeight);
- QSize size = QSize(textureWidth, textureHeight);
+ if (!eng->isNativePaintingActive()) {
+ QRectF dest(point, QSizeF(textureWidth, textureHeight));
+ QRectF src(0, 0, textureWidth, textureHeight);
+ QSize size(textureWidth, textureHeight);
eng->drawTexture(dest, textureId, size, src);
return;
}