summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-10-17 12:05:57 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-18 08:21:19 +0200
commitda68749fdbbdca0a946d6b6334d2709c47f8a23d (patch)
tree1715f900cfe3ff506b6f3aaeecdce2bfab5d2fc0 /src
parent730382a968b064df8901982e519c1b0756c1a696 (diff)
OpenGL: Remove Q_WS_ defines.
Change-Id: I351a910968ff7f46550af5b3742959cb0cab540d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp33
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp3
-rw-r--r--src/opengl/qgl.h13
-rw-r--r--src/opengl/qgl_p.h14
-rw-r--r--src/opengl/qglextensions_p.h5
-rw-r--r--src/opengl/qglfunctions.h8
6 files changed, 0 insertions, 76 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index e6a12cd40c..b6168d62d5 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -89,13 +89,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_WS_WIN)
-extern Q_GUI_EXPORT bool qt_cleartype_enabled;
-#endif
-#ifdef Q_WS_MAC
-extern bool qt_applefontsmoothing_enabled;
-#endif
Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert);
@@ -1560,13 +1554,6 @@ namespace {
}
-#if defined(Q_WS_WIN)
-static bool fontSmoothingApproximately(qreal target)
-{
- extern Q_GUI_EXPORT qreal qt_fontsmoothing_gamma; // qapplication_win.cpp
- return (qAbs(qt_fontsmoothing_gamma - target) < 0.2);
-}
-#endif
// #define QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO
@@ -1830,19 +1817,6 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
}
bool srgbFrameBufferEnabled = false;
- if (ctx->d_ptr->extension_flags & QGLExtensions::SRGBFrameBuffer) {
-#if defined(Q_WS_MAC)
- if (glyphType == QFontEngineGlyphCache::Raster_RGBMask)
-#elif defined(Q_WS_WIN)
- if (glyphType != QFontEngineGlyphCache::Raster_RGBMask || fontSmoothingApproximately(2.1))
-#else
- if (false)
-#endif
- {
- glEnable(FRAMEBUFFER_SRGB_EXT);
- srgbFrameBufferEnabled = true;
- }
- }
#if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO)
glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, 0);
@@ -2024,13 +1998,6 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->glyphCacheType = QFontEngineGlyphCache::Raster_A8;
#if !defined(QT_OPENGL_ES_2)
-#if defined(Q_WS_WIN)
- if (qt_cleartype_enabled
- && (fontSmoothingApproximately(1.0) || fontSmoothingApproximately(2.1)))
-#endif
-#if defined(Q_WS_MAC)
- if (qt_applefontsmoothing_enabled)
-#endif
d->glyphCacheType = QFontEngineGlyphCache::Raster_RGBMask;
#endif
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index af6cb53a3a..a6f7f67e60 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -45,9 +45,6 @@
QT_BEGIN_NAMESPACE
-#ifdef Q_WS_WIN
-extern Q_GUI_EXPORT bool qt_cleartype_enabled;
-#endif
QBasicAtomicInt qgltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 863e5902df..5f164440be 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -83,9 +83,6 @@ QT_BEGIN_NAMESPACE
QT_MODULE(OpenGL)
-#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
-class QGLCmap;
-#endif
class QPixmap;
class QGLWidgetPrivate;
@@ -371,13 +368,6 @@ private:
friend class QGLExtensions;
friend class QGLTexture;
friend QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags();
-#ifdef Q_WS_MAC
-public:
- void updatePaintDevice();
-private:
- friend class QMacGLWindowChangeEvent;
- friend QGLContextPrivate *qt_phonon_get_dptr(const QGLContext *);
-#endif
friend class QGLFramebufferObject;
friend class QGLFramebufferObjectPrivate;
friend class QGLFBOGLPaintDevice;
@@ -493,9 +483,6 @@ protected:
private:
Q_DISABLE_COPY(QGLWidget)
-#ifdef Q_WS_MAC
- friend class QMacGLWindowChangeEvent;
-#endif
friend class QGLDrawable;
friend class QGLPixelBuffer;
friend class QGLPixelBufferPrivate;
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 148cd68c99..2f8b677b7c 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -72,20 +72,6 @@ QT_BEGIN_NAMESPACE
class QGLContext;
class QGLOverlayWidget;
class QPixmap;
-#ifdef Q_WS_MAC
-# ifdef qDebug
-# define old_qDebug qDebug
-# undef qDebug
-# endif
-QT_BEGIN_INCLUDE_NAMESPACE
-QT_END_INCLUDE_NAMESPACE
-# ifdef old_qDebug
-# undef qDebug
-# define qDebug QT_NO_QDEBUG_MACRO
-# undef old_qDebug
-# endif
-class QMacWindowChangeEvent;
-#endif
QT_BEGIN_INCLUDE_NAMESPACE
#include <QtOpenGL/private/qglextensions_p.h>
diff --git a/src/opengl/qglextensions_p.h b/src/opengl/qglextensions_p.h
index 991fbba8c7..d391a99643 100644
--- a/src/opengl/qglextensions_p.h
+++ b/src/opengl/qglextensions_p.h
@@ -54,7 +54,6 @@
//
// extension prototypes
-#ifndef Q_WS_MAC
# ifndef APIENTRYP
# ifdef APIENTRY
# define APIENTRYP APIENTRY *
@@ -63,10 +62,6 @@
# define APIENTRYP *
# endif
# endif
-#else
-# define APIENTRY
-# define APIENTRYP *
-#endif
#include <QtCore/qglobal.h>
diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h
index e789d4020d..3b50a1cd66 100644
--- a/src/opengl/qglfunctions.h
+++ b/src/opengl/qglfunctions.h
@@ -59,11 +59,7 @@ QT_MODULE(OpenGL)
typedef ptrdiff_t qgl_GLintptr;
typedef ptrdiff_t qgl_GLsizeiptr;
-#ifdef Q_WS_WIN
-# define QGLF_APIENTRY APIENTRY
-#endif
-#ifndef Q_WS_MAC
# ifndef QGLF_APIENTRYP
# ifdef QGLF_APIENTRY
# define QGLF_APIENTRYP QGLF_APIENTRY *
@@ -72,10 +68,6 @@ typedef ptrdiff_t qgl_GLsizeiptr;
# define QGLF_APIENTRYP *
# endif
# endif
-#else
-# define QGLF_APIENTRY
-# define QGLF_APIENTRYP *
-#endif
struct QGLFunctionsPrivate;