summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-07-06 13:55:40 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-07-06 14:08:02 +0200
commit314fdbce8ce473eb3610be3658c61fab2fac0efb (patch)
tree98a24a6f53ea8d6a7f3fc6ad60ab84dd66ae2863 /src/opengl/gl2paintengineex
parent8d7647e286e07690de15a6ff9189307ee1a3517c (diff)
parent83736a8d06a6ca2a1f165d6119ddaca90646e1f8 (diff)
Merge remote branch 'gerrit/master' into refactor
Conflicts: config.tests/unix/opengldesktop/opengldesktop.cpp examples/itemviews/interview/interview.pro examples/mainwindows/mainwindow/mainwindow.pro examples/openvg/README examples/richtext/textedit/textedit.pro examples/tools/undo/undo.pro src/corelib/global/qglobal.h src/corelib/kernel/qcoreapplication.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qmetatype.h src/gui/kernel/qevent.cpp src/gui/kernel/qevent.h src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qpaintengine_raster_p.h src/gui/text/qfontdatabase.cpp src/opengl/qgl.h src/openvg/qpaintengine_vg.cpp src/plugins/platforms/wayland/qwaylandwindow.cpp tests/auto/qmainwindow/qmainwindow.pro Change-Id: I6bfb586740a68379bb99f4612ec993393a5f3234
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index b2f4b34b02..ab103ba836 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1691,6 +1691,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
}
int numGlyphs = vertexCoordinates->vertexCount() / 4;
+ if (numGlyphs == 0)
+ return;
if (elementIndices.size() < numGlyphs*6) {
Q_ASSERT(elementIndices.size() % 6 == 0);
@@ -2318,41 +2320,6 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
state()->currentClip = d->maxClip;
state()->clipTestEnabled = true;
break;
- case Qt::UniteClip: {
- d->resetClipIfNeeded();
- ++d->maxClip;
- if (state()->rectangleClip.isValid()) {
- QPainterPath path;
- path.addRect(state()->rectangleClip);
-
- // flush the existing clip rectangle to the depth buffer
- d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(path)), d->maxClip);
- }
-
- state()->clipTestEnabled = false;
-#ifndef QT_GL_NO_SCISSOR_TEST
- QRect oldRectangleClip = state()->rectangleClip;
-
- state()->rectangleClip = state()->rectangleClip.united(pathRect);
- d->updateClipScissorTest();
-
- QRegion extendRegion = QRegion(state()->rectangleClip) - oldRectangleClip;
-
- if (!extendRegion.isEmpty()) {
- QPainterPath extendPath;
- extendPath.addRegion(extendRegion);
-
- // first clear the depth buffer in the extended region
- d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(extendPath)), 0);
- }
-#endif
- // now write the clip path
- d->writeClip(path, d->maxClip);
- state()->canRestoreClip = false;
- state()->currentClip = d->maxClip;
- state()->clipTestEnabled = true;
- break;
- }
default:
break;
}