summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-10-13 14:25:18 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-13 15:07:41 +0200
commit1582407fc782c0befd0760633324dd5c206524a1 (patch)
treee993d66e824da41ece006d44c48acd4df0ba749e /src/gui/opengl
parent30cb91e17d2fbbdce90f7542f44e12af971ba2de (diff)
Remove Q_WS_ and Q_OS_SYMBIAN from QtGui.
Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc Reviewed-on: http://codereview.qt-project.org/6607 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglfunctions.h8
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp26
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp3
3 files changed, 0 insertions, 37 deletions
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index d3bd580fc7..7851842d46 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -77,11 +77,7 @@ QT_MODULE(Gui)
typedef ptrdiff_t qopengl_GLintptr;
typedef ptrdiff_t qopengl_GLsizeiptr;
-#ifdef Q_WS_WIN
-# define QOPENGLF_APIENTRY APIENTRY
-#endif
-#ifndef Q_WS_MAC
# ifndef QOPENGLF_APIENTRYP
# ifdef QOPENGLF_APIENTRY
# define QOPENGLF_APIENTRYP QOPENGLF_APIENTRY *
@@ -90,10 +86,6 @@ typedef ptrdiff_t qopengl_GLsizeiptr;
# define QOPENGLF_APIENTRYP *
# endif
# endif
-#else
-# define QOPENGLF_APIENTRY
-# define QOPENGLF_APIENTRYP *
-#endif
struct QOpenGLFunctionsPrivate;
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index b29cedcdf9..9c5e4d2fdb 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -92,13 +92,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);
@@ -1530,13 +1524,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
@@ -1801,13 +1788,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type
bool srgbFrameBufferEnabled = false;
if (funcs.hasOpenGLExtension(QOpenGLExtensions::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(GL_FRAMEBUFFER_SRGB);
srgbFrameBufferEnabled = true;
@@ -1979,13 +1960,6 @@ bool QOpenGL2PaintEngineEx::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/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index bfeef5a685..f262d5d387 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -45,9 +45,6 @@
QT_BEGIN_NAMESPACE
-#ifdef Q_WS_WIN
-extern Q_GUI_EXPORT bool qt_cleartype_enabled;
-#endif
QBasicAtomicInt qopengltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);