diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2011-07-06 13:55:40 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2011-07-06 14:08:02 +0200 |
commit | 314fdbce8ce473eb3610be3658c61fab2fac0efb (patch) | |
tree | 98a24a6f53ea8d6a7f3fc6ad60ab84dd66ae2863 /src/opengl | |
parent | 8d7647e286e07690de15a6ff9189307ee1a3517c (diff) | |
parent | 83736a8d06a6ca2a1f165d6119ddaca90646e1f8 (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')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 37 | ||||
-rw-r--r-- | src/opengl/qgl.h | 6 | ||||
-rw-r--r-- | src/opengl/qpaintengine_opengl.cpp | 5 |
3 files changed, 7 insertions, 41 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; } diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 28c56a969a..26c0025342 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -83,7 +83,11 @@ typedef GLfloat GLdouble; typedef GLfloat GLdouble; # endif #else -# include <GL/gl.h> +# if defined(Q_OS_MAC) +# include <OpenGL/gl.h> +# else +# include <GL/gl.h> +# endif #endif QT_BEGIN_NAMESPACE diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index e05f312404..3c35c0334c 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -2413,11 +2413,6 @@ void QOpenGLPaintEngine::updateClipRegion(const QRegion &clipRegion, Qt::ClipOpe else state()->clipRegion = region; break; - case Qt::UniteClip: - state()->clipRegion |= region; - if (d->use_system_clip) - state()->clipRegion &= sysClip; - break; default: break; } |