OpenGL: Remove Q_WS_ defines.

Change-Id: I351a910968ff7f46550af5b3742959cb0cab540d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
bb10
Friedemann Kleint 2011-10-17 12:05:57 +02:00 committed by Qt by Nokia
parent 730382a968
commit da68749fdb
6 changed files with 0 additions and 76 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -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;