diff options
author | Liang Qi <liang.qi@qt.io> | 2018-06-30 22:59:21 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-07-02 11:23:45 +0200 |
commit | e3ed2281c0c891cf3b15c95f9f7cdae42e9f233a (patch) | |
tree | aae8da6ce616eae02b69fb1fcdcb4383c8fe6811 /src/gui/opengl | |
parent | 3be141d5bc199080b524d8f6f5ce514e8f74d23a (diff) | |
parent | e75e4b39b78ba05ea2cd45dc96acf99fc89c5915 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/platforms/cocoa/qnsview.mm
src/plugins/platforms/cocoa/qnsview_dragging.mm
src/plugins/platforms/ios/qiosinputcontext.mm
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/plugins/platforms/xcb/qxcbwindow.cpp
src/tools/androiddeployqt/main.cpp
Was moved from qttools into qtbase in 5.11.
So re-apply 32398e4d here.
tests/auto/corelib/global/qlogging/test/test.pro
tests/auto/corelib/global/qlogging/tst_qlogging.cpp
tests/auto/corelib/io/qfile/tst_qfile.cpp
tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
tests/auto/corelib/thread/qthreadstorage/test/test.pro
tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
tests/auto/widgets/kernel/qapplication/test/test.pro
Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Done-with: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
Diffstat (limited to 'src/gui/opengl')
-rw-r--r-- | src/gui/opengl/qopenglfunctions_es2.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglpaintengine.cpp | 38 |
2 files changed, 18 insertions, 22 deletions
diff --git a/src/gui/opengl/qopenglfunctions_es2.cpp b/src/gui/opengl/qopenglfunctions_es2.cpp index 59e275dce1..dd2b3af80b 100644 --- a/src/gui/opengl/qopenglfunctions_es2.cpp +++ b/src/gui/opengl/qopenglfunctions_es2.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE \inmodule QtGui \since 5.1 \wrapper - \brief The QOpenGLFunctions_ES2 class provides all functions for OpenGL ES 2 + \brief The QOpenGLFunctions_ES2 class provides all functions for OpenGL ES 2. This class is a wrapper for OpenGL ES 2 functions. See reference pages on \l {http://www.khronos.org/opengles/sdk/docs/man/}{khronos.org} for diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index fb7e6fce97..e390183893 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -864,20 +864,18 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path) if (data) { cache = (QOpenGL2PEVectorPathCache *) data->data; - // Check if scale factor is exceeded for curved paths and generate curves if so... - if (path.isCurved()) { - qreal scaleFactor = cache->iscale / inverseScale; - if (scaleFactor < 0.5 || scaleFactor > 2.0) { + // Check if scale factor is exceeded and regenerate if so... + qreal scaleFactor = cache->iscale / inverseScale; + if (scaleFactor < 0.5 || scaleFactor > 2.0) { #ifdef QT_OPENGL_CACHE_AS_VBOS - glDeleteBuffers(1, &cache->vbo); - cache->vbo = 0; - Q_ASSERT(cache->ibo == 0); + glDeleteBuffers(1, &cache->vbo); + cache->vbo = 0; + Q_ASSERT(cache->ibo == 0); #else - free(cache->vertices); - Q_ASSERT(cache->indices == 0); + free(cache->vertices); + Q_ASSERT(cache->indices == 0); #endif - updateCache = true; - } + updateCache = true; } } else { cache = new QOpenGL2PEVectorPathCache; @@ -946,19 +944,17 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path) if (data) { cache = (QOpenGL2PEVectorPathCache *) data->data; - // Check if scale factor is exceeded for curved paths and generate curves if so... - if (path.isCurved()) { - qreal scaleFactor = cache->iscale / inverseScale; - if (scaleFactor < 0.5 || scaleFactor > 2.0) { + // Check if scale factor is exceeded and regenerate if so... + qreal scaleFactor = cache->iscale / inverseScale; + if (scaleFactor < 0.5 || scaleFactor > 2.0) { #ifdef QT_OPENGL_CACHE_AS_VBOS - glDeleteBuffers(1, &cache->vbo); - glDeleteBuffers(1, &cache->ibo); + glDeleteBuffers(1, &cache->vbo); + glDeleteBuffers(1, &cache->ibo); #else - free(cache->vertices); - free(cache->indices); + free(cache->vertices); + free(cache->indices); #endif - updateCache = true; - } + updateCache = true; } } else { cache = new QOpenGL2PEVectorPathCache; |