summaryrefslogtreecommitdiffstats
path: root/src/multimediawidgets/qpaintervideosurface.cpp
diff options
context:
space:
mode:
authorAndy Nichols <nezticle@gmail.com>2013-04-04 15:34:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-26 14:24:29 +0200
commitd3531cb0cc41a901b11a02d41685532684511bbd (patch)
treea17b89e42f193d5d818777c96530e6f0c26a463d /src/multimediawidgets/qpaintervideosurface.cpp
parent9f15a98891bd59e56a237711949e94e0c5f13e88 (diff)
AVFoundation: Remove QVideoSurfaceCoreGraphicsPainter
This was a leftover from Qt 4, as it is no longer possible to use the CoreGraphics paint engine. Instead we should just use the logic in QPainterVideoSurface render the QVideoFrame. Change-Id: I7e97fe7c30fd478dcd405d300e0c3f70050ca25f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/multimediawidgets/qpaintervideosurface.cpp')
-rw-r--r--src/multimediawidgets/qpaintervideosurface.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
index e925f577f..8536ba4d1 100644
--- a/src/multimediawidgets/qpaintervideosurface.cpp
+++ b/src/multimediawidgets/qpaintervideosurface.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include "qpaintervideosurface_p.h"
-#include "qpaintervideosurface_mac_p.h"
#include <qmath.h>
@@ -51,6 +50,7 @@
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
#include <qglshaderprogram.h>
#include <QtGui/QOpenGLContext>
+#include <QtGui/QWindow>
#ifndef GL_CLAMP_TO_EDGE
#define GL_CLAMP_TO_EDGE 0x812F
#endif
@@ -1196,8 +1196,8 @@ QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint(
if (scissorTestEnabled)
glEnable(GL_SCISSOR_TEST);
- const int width = QGLContext::currentContext()->device()->width();
- const int height = QGLContext::currentContext()->device()->height();
+ const int width = QOpenGLContext::currentContext()->surface()->size().width();
+ const int height = QOpenGLContext::currentContext()->surface()->size().height();
const QTransform transform = painter->deviceTransform();
@@ -1667,14 +1667,6 @@ void QPainterVideoSurface::createPainter()
{
Q_ASSERT(!m_painter);
-#ifdef Q_OS_MAC
- if (m_glContext)
- m_glContext->makeCurrent();
-
- m_painter = new QVideoSurfaceCoreGraphicsPainter(m_glContext != 0);
- return;
-#endif
-
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
switch (m_shaderType) {
#ifndef QT_OPENGL_ES