diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-09 17:55:57 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-09 17:55:57 (GMT) |
commit | 130e24ae66e4b394ef4c017c67c16d8210aa0bd1 (patch) | |
tree | 67bca464eda71d074aa07ca5b46c4d81f9db76c6 /src | |
parent | 460d52bfa85318610576d1ab75eae4799865e064 (diff) | |
parent | 0c7687458c524252dae26deb32f7a3b8a38491f5 (diff) | |
download | Qt-130e24ae66e4b394ef4c017c67c16d8210aa0bd1.zip Qt-130e24ae66e4b394ef4c017c67c16d8210aa0bd1.tar.gz Qt-130e24ae66e4b394ef4c017c67c16d8210aa0bd1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Try using pure scissor clip in GL 2 engine for rotations.
Fixed DeviceCoordinateCache items when using QGraphicsScene::render().
Fixed missing text in GL 2 engine after recreating a context.
Fix compilation of qnetworkreply test with namespaces.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index a0015dc..726e6d7 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4583,13 +4583,13 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte itemCache->exposed.clear(); deviceData->cacheIndent = QPoint(); pix = QPixmap(); - } else { + } else if (!viewRect.isNull()) { allowPartialCacheExposure = deviceData->cacheIndent != QPoint(); } // Allow partial cache exposure if the device rect isn't fully contained and // deviceRect is 20% taller or wider than the viewRect. - if (!allowPartialCacheExposure && !viewRect.contains(deviceRect)) { + if (!allowPartialCacheExposure && !viewRect.isNull() && !viewRect.contains(deviceRect)) { allowPartialCacheExposure = (viewRect.width() * 1.2 < deviceRect.width()) || (viewRect.height() * 1.2 < deviceRect.height()); } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 3ddc15a..7045fe9 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1477,16 +1477,18 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp QOpenGL2PaintEngineState *s = q->state(); + bool recreateVertexArrays = false; + QGLTextureGlyphCache *cache = (QGLTextureGlyphCache *) staticTextItem->fontEngine()->glyphCache(ctx, glyphType, QTransform()); if (!cache || cache->cacheType() != glyphType) { cache = new QGLTextureGlyphCache(ctx, glyphType, QTransform()); staticTextItem->fontEngine()->setGlyphCache(ctx, cache); + recreateVertexArrays = true; } else if (cache->context() == 0) { // Old context has been destroyed, new context has same ptr value cache->setContext(ctx); } - bool recreateVertexArrays = false; if (staticTextItem->userDataNeedsUpdate) recreateVertexArrays = true; else if (staticTextItem->userData() == 0) @@ -2139,7 +2141,11 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); QRectF rect(points[0], points[2]); - if (state()->matrix.type() <= QTransform::TxScale) { + if (state()->matrix.type() <= QTransform::TxScale + || (state()->matrix.type() == QTransform::TxRotate + && qFuzzyIsNull(state()->matrix.m11()) + && qFuzzyIsNull(state()->matrix.m22()))) + { state()->rectangleClip = state()->rectangleClip.intersected(state()->matrix.mapRect(rect).toRect()); d->updateClipScissorTest(); return; |