From acb2e873f0cfbddbf8a9d23004e1eefbb47fd0fe Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 20 Jan 2016 09:57:41 +0100 Subject: QtPlatformSupport: Remove virtual from declarations with override. Change-Id: If94207596411680dfc2dbe33f298dc48fd5b7cc0 Reviewed-by: Konstantin Ritt Reviewed-by: Marc Mutz --- src/gui/text/qfontengine_ft_p.h | 92 ++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'src/gui') diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h index 83f9a4ef3d..6f05645a3f 100644 --- a/src/gui/text/qfontengine_ft_p.h +++ b/src/gui/text/qfontengine_ft_p.h @@ -189,65 +189,65 @@ private: mutable int fast_glyph_count; }; - virtual QFontEngine::FaceId faceId() const Q_DECL_OVERRIDE; - virtual QFontEngine::Properties properties() const Q_DECL_OVERRIDE; - virtual QFixed emSquareSize() const Q_DECL_OVERRIDE; - virtual bool supportsSubPixelPositions() const Q_DECL_OVERRIDE + QFontEngine::FaceId faceId() const Q_DECL_OVERRIDE; + QFontEngine::Properties properties() const Q_DECL_OVERRIDE; + QFixed emSquareSize() const Q_DECL_OVERRIDE; + bool supportsSubPixelPositions() const Q_DECL_OVERRIDE { return default_hint_style == HintLight || default_hint_style == HintNone; } - virtual bool getSfntTableData(uint tag, uchar *buffer, uint *length) const Q_DECL_OVERRIDE; - virtual int synthesized() const Q_DECL_OVERRIDE; + bool getSfntTableData(uint tag, uchar *buffer, uint *length) const Q_DECL_OVERRIDE; + int synthesized() const Q_DECL_OVERRIDE; - virtual QFixed ascent() const Q_DECL_OVERRIDE; - virtual QFixed descent() const Q_DECL_OVERRIDE; - virtual QFixed leading() const Q_DECL_OVERRIDE; - virtual QFixed xHeight() const Q_DECL_OVERRIDE; - virtual QFixed averageCharWidth() const Q_DECL_OVERRIDE; + QFixed ascent() const Q_DECL_OVERRIDE; + QFixed descent() const Q_DECL_OVERRIDE; + QFixed leading() const Q_DECL_OVERRIDE; + QFixed xHeight() const Q_DECL_OVERRIDE; + QFixed averageCharWidth() const Q_DECL_OVERRIDE; - virtual qreal maxCharWidth() const Q_DECL_OVERRIDE; - virtual QFixed lineThickness() const Q_DECL_OVERRIDE; - virtual QFixed underlinePosition() const Q_DECL_OVERRIDE; + qreal maxCharWidth() const Q_DECL_OVERRIDE; + QFixed lineThickness() const Q_DECL_OVERRIDE; + QFixed underlinePosition() const Q_DECL_OVERRIDE; - virtual glyph_t glyphIndex(uint ucs4) const Q_DECL_OVERRIDE; + glyph_t glyphIndex(uint ucs4) const Q_DECL_OVERRIDE; void doKerning(QGlyphLayout *, ShaperFlags) const Q_DECL_OVERRIDE; - virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) Q_DECL_OVERRIDE; + void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) Q_DECL_OVERRIDE; - virtual bool supportsTransformation(const QTransform &transform) const Q_DECL_OVERRIDE; + bool supportsTransformation(const QTransform &transform) const Q_DECL_OVERRIDE; - virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, - QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE; - virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, - QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE; + void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, + QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE; + void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, + QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE; - virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const Q_DECL_OVERRIDE; + bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const Q_DECL_OVERRIDE; - virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) Q_DECL_OVERRIDE; - virtual glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE; - virtual glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix) Q_DECL_OVERRIDE; + glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) Q_DECL_OVERRIDE; + glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE; + glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix) Q_DECL_OVERRIDE; - virtual void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags flags) const Q_DECL_OVERRIDE; - virtual QImage alphaMapForGlyph(glyph_t g) Q_DECL_OVERRIDE { return alphaMapForGlyph(g, 0); } - virtual QImage alphaMapForGlyph(glyph_t, QFixed) Q_DECL_OVERRIDE; + void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags flags) const Q_DECL_OVERRIDE; + QImage alphaMapForGlyph(glyph_t g) Q_DECL_OVERRIDE { return alphaMapForGlyph(g, 0); } + QImage alphaMapForGlyph(glyph_t, QFixed) Q_DECL_OVERRIDE; QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE; - virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE; - virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, - QFixed subPixelPosition, - const QTransform &matrix, - QFontEngine::GlyphFormat format) Q_DECL_OVERRIDE; - virtual QImage *lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, - GlyphFormat neededFormat, const QTransform &t, - QPoint *offset) Q_DECL_OVERRIDE; - virtual bool hasInternalCaching() const Q_DECL_OVERRIDE { return cacheEnabled; } - virtual void unlockAlphaMapForGlyph() Q_DECL_OVERRIDE; - - virtual void removeGlyphFromCache(glyph_t glyph) Q_DECL_OVERRIDE; - virtual int glyphMargin(QFontEngine::GlyphFormat /* format */) Q_DECL_OVERRIDE { return 0; } - - virtual int glyphCount() const Q_DECL_OVERRIDE; + QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE; + glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, + QFixed subPixelPosition, + const QTransform &matrix, + QFontEngine::GlyphFormat format) Q_DECL_OVERRIDE; + QImage *lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, + GlyphFormat neededFormat, const QTransform &t, + QPoint *offset) Q_DECL_OVERRIDE; + bool hasInternalCaching() const Q_DECL_OVERRIDE { return cacheEnabled; } + void unlockAlphaMapForGlyph() Q_DECL_OVERRIDE; + + void removeGlyphFromCache(glyph_t glyph) Q_DECL_OVERRIDE; + int glyphMargin(QFontEngine::GlyphFormat /* format */) Q_DECL_OVERRIDE { return 0; } + + int glyphCount() const Q_DECL_OVERRIDE; enum Scaling { Scaled, @@ -277,12 +277,12 @@ private: bool init(FaceId faceId, bool antialias, GlyphFormat format, QFreetypeFace *freetypeFace); - virtual int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) Q_DECL_OVERRIDE; + int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) Q_DECL_OVERRIDE; void setQtDefaultHintStyle(QFont::HintingPreference hintingPreference); - virtual void setDefaultHintStyle(HintStyle style) Q_DECL_OVERRIDE; + void setDefaultHintStyle(HintStyle style) Q_DECL_OVERRIDE; - virtual QFontEngine *cloneWithSize(qreal pixelSize) const Q_DECL_OVERRIDE; + QFontEngine *cloneWithSize(qreal pixelSize) const Q_DECL_OVERRIDE; bool initFromFontEngine(const QFontEngineFT *fontEngine); HintStyle defaultHintStyle() const { return default_hint_style; } -- cgit v1.2.3 From c7a86c5e0c2c46be0972dac8ed797abbe3ed44ae Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 18 Jan 2016 11:57:05 +0100 Subject: Remove dead code from QOpenGLPaintEngine These variables were never used or set to anything meaningfull. Change-Id: Ic68ac5c38a3db28d7a5a05be004bcb6a554a1483 Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglpaintengine.cpp | 15 +-------------- src/gui/opengl/qopenglpaintengine_p.h | 5 ----- 2 files changed, 1 insertion(+), 19 deletions(-) (limited to 'src/gui') diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index 4836dde343..0b92bf4b1d 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -93,13 +93,6 @@ QOpenGL2PaintEngineExPrivate::~QOpenGL2PaintEngineExPrivate() { delete shaderManager; - while (pathCaches.size()) { - QVectorPath::CacheEntry *e = *(pathCaches.constBegin()); - e->cleanup(e->engine, e->data); - e->data = 0; - e->engine = 0; - } - if (elementIndicesVBOId != 0) { funcs.glDeleteBuffers(1, &elementIndicesVBOId); elementIndicesVBOId = 0; @@ -292,8 +285,6 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture() } updateTexture(QT_BRUSH_TEXTURE_UNIT, currentBrushImage, wrapMode, filterMode, ForceUpdate); - - textureInvertedY = false; } brushTextureDirty = false; } @@ -409,11 +400,7 @@ void QOpenGL2PaintEngineExPrivate::updateBrushUniforms() dy = 0; } QTransform gl_to_qt(1, 0, 0, m22, 0, dy); - QTransform inv_matrix; - if (style == Qt::TexturePattern && textureInvertedY == -1) - inv_matrix = gl_to_qt * (QTransform(1, 0, 0, -1, 0, currentBrush.texture().height()) * brushQTransform * matrix).inverted() * translate; - else - inv_matrix = gl_to_qt * (brushQTransform * matrix).inverted() * translate; + QTransform inv_matrix = gl_to_qt * (brushQTransform * matrix).inverted() * translate; shaderManager->currentProgram()->setUniformValue(location(QOpenGLEngineShaderManager::BrushTransform), inv_matrix); shaderManager->currentProgram()->setUniformValue(location(QOpenGLEngineShaderManager::BrushTexture), QT_BRUSH_TEXTURE_UNIT); diff --git a/src/gui/opengl/qopenglpaintengine_p.h b/src/gui/opengl/qopenglpaintengine_p.h index 17be72b1e9..f1ec669ca0 100644 --- a/src/gui/opengl/qopenglpaintengine_p.h +++ b/src/gui/opengl/qopenglpaintengine_p.h @@ -309,14 +309,9 @@ public: bool needsSync; bool multisamplingAlwaysEnabled; - GLfloat depthRange[2]; - - float textureInvertedY; - QTriangulatingStroker stroker; QDashedStrokeProcessor dasher; - QSet pathCaches; QVector unusedVBOSToClean; QVector unusedIBOSToClean; -- cgit v1.2.3 From a44e4a6cfe37482b3b4b1527eabc807c585d0500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 20 Jan 2016 14:24:07 +0100 Subject: Fix build with QT_NO_OPENGL Change-Id: I3056d101967d94961b35ce10692dc9f390189b40 Reviewed-by: Laszlo Agocs --- src/gui/kernel/qplatformgraphicsbufferhelper.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui') diff --git a/src/gui/kernel/qplatformgraphicsbufferhelper.cpp b/src/gui/kernel/qplatformgraphicsbufferhelper.cpp index c0c51b8d5e..52457ed606 100644 --- a/src/gui/kernel/qplatformgraphicsbufferhelper.cpp +++ b/src/gui/kernel/qplatformgraphicsbufferhelper.cpp @@ -232,6 +232,7 @@ bool QPlatformGraphicsBufferHelper::bindSWToTexture(const QPlatformGraphicsBuffe #else Q_UNUSED(graphicsBuffer) Q_UNUSED(swizzleRandB) + Q_UNUSED(premultipliedB) Q_UNUSED(subRect) return false; #endif // QT_NO_OPENGL -- cgit v1.2.3 From d921a9bd157b04242722ab4326c5f2ea8e88cbea Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 26 Oct 2015 17:31:18 -0700 Subject: Hide better the private API QTextCursor constructors Both constructors were taking a pointer, so they participated in overload resolution along with QTextDocument and QTextFrame pointers. Instead, make them take references and move them to the private section of QTextCursor. That necessitated adding a method to QTextCursorPrivate to access that private constructor from non-friend classes. Change-Id: I7e6338336dd6468ead24ffff1410e3bc534d77dd Reviewed-by: Konstantin Ritt --- src/gui/text/qtextcursor.cpp | 4 ++-- src/gui/text/qtextcursor.h | 6 ++++-- src/gui/text/qtextcursor_p.h | 3 +++ src/gui/text/qtextdocument.cpp | 7 ++++--- src/gui/text/qtextdocument_p.cpp | 2 +- src/gui/text/qtextobject.cpp | 5 +++-- src/gui/text/qtexttable.cpp | 13 +++++++------ 7 files changed, 24 insertions(+), 16 deletions(-) (limited to 'src/gui') diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index eb51447105..dfb6c9c471 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1072,8 +1072,8 @@ QTextCursor::QTextCursor(const QTextBlock &block) /*! \internal */ -QTextCursor::QTextCursor(QTextDocumentPrivate *p, int pos) - : d(new QTextCursorPrivate(p)) +QTextCursor::QTextCursor(QTextDocumentPrivate &p, int pos) + : d(new QTextCursorPrivate(&p)) { d->adjusted_anchor = d->anchor = d->position = pos; diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h index 350f38cd02..c5462b2936 100644 --- a/src/gui/text/qtextcursor.h +++ b/src/gui/text/qtextcursor.h @@ -61,10 +61,8 @@ class Q_GUI_EXPORT QTextCursor public: QTextCursor(); explicit QTextCursor(QTextDocument *document); - QTextCursor(QTextDocumentPrivate *p, int pos); explicit QTextCursor(QTextFrame *frame); explicit QTextCursor(const QTextBlock &block); - explicit QTextCursor(QTextCursorPrivate *d); QTextCursor(const QTextCursor &cursor); #ifdef Q_COMPILER_RVALUE_REFS QTextCursor &operator=(QTextCursor &&other) Q_DECL_NOTHROW { swap(other); return *this; } @@ -221,8 +219,12 @@ public: QTextDocument *document() const; private: + QTextCursor(QTextDocumentPrivate &p, int pos); + explicit QTextCursor(QTextCursorPrivate *d); + QSharedDataPointer d; friend class QTextCursorPrivate; + friend class QTextDocumentPrivate; friend class QTextDocumentFragmentPrivate; friend class QTextCopyHelper; friend class QWidgetTextControlPrivate; diff --git a/src/gui/text/qtextcursor_p.h b/src/gui/text/qtextcursor_p.h index 51fb92d37c..983ff13742 100644 --- a/src/gui/text/qtextcursor_p.h +++ b/src/gui/text/qtextcursor_p.h @@ -100,6 +100,9 @@ public: void aboutToRemoveCell(int from, int to); + static QTextCursor fromPosition(QTextDocumentPrivate *d, int pos) + { return QTextCursor(*d, pos); } + QTextDocumentPrivate *priv; qreal x; int position; diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 0affd3239d..3edf652f35 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -33,6 +33,7 @@ #include "qtextdocument.h" #include +#include "qtextcursor_p.h" #include "qtextdocumentlayout_p.h" #include "qtextdocumentfragment.h" #include "qtextdocumentfragment_p.h" @@ -1273,7 +1274,7 @@ static bool findInBlock(const QTextBlock &block, const QString &expression, int } } //we have a hit, return the cursor for that. - *cursor = QTextCursor(block.docHandle(), block.position() + idx); + *cursor = QTextCursorPrivate::fromPosition(block.docHandle(), block.position() + idx); cursor->setPosition(cursor->position() + expression.length(), QTextCursor::KeepAnchor); return true; } @@ -1391,7 +1392,7 @@ static bool findInBlock(const QTextBlock &block, const QRegExp &expression, int } } //we have a hit, return the cursor for that. - *cursor = QTextCursor(block.docHandle(), block.position() + idx); + *cursor = QTextCursorPrivate::fromPosition(block.docHandle(), block.position() + idx); cursor->setPosition(cursor->position() + expr.matchedLength(), QTextCursor::KeepAnchor); return true; } @@ -1519,7 +1520,7 @@ static bool findInBlock(const QTextBlock &block, const QRegularExpression &expre } } //we have a hit, return the cursor for that. - *cursor = QTextCursor(block.docHandle(), block.position() + idx); + *cursor = QTextCursorPrivate::fromPosition(block.docHandle(), block.position() + idx); cursor->setPosition(cursor->position() + match.capturedLength(), QTextCursor::KeepAnchor); return true; } diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 587844c1dd..e5dcfb2e55 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -1704,7 +1704,7 @@ bool QTextDocumentPrivate::ensureMaximumBlockCount() beginEditBlock(); const int blocksToRemove = blocks.numNodes() - maximumBlockCount; - QTextCursor cursor(this, 0); + QTextCursor cursor(*this, 0); cursor.movePosition(QTextCursor::NextBlock, QTextCursor::KeepAnchor, blocksToRemove); unreachableCharacterCount += cursor.selectionEnd() - cursor.selectionStart(); diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index df7c8b9c71..e70b8ed300 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -33,6 +33,7 @@ #include "qtextobject.h" #include "qtextobject_p.h" +#include "qtextcursor_p.h" #include "qtextdocument.h" #include "qtextformat_p.h" #include "qtextdocument_p.h" @@ -461,7 +462,7 @@ QTextFrame *QTextFrame::parentFrame() const QTextCursor QTextFrame::firstCursorPosition() const { Q_D(const QTextFrame); - return QTextCursor(d->pieceTable, firstPosition()); + return QTextCursorPrivate::fromPosition(d->pieceTable, firstPosition()); } /*! @@ -472,7 +473,7 @@ QTextCursor QTextFrame::firstCursorPosition() const QTextCursor QTextFrame::lastCursorPosition() const { Q_D(const QTextFrame); - return QTextCursor(d->pieceTable, lastPosition()); + return QTextCursorPrivate::fromPosition(d->pieceTable, lastPosition()); } /*! diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index 454d3440d6..553dc3c772 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -35,6 +35,7 @@ #include "qtextcursor.h" #include "qtextformat.h" #include +#include "qtextcursor_p.h" #include "qtexttable_p.h" #include "qvarlengtharray.h" @@ -220,7 +221,7 @@ int QTextTableCell::columnSpan() const */ QTextCursor QTextTableCell::firstCursorPosition() const { - return QTextCursor(table->d_func()->pieceTable, firstPosition()); + return QTextCursorPrivate::fromPosition(table->d_func()->pieceTable, firstPosition()); } /*! @@ -230,7 +231,7 @@ QTextCursor QTextTableCell::firstCursorPosition() const */ QTextCursor QTextTableCell::lastCursorPosition() const { - return QTextCursor(table->d_func()->pieceTable, lastPosition()); + return QTextCursorPrivate::fromPosition(table->d_func()->pieceTable, lastPosition()); } @@ -1103,10 +1104,10 @@ void QTextTable::mergeCells(int row, int column, int numRows, int numCols) if (nextPos > pos) { if (needsParagraph) { needsParagraph = false; - QTextCursor(p, insertPos++).insertBlock(); + QTextCursorPrivate::fromPosition(p, insertPos++).insertBlock(); p->move(pos + 1, insertPos, nextPos - pos); } else if (rowHasText) { - QTextCursor(p, insertPos++).insertText(QLatin1String(" ")); + QTextCursorPrivate::fromPosition(p, insertPos++).insertText(QLatin1String(" ")); p->move(pos + 1, insertPos, nextPos - pos); } else { p->move(pos, insertPos, nextPos - pos); @@ -1282,7 +1283,7 @@ QTextCursor QTextTable::rowStart(const QTextCursor &c) const int row = cell.row(); QTextDocumentPrivate *p = d->pieceTable; QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), d->grid[row*d->nCols]); - return QTextCursor(p, it.position()); + return QTextCursorPrivate::fromPosition(p, it.position()); } /*! @@ -1304,7 +1305,7 @@ QTextCursor QTextTable::rowEnd(const QTextCursor &c) const int fragment = row < d->nRows ? d->grid[row*d->nCols] : d->fragment_end; QTextDocumentPrivate *p = d->pieceTable; QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), fragment); - return QTextCursor(p, it.position() - 1); + return QTextCursorPrivate::fromPosition(p, it.position() - 1); } /*! -- cgit v1.2.3 From 2fed43d8438b3fb751230aa2a8115de92789ccf3 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 23 Jan 2016 02:04:48 +0100 Subject: Q*Application: don't allocate memory just to compare C strings Instead of creating a QByteArray, possibly normalizing a leading '--' (one allocation, plus possibly one copy), simply use the old 'ol str(n)cmp, skipping the first character if the argument starts with '--'. It also fixes parsing of -stylesheet and other options which were erroneously parsed using indexOf() != -1, when they should have used startsWith(). Also saves 504/742/522b in text size for QtCore/QtGui/QtWidgets, resp., on optimized GCC 5.3 Linux AMD64 builds. Change-Id: Ida868badac3fb9b77285417ee537c861ccc4fc06 Reviewed-by: Thiago Macieira --- src/gui/kernel/qguiapplication.cpp | 48 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 0f015af2b9..7d469dd25e 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1181,30 +1181,32 @@ void QGuiApplicationPrivate::createPlatformIntegration() int j = argc ? 1 : 0; for (int i=1; i Date: Fri, 22 Jan 2016 21:41:40 -0800 Subject: Fix tlw source rect transformation for backingstore blit. The srcRect is already in device window coordinates. Converting it again via deviceRect(QRect, QWindow) causes it to be overly large. Task-number: QTBUG-50613 Change-Id: Iaae390499c0d1add842bde6eec22fb07c8de663b Reviewed-by: Laszlo Agocs --- src/gui/painting/qplatformbackingstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 83b75ae605..8e40eb6dff 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -385,7 +385,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i // The backingstore is for the entire tlw. // In case of native children offset tells the position relative to the tlw. const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(offset), d_ptr->textureSize.height()); - const QMatrix3x3 source = QOpenGLTextureBlitter::sourceTransform(deviceRect(srcRect, window), + const QMatrix3x3 source = QOpenGLTextureBlitter::sourceTransform(srcRect, d_ptr->textureSize, origin); d_ptr->blitter->blit(textureId, QMatrix4x4(), source); -- cgit v1.2.3