diff options
author | Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> | 2012-05-26 22:26:10 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-29 23:37:43 +0200 |
commit | e973d0965c78e9ccc0b17710c905b4d3e8d9dd0a (patch) | |
tree | 39180fb1a3c7ea11c6569ff6d33f5cc3175c5f5c | |
parent | d3240199135a37dcc7d26d8516cfd5a6c16d9417 (diff) |
eglfs: remove support for widget rendering using opengl paint engine
The eglfs backing store code can render either using the raster paint
engine (through QImage) or using the opengl paint engine. Rendering
quality using the opengl paint engine is pretty poor so remove
it.
Change-Id: I64061ceb3a480049cfebe61aaf172ad1f1da7042
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsbackingstore.cpp | 20 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsbackingstore.h | 6 |
2 files changed, 0 insertions, 26 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp index 06a1c252e2..a3b3277c8d 100644 --- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp +++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp @@ -53,10 +53,8 @@ QT_BEGIN_NAMESPACE QEglFSBackingStore::QEglFSBackingStore(QWindow *window) : QPlatformBackingStore(window) , m_context(new QOpenGLContext) -#ifdef EGLFS_BACKINGSTORE_USE_IMAGE , m_texture(0) , m_program(0) -#endif { m_context->setFormat(window->requestedFormat()); m_context->setScreen(window->screen()); @@ -70,11 +68,7 @@ QEglFSBackingStore::~QEglFSBackingStore() QPaintDevice *QEglFSBackingStore::paintDevice() { -#ifdef EGLFS_BACKINGSTORE_USE_IMAGE return &m_image; -#else - return m_device; -#endif } void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPoint &offset) @@ -86,7 +80,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo qWarning("QEglBackingStore::flush %p", window); #endif -#ifdef EGLFS_BACKINGSTORE_USE_IMAGE if (!m_program) { static const char *textureVertexProgram = "attribute highp vec2 vertexCoordEntry;\n" @@ -184,7 +177,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo glBindTexture(GL_TEXTURE_2D, 0); glDisableVertexAttribArray(m_vertexCoordEntry); glDisableVertexAttribArray(m_textureCoordEntry); -#endif // draw the cursor if (QEglFSCursor *cursor = static_cast<QEglFSCursor *>(window->screen()->handle()->cursor())) @@ -205,26 +197,17 @@ void QEglFSBackingStore::beginPaint(const QRegion &rgn) { makeCurrent(); -#ifdef EGLFS_BACKINGSTORE_USE_IMAGE m_dirty = m_dirty | rgn; -#else - Q_UNUSED(rgn); - m_device = new QOpenGLPaintDevice(window()->size()); -#endif } void QEglFSBackingStore::endPaint() { -#ifndef EGLFS_BACKINGSTORE_USE_IMAGE - delete m_device; -#endif } void QEglFSBackingStore::resize(const QSize &size, const QRegion &staticContents) { Q_UNUSED(staticContents); -#ifdef EGLFS_BACKINGSTORE_USE_IMAGE m_image = QImage(size, QImage::Format_RGB32); makeCurrent(); if (m_texture) @@ -237,9 +220,6 @@ void QEglFSBackingStore::resize(const QSize &size, const QRegion &staticContents glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size.width(), size.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -#else - Q_UNUSED(size); -#endif } QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.h b/src/plugins/platforms/eglfs/qeglfsbackingstore.h index e9808b7f95..741ec5a64f 100644 --- a/src/plugins/platforms/eglfs/qeglfsbackingstore.h +++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.h @@ -47,8 +47,6 @@ #include <QImage> #include <QRegion> -#define EGLFS_BACKINGSTORE_USE_IMAGE - QT_BEGIN_NAMESPACE class QOpenGLContext; @@ -73,16 +71,12 @@ private: void makeCurrent(); QOpenGLContext *m_context; -#ifdef EGLFS_BACKINGSTORE_USE_IMAGE QImage m_image; uint m_texture; QRegion m_dirty; QOpenGLShaderProgram *m_program; int m_vertexCoordEntry; int m_textureCoordEntry; -#else - QOpenGLPaintDevice *m_device; -#endif }; QT_END_NAMESPACE |