diff options
| author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-03 23:11:04 (GMT) |
|---|---|---|
| committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-03 23:11:04 (GMT) |
| commit | b0fa126ae39ac842d5a1798b3fa6817090eafb96 (patch) | |
| tree | ac2f3414c1dbf8ebbbccb55f2c44e709225db850 | |
| parent | 12285cb465e1c673910cd2c848c219aea6a9a464 (diff) | |
| parent | 38cb11feec2a6103a6e04f5676e883a4f66a1fd1 (diff) | |
| download | Qt-b0fa126ae39ac842d5a1798b3fa6817090eafb96.zip Qt-b0fa126ae39ac842d5a1798b3fa6817090eafb96.tar.gz Qt-b0fa126ae39ac842d5a1798b3fa6817090eafb96.tar.bz2 | |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team:
Fixed compile error in qwindowsurface_qws.cpp.
Fixed regression introduced by 5842d19cf3dff37a85c.
Remove DerivedSources.pro from WebKit.
Support debuggable in the makefile build system
Mark all Symbian debug binaries debuggable by default
Detect linked fonts by name (insead of via CLinkedTypeface* Api)
Fix gamma corrected source color in GL
| -rw-r--r-- | mkspecs/common/symbian/symbian-makefile.conf | 5 | ||||
| -rw-r--r-- | mkspecs/common/symbian/symbian-mmp.conf | 2 | ||||
| -rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 13 | ||||
| -rw-r--r-- | src/gui/painting/qwindowsurface_qws.cpp | 2 | ||||
| -rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 23 | ||||
| -rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 48 |
6 files changed, 49 insertions, 44 deletions
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index a725df3..14acd69 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -34,6 +34,11 @@ QMAKE_ELF2E32_FLAGS = --dlldata \ --compressionmethod bytepair \ --unpaged +CONFIG(debug, debug|release) { + QMAKE_ELF2E32_FLAGS += \ + --debuggable +} + QMAKE_PREFIX_SHLIB = CONFIG *= no_plugin_name_prefix QMAKE_PREFIX_STATICLIB = diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf index 8ed326a..fa2a815 100644 --- a/mkspecs/common/symbian/symbian-mmp.conf +++ b/mkspecs/common/symbian/symbian-mmp.conf @@ -58,3 +58,5 @@ symbian-sbsv2 { QMAKE_SBSV2_DEL_TREE = $(GNURM) -rf } +# Mark all debug executables debuggable. +MMP_RULES += DEBUGGABLE_UDEBONLY diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index d77ef82..76d7316 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -2399,10 +2399,15 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe QPointF rr_tl = s->matrix.map(r.topLeft()); QPointF rr_br = s->matrix.map(r.bottomRight()); - const int x1 = qRound(rr_tl.x()); - const int y1 = qRound(rr_tl.y()); - const int x2 = qRound(rr_br.x()); - const int y2 = qRound(rr_br.y()); + int x1 = qRound(rr_tl.x()); + int y1 = qRound(rr_tl.y()); + int x2 = qRound(rr_br.x()); + int y2 = qRound(rr_br.y()); + + if (x1 > x2) + qSwap(x1, x2); + if (y1 > y2) + qSwap(y1, y2); fillRect_normalized(QRect(x1, y1, x2-x1, y2-y1), &d->image_filler_xform, d); return; diff --git a/src/gui/painting/qwindowsurface_qws.cpp b/src/gui/painting/qwindowsurface_qws.cpp index 3789a33..96e2652 100644 --- a/src/gui/painting/qwindowsurface_qws.cpp +++ b/src/gui/painting/qwindowsurface_qws.cpp @@ -1087,7 +1087,7 @@ void QWSSharedMemSurface::setDirectRegion(const QRegion &r, int id) const QRegion QWSSharedMemSurface::directRegion() const { - if (mem.address() && *(uint *)mem.address() == uint(directRegionId()) + if (mem.address() && *(uint *)mem.address() == uint(directRegionId())) return QWSMemorySurface::directRegion(); return QRegion(); } diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index ed336d9..cf96733 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -62,33 +62,14 @@ #define SYMBIAN_LINKEDFONTS_SUPPORTED #endif // !SYMBIAN_VERSION_9_4 -#ifdef SYMBIAN_LINKEDFONTS_SUPPORTED -#include <linkedfonts.h> -#endif // SYMBIAN_LINKEDFONTS_SUPPORTED - QT_BEGIN_NAMESPACE -#ifdef SYMBIAN_LINKEDFONTS_SUPPORTED -static bool isLinkedFontL(const TDesC &aTypefaceName) -{ - CLinkedTypefaceSpecification *linkedspec = CLinkedTypefaceSpecification::NewLC(aTypefaceName); - CFbsTypefaceStore *tfs = CFbsTypefaceStore::NewL(NULL); - CleanupStack::PushL(tfs); - linkedspec->FetchLinkedTypefaceSpecificationL(*tfs); - CleanupStack::PopAndDestroy(tfs); - CleanupStack::PopAndDestroy(linkedspec); - return true; -} -#endif // SYMBIAN_LINKEDFONTS_SUPPORTED - bool qt_symbian_isLinkedFont(const TDesC &typefaceName) // Also used in qfont_s60.cpp { bool isLinkedFont = false; #ifdef SYMBIAN_LINKEDFONTS_SUPPORTED - if (RFbsSession::Connect() == KErrNone) { - TRAP_IGNORE(isLinkedFont = isLinkedFontL(typefaceName)); - RFbsSession::Disconnect(); - } + const QString name((const QChar*)typefaceName.Ptr(), typefaceName.Length()); + isLinkedFont = name.endsWith(QLatin1String("LF")) && name == name.toUpper(); #endif // SYMBIAN_LINKEDFONTS_SUPPORTED return isLinkedFont; } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index a961366..dbbb07c 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1580,6 +1580,11 @@ static bool fontSmoothingApproximately(qreal target) } #endif +static inline qreal qt_sRGB_to_linear_RGB(qreal f) +{ + return f > 0.04045 ? qPow((f + 0.055) / 1.055, 2.4) : f / 12.92; +} + // #define QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyphType, @@ -1739,12 +1744,34 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp } QBrush pensBrush = q->state()->pen.brush(); - setBrush(pensBrush); - if (glyphType == QFontEngineGlyphCache::Raster_RGBMask) { + bool srgbFrameBufferEnabled = false; + if (pensBrush.style() == Qt::SolidPattern && + (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 + { + QColor c = pensBrush.color(); + qreal red = qt_sRGB_to_linear_RGB(c.redF()); + qreal green = qt_sRGB_to_linear_RGB(c.greenF()); + qreal blue = qt_sRGB_to_linear_RGB(c.blueF()); + c = QColor::fromRgbF(red, green, blue, c.alphaF()); + pensBrush.setColor(c); + + glEnable(FRAMEBUFFER_SRGB_EXT); + srgbFrameBufferEnabled = true; + } + } - // Subpixel antialiasing without gamma correction + setBrush(pensBrush); + if (glyphType == QFontEngineGlyphCache::Raster_RGBMask) { + // Subpixel antialiasing with gamma correction QPainter::CompositionMode compMode = q->state()->composition_mode; Q_ASSERT(compMode == QPainter::CompositionMode_Source || compMode == QPainter::CompositionMode_SourceOver); @@ -1851,21 +1878,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); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
