diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/qt/QFramebufferPaintDevice.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/qt/QFramebufferPaintDevice.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/qt/QFramebufferPaintDevice.cpp b/Source/WebCore/platform/graphics/qt/QFramebufferPaintDevice.cpp index a4c088cbf..6d5936956 100644 --- a/Source/WebCore/platform/graphics/qt/QFramebufferPaintDevice.cpp +++ b/Source/WebCore/platform/graphics/qt/QFramebufferPaintDevice.cpp @@ -26,7 +26,9 @@ QFramebufferPaintDevice::QFramebufferPaintDevice(const QSize& size) , m_framebufferObject(size, QOpenGLFramebufferObject::CombinedDepthStencil) { m_surface = QOpenGLContext::currentContext()->surface(); +#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) setPaintFlipped(true); +#endif m_framebufferObject.bind(); context()->functions()->glClearColor(0, 0, 0, 0); context()->functions()->glClear(GL_COLOR_BUFFER_BIT); @@ -47,7 +49,11 @@ QImage QFramebufferPaintDevice::toImage() const context()->makeCurrent(m_surface); +#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) QImage image = m_framebufferObject.toImage(false); +#else + QImage image = m_framebufferObject.toImage(); +#endif if (currentContext) currentContext->makeCurrent(currentSurface); |