summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/qt/ImageBufferDataQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/qt/ImageBufferDataQt.cpp')
-rw-r--r--Source/WebCore/platform/graphics/qt/ImageBufferDataQt.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/qt/ImageBufferDataQt.cpp b/Source/WebCore/platform/graphics/qt/ImageBufferDataQt.cpp
index 4a1651548..1235ce690 100644
--- a/Source/WebCore/platform/graphics/qt/ImageBufferDataQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/ImageBufferDataQt.cpp
@@ -34,7 +34,6 @@
#include "GraphicsSurface.h"
#include "ImageData.h"
#include "StillImageQt.h"
-#include "QFramebufferPaintDevice.h"
#include <QImage>
#include <QPaintEngine>
@@ -42,6 +41,7 @@
#include <QPixmap>
#if ENABLE(ACCELERATED_2D_CANVAS)
+#include "QFramebufferPaintDevice.h"
#include "TextureMapper.h"
#include "TextureMapperPlatformLayer.h"
#include "TextureMapperGL.h"
@@ -483,16 +483,12 @@ ImageBufferData::ImageBufferData(const IntSize& size)
initPainter();
}
+#if ENABLE(ACCELERATED_2D_CANVAS)
ImageBufferData::ImageBufferData(const IntSize& size, QOpenGLContext* compatibleContext)
{
m_painter = new QPainter;
-#if ENABLE(ACCELERATED_2D_CANVAS)
m_impl = new ImageBufferDataPrivateAccelerated(size, compatibleContext);
-#else
- Q_UNUSED(compatibleContext);
- m_impl = new ImageBufferDataPrivateUnaccelerated(size);
-#endif
if (!m_impl->paintDevice())
return;
@@ -501,11 +497,14 @@ ImageBufferData::ImageBufferData(const IntSize& size, QOpenGLContext* compatible
initPainter();
}
+#endif
ImageBufferData::~ImageBufferData()
{
+#if ENABLE(ACCELERATED_2D_CANVAS)
if (m_impl->isAccelerated())
static_cast<QFramebufferPaintDevice*>(m_impl->paintDevice())->ensureActiveTarget();
+#endif
m_painter->end();
delete m_painter;
delete m_impl;