summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-03-31 13:28:40 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-03-31 13:28:40 (GMT)
commit1552a6930d02bd574f5bb7c17fa5994dcb8a9e43 (patch)
treed06b8fc8deb0a0739b3e4565a5a4993de897e9b4 /src/multimedia
parent85313fec454f77322deb7041726573e14f6a262a (diff)
parent93135ba7f52e0ccbbcd8bda390a69d089da62b83 (diff)
downloadQt-1552a6930d02bd574f5bb7c17fa5994dcb8a9e43.zip
Qt-1552a6930d02bd574f5bb7c17fa5994dcb8a9e43.tar.gz
Qt-1552a6930d02bd574f5bb7c17fa5994dcb8a9e43.tar.bz2
Merge remote branch 'integration/qt-4.7-from-4.6' into 4.7
Conflicts: doc/src/modules.qdoc src/gui/graphicsview/qgraphicswidget.h
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/base/qpaintervideosurface.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/multimedia/base/qpaintervideosurface.cpp b/src/multimedia/base/qpaintervideosurface.cpp
index b8028d8f..2fe941b 100644
--- a/src/multimedia/base/qpaintervideosurface.cpp
+++ b/src/multimedia/base/qpaintervideosurface.cpp
@@ -737,10 +737,15 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
const QRectF &target, QPainter *painter, const QRectF &source)
{
if (m_frame.isValid()) {
+ bool stencilTestEnabled = glIsEnabled(GL_STENCIL_TEST);
+ bool scissorTestEnabled = glIsEnabled(GL_SCISSOR_TEST);
+
painter->beginNativePainting();
- glEnable(GL_STENCIL_TEST);
- glEnable(GL_SCISSOR_TEST);
+ if (stencilTestEnabled)
+ glEnable(GL_STENCIL_TEST);
+ if (scissorTestEnabled)
+ glEnable(GL_SCISSOR_TEST);
const float txLeft = source.left() / m_frameSize.width();
const float txRight = source.right() / m_frameSize.width();
@@ -815,9 +820,6 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
glDisableClientState(GL_VERTEX_ARRAY);
glDisable(GL_FRAGMENT_PROGRAM_ARB);
- glDisable(GL_STENCIL_TEST);
- glDisable(GL_SCISSOR_TEST);
-
painter->endNativePainting();
}
return QAbstractVideoSurface::NoError;
@@ -1063,10 +1065,15 @@ QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint(
const QRectF &target, QPainter *painter, const QRectF &source)
{
if (m_frame.isValid()) {
+ bool stencilTestEnabled = glIsEnabled(GL_STENCIL_TEST);
+ bool scissorTestEnabled = glIsEnabled(GL_SCISSOR_TEST);
+
painter->beginNativePainting();
- glEnable(GL_STENCIL_TEST);
- glEnable(GL_SCISSOR_TEST);
+ if (stencilTestEnabled)
+ glEnable(GL_STENCIL_TEST);
+ if (scissorTestEnabled)
+ glEnable(GL_SCISSOR_TEST);
const int width = QGLContext::currentContext()->device()->width();
const int height = QGLContext::currentContext()->device()->height();
@@ -1158,9 +1165,6 @@ QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint(
m_program.release();
-
- glDisable(GL_SCISSOR_TEST);
- glDisable(GL_STENCIL_TEST);
painter->endNativePainting();
}
return QAbstractVideoSurface::NoError;