aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgdistancefieldutil.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove QSGDistanceFieldGlyphCacheManagerRobin Burchell2017-03-211-69/+0
| | | | | | | | | After the previous cleanups, it became clear that this didn't serve much of a purpose, so let's remove it and simplify the implementation as a result. Change-Id: Iae2ff9c46762f0c7bdf4225a2c4df93bc8253902 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* QSGDistanceFieldUtil: Remove a layer of indirectionRobin Burchell2017-03-211-26/+0
| | | | | | | | | | | | | | | | These mysterious setters appear to be unused (and always were, as far as I can see). How useful they are is not entirely clear (as opposed to a patch to the source for instance, and as it's private API anyway, you'd be touching internals to use this. Additionally, removing the indirection makes the code a bit cleaner and more self-contained in my opinion. This removal leaves the value of QSGDistanceFieldGlyphCacheManager in some question to me, given that it's basically a glorified wrapper around QHash. Change-Id: I6d18eb40d8cd00ebe389b4ed53448f3401962ae6 Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-1/+1
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QSGDistanceFieldUtil: Make use of the newly added QRawFont qHash functionRobin Burchell2016-11-181-22/+2
| | | | | | | | | | Relies on qtbase/094b64fb605b39d1ae88d91d2b9a0672b9ff4780. This was previously responsible for around 1.1% of CPU samples when profiling text creation & rendering under qmlbench. Change-Id: I287067b994231a39881ba8208ad3b802233c7486 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Currently the Qt Quick module depends on either the OpenGL or OpenGLES headers being available at build time. Since we are adding support for adaptations that do not depend on OpenGL, it should be possible to build Qt Quick in environments that do not have OpenGL development headers. This does present many challenges though because in some cases GL types, and classes that require OpenGL are part of the public APIs. However since these classes were never available when QT_NO_OPENGL was defined, it should be possible to redefine the function signatures under this scenario, since it's not possible to break binary compatibility if there never were any binaries to break compatibility with. One of the bigger changes that was necessary to facilitate this change is creating interfaces out of QSGContext and QSGRenderContext. Here the default behavior was usage of OpenGL directly, even though subclasses could override all OpenGL usage. Making them interfaces should bring QSGContext and QSGRenderContext more in line with the other classes present in the adaptation layer. Change-Id: Iaa54dc0f6cfd18d2da1d059548abf509bd71f200 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-031-5/+14
|\ | | | | | | | | | | | | Conflicts: tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
| * Quick: Sanitize reading environment variables.Friedemann Kleint2015-10-261-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Move QSGAtlasTexture::qsg_envInt() to qsgrenderer.cpp for reuse as qt_sg_envInt() and add qt_sg_envFloat(). Change-Id: I4c93f16c228d4f537154f389a0fa1427654485f7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | qDelete([multi]hash.values()) -> qDelete([multi]hash)Albert Astals Cid2015-10-231-1/+1
|/ | | | | | | Saves one iterationg of the container and unneeded allocation of a list Change-Id: I6d8110294343892b25f23520f66e0bf5df2c12cd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use resolved font name for key in distance field cache.Andrew den Exter2012-06-271-8/+18
| | | | | | | | | | On windows at least multiple QRawFonts can share a family name but have different font engines. Prefer the faceId information when constructing a key for the distance field cache to avoid a conflict. Task-number: QTBUG-26201 Change-Id: I9111f22045eb35e6535039117ec4184075e778a4 Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* Decouple QSGDistanceFieldGlyphNode from it's cache manager.Andrew den Exter2012-03-201-12/+13
| | | | | | | | | | | | | To implement a custom distance field glyph node currently it's necessary to also provide a duplicate implementation of QSGContext::createDistanceFieldGlyphCache() as the default implemention references the cache manager created by createGlyphNode(). By isolating references to the cache manager to just createDistanceFieldGlyph() cache it becomes possible to just overwrite createGlyphNode() and still use the default cache. Change-Id: I7261bdbf247966b55512d2671e2ee85239bcca05 Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* Use a single distance-field cache instance for all sizes of a given font.Yoann Lopes2012-03-191-3/+7
| | | | | | | | | | | Previously we had a different cache instance for each font size, but they all shared the same textures and positions. Only the glyph metrics were specific to each font size. The metrics for each font sizes are now calculated by scaling the metrics of the distance-field size (54px). Change-Id: I0d9016990dedd93318893506afb1dba7a5249e2e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-714/+0
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Move distance field util functions to QtGuiJiang Jiang2012-02-281-714/+0
| | | | | | | | | | | | | | These distance field generation functions have been moved to QtGui. Change-Id: I78d9015c8776717ede2d1299c2ef3787d165e0b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-1/+1
|/ | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-171-1/+1
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+805
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>