aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bunch of compiler warningsLars Knoll2020-08-281-0/+2
| | | | | | Taks-number: QTBUG-86234 Change-Id: I4c945edecdbe55bc5587c18599d49dfb82ade1eb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Clean up QT_CONFIG(opengl)Paul Olav Tvete2020-06-171-1/+1
| | | | | | | | | | Accelerated graphics is now possible without OpenGL support. With this change, a Qt build with -no-opengl can still run Qt Quick with a Vulkan, Metal, or Direct3D backend. Fixes: QTBUG-84027 Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Anisotropic antialiasing for distance field textEskil Abrahamsen Blomfeldt2020-06-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For perspective transforms, we need to find the sample range in the glyph cache per pixel. We can do this by getting the gradient of the distance field at the specific pixel. This will ensure proper antialiasing with any projection, but has the limitation that when glyph contours become thinner than a pixel, they may disappear or become too emphasized, because the hardware-gradient - based on neighbouring fragments - is not reliable at that scale. So we should only default to this when we detect that the text is child of a 3D scene. To make this smooth, we need to know the mode of the renderer when creating the shader. So QSGMaterial::createShader() now takes a render mode that we can use to customize behavior based on whether it is rendering into a 2D or 3D scene. [ChangeLog][QtQuick] The QSGMaterial::createShader() virtual function has been extended to take a render mode argument, which can be used for any customizations needed in the case where the shader will be used in combination with 3D perspective transformations. Fixes: QTBUG-84695 Change-Id: I5a18a4edbdfa07e8f9d506c42bb20e8eb580927d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove OpenGL dependency from QSGTextMaskMaterial & friendsEirik Aavitsland2020-06-101-42/+7
| | | | | | Task-number: QTBUG-84623 Change-Id: Ia665b789bbc875c26672abd7e0f8b0d9fe45d22b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove OpenGL dependency from QSGTextureLaszlo Agocs2020-06-081-28/+12
| | | | | | | | | | | | | | | | | The QSGTexture API is now clean, the OpenGL-specific functions are removed. Docs are to be updated in a separate patch. QSGPlainTexture, and a number of texture related places have to follow suit. The OpenGL atlas texture implementation is now removed. Task-number: QTBUG-84717 Task-number: QTBUG-84623 Change-Id: I1aab3b8b9145bb74ad39ef836ce540fc851292c5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make QSGMaterialRhiShader become QSGMaterialShaderLaszlo Agocs2020-06-021-336/+15
| | | | | | | | | | | | | | | | After a symbiotic relationship in Qt 5.14 and 5.15, it is time for QSGMaterialRhiShader to devour its older sibling and take its place. This makes the direct OpenGL rendering path disfunctional. All QSGMaterial Qt 6 TODOs are solved, the API is clean and straightforward again: a QSGMaterial creates a QSGMaterialShader, no special flags and options needed. (it's just that QSGMaterialShader now has a slightly different API) Task-number: QTBUG-79268 Task-number: QTBUG-82997 Change-Id: I545ca8d796c5535e81957c706e7832133be15b7d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix offset on native text rendering with high-dpi scalingEskil Abrahamsen Blomfeldt2020-05-291-3/+4
| | | | | | | | | | | | | | | | | | | The glyph positions are scaled *after* they have been positioned, so when we subtracted the margin unmodified, we would actually offset by the scaled margin (so for scale factor=2 it would be 2 pixels off, and for scale factor=4 it would be 6 pixels off, etc.) We have to also prescale the margin by the inverse of the scale we will apply later. [ChangeLog][Text] Fixed an offset on text position when combining NativeRendering with high-dpi scaling. Task-number: QTBUG-84454 Pick-to: 5.15 Change-Id: I703aeb7fbd717bee5d88cc61e9a56c6422558889 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix subpixel positioned text with Text.NativeRenderingEskil Abrahamsen Blomfeldt2020-05-051-5/+4
| | | | | | | | | | | | | | | | | We would be generating subpixel positioned glyphs based on the relative positions of the glyphs, ignoring the fractional part contributed by the origin of the text. So if the text origin was inside a pixel, the subpixel antialiasing would be wrong and we would see kerning errors. This was especially visible when using AlignHCenter on text with hinting disabled and resizing the item it was aligning to. Pick-to: 5.15 Task-number: QTBUG-49646 Change-Id: I0e709ba2b5d2440e34c94c6f819befe0a65a113a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Move updateRhiTexture and co. to QSGTextureLaszlo Agocs2020-04-281-2/+2
| | | | | | | | | | | | | | | | | | | Use a more descriptive name, commitTextureOperations() in order to avoid confusion with QSGDynamicTexture::updateTexture() which has nothing to do with this. With this the QSGTexture interface has all 5.14 pending changes done (changes that were plumbed via ugly hacks due to having had to deal with binary compatibility). The awful enforcing of subclassing QSGTexturePrivate for each and every QSGTexture subclass is now eliminated. Purging the direct OpenGL code path will involve removing QSGTexture functions like textureId(), bind(), updateBindOptions(). With this patch we now we have all the equivalents (or, in some cases, spiritual successors) in place. Task-number: QTBUG-82997 Change-Id: I7a831f982070c52abc7a36604130a1110d14ff9c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix device pixel ratio with QRhi for native textLaszlo Agocs2019-10-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calculating values based on the dpr is not possible in the sync phase, because the strictly correct dpr (that takes redirections into textures into account) is not known until QQuickWindowPrivate::renderSceneGraph(). The text material implementation attempts to dig out something directly from the context's associated surface, but this does not match the way QQuickWindow calculates the value (although it would work without causing any trouble in many cases). This is of course incompatible with the QRhi-based abstraction since neither the context nor the associated window (if there is one even) is known to materials. To solve this, create a proper solution that makes the QQuickWindow-calculated dpr available already in the sync phase (so in updatePaintNode() implementations): have QQuickWindow calculate calculate the dpr in syncSceneGraph(), and pass it down via the rendercontext. Only the rhi-based code path is touched in this patch. The direct OpenGL path could be fixed in a similar manner (by migrating to rc->devicePixelRatio() in the sync phase and state.devicePixelRatio() in the render phase), but that is left as a future exercise. Task-number: QTBUG-78610 Change-Id: Id9d9d4b1fd5b9730a64834fbbf61c74af4a8ed07 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Change const ref to ref in QSGMaterialRhiShader as per API reviewLaszlo Agocs2019-09-231-14/+14
| | | | | | Change-Id: I7783ed26a66f03ebe3b26bcba2f42f9fff45a417 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Avoid introducing rhiTexture() in the public API of QSGTextureLaszlo Agocs2019-08-291-1/+3
| | | | | | | | | | | | | | | | There is no need for this. The few internal users can get it via QSGTexturePrivate. The original thinking was based on QRhi* being a public API, but that is not the case in the near future. So avoid introducing a public API relying on QRhiTexture. This of course makes it impossible to retrieve the native object under a QSGTexture (as textureId() is not used anymore when rendering with the RHI). For that, an alternative approach will be introduced later on. Change-Id: I0099b23424cafa4958f78c03300b0c934b60d92c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Re-enable colors with both gl and rhi glyph cachesLaszlo Agocs2019-07-311-4/+4
| | | | | | | | | | | Follow up to the 5.13->dev merge where the lack of the qt5 submodule update made it impossible to use the new color argument. Also implements the color argument for the rhi variant of the glyph cache. Change-Id: Ie6c6ba3d647335eb6173d0c9f7fbe3a4ed6b1f24 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-261-6/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/handlers/qquickpointerdevicehandler.cpp src/quick/scenegraph/qsgdefaultglyphnode.cpp src/quick/scenegraph/qsgdefaultglyphnode_p.cpp src/quick/scenegraph/qsgdefaultglyphnode_p_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp Done-With: Jan Arve Sæther <jan-arve.saether@qt.io> Done-With: Laszlo Agocs <laszlo.agocs@qt.io> Change-Id: I35749152f8dce44b9af8d52b1283629879010f11
| * Support text color for color fontsEskil Abrahamsen Blomfeldt2019-07-191-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support pen color for color fonts, we have to bake the color into the cache (since the cache contains actual color data and not alpha values). This is equivalent of 78caba7ae637bf4b33631c3425eb92ec3946c99e in Qt Base. [ChangeLog][Text] Added support for text color when using color fonts. Task-number: QTBUG-74761 Change-Id: I5910636c240bd4c0ec3f0b13db4e2f78d4b062ff Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Add the graphics api independent scenegraph portLaszlo Agocs2019-07-041-73/+417
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt in via environment variables: QSG_RHI=1 -> enable using QRhi instead of GL QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default (the default is d3d11 on Windows, metal on Mac, gl elsewhere) Or force a given rhi backend via the existing QQuickWindow::setSceneGraphBackend(). Otherwise the default behavior is the same as before, the rhi code path is never active by default. -no-opengl builds are supported in the sense that they work and default to the software backend. However, the rhi code path cannot currently be used in such builds, even though QRhi from qtbase is fully functional with Vulkan, D3D, or Metal even when qtbase was configured with -no-opengl. This cannot be utilized by Quick atm due to OpenGL usage being all over the place in the sources corresponding to the default backend, and those host the rhi code path as well. This will be cleaned up hopefully in Qt 6, with the removal all direct OpenGL usage. Other env.vars.: QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer (assuming the system is set up for this) QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too) QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both merged/unmerged, convert when needed - with some rhi backends this is implicit) QSG_RENDER_LOOP -> to override the render loop as usual. The default with RHI is threaded for Metal, threaded for Vulkan on Windows, basic for Vulkan on Linux and Android (to be checked later), while the existing rules apply for OpenGL. Not supported when running with QRhi: - particles - compressed atlases (though this is transparent to the apps) - QSGRenderNode - QQuickRenderControl - QQuickFramebufferObject - certain QQuickWindow functionality that depends directly on OpenGL - anisotropic filtering for textures - native text may lack some gamma correction - QSGEngine applicability unclear - some QML profiler logs may be incorrect or irrelevant Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix non-integer scale factors with Text native renderingDavid Edmundson2018-03-131-2/+2
| | | | | | Task-number: QTBUG-67007 Change-Id: Id32cc14ea1bc258cfc139a859ccae014f5893563 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-15/+15
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-1/+1
| | | | | Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-1/+1
| | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* sources: Add missing override and remove redundant virtualAlexander Volkov2017-02-231-10/+10
| | | | | | | Change-Id: I48e26b1491024d41ebf75d40f0d1a7e9a1b20f22 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8v5.8.0-beta1Liang Qi2016-10-271-1/+2
|\ | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I0b9e5bea5da5d2666887c202e62d889b4aa56900
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-271-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp tests/auto/quick/qquicktext/BLACKLIST tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I8bd68b0b5e853b7908791d2cbddd18dd527c76ae
| | * Check qgl_current_fbo_invalid before using qgl_current_fboAlexandru Croitor2016-10-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSG24BitTextMaskShader::useSRGB() on macOS accesses the current context qgl_current_fbo member without first checking if it is valid. Make sure it also checks qgl_current_fbo_invalid, thus not accidentally dereferencing a dangling pointer. Change-Id: I56a77de23ee3b4b271bd848506ff26e14d7b6d15 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Simon Hausmann2016-08-261-3/+20
|\| | | | | | | | | | | Change-Id: If6750f5a11a24c535a2b3c4923bd8dc6a6b818f2
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Simon Hausmann2016-08-251-3/+20
| |\| | | | | | | | | | Change-Id: I12efb77e812364052eca12ea35219ceff64d7cc3
| | * macOS: Check if sRGB is supported before activating the shaderSérgio Martins2016-08-241-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing it in QSG24BitTextMaskShader::initialize() assumed that the FBO didn't change afterwards, but FBO can change (due to ShaderEffectSource or item.grabToImage()), resulting in qt_sRGB_to_linear_RGB() getting called for the case of the FBO not supporting sRGB. The work done in 1e18a4f985f6ec is still a good idea (enabling sRGB for all FBOs), and needed for exact rendering but this patch fixes an orthogonal issue. Change-Id: I98b12347e9ef60f46d8bcb20ac5d0d2d7b0c6f57 Task-Id: QTBUG-52906 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-04-131-9/+9
|\| | | | | | | | | | | Change-Id: If33197b616de3476811f0161d4ecd8e7d004756c
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-081-9/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| | * Move Qt Quick scenegraph resources under the :/qt-project.org/ directoryGiuseppe D'Angelo2016-04-011-9/+9
| | | | | | | | | | | | | | | | | | Change-Id: Ib1c2695f86837b02ba4aaf49184421cd464f7c20 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Revert "Build (and fail) Quick with -no-opengl"Laszlo Agocs2016-02-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 707e6f528fc79db236d282e7ea41eb952c825433. We will not pursue this route for the time being. Change-Id: Idd1fce362440f6bf1b58901a289843fdfb39a5b7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Build (and fail) Quick with -no-openglLaszlo Agocs2016-02-051-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Disable qmltest, particles, Quick examples and tests. Also guard private QOpenGL header includes because, unlike the public QOpenGL* headers, this is not done in the private headers. This allows build attempts against a -no-opengl qtbase. It will of course fail when encontering the GL symbols and QOpenGL class usage in Quick/SG. Change-Id: I323f7a8b8854cc6e486e264517df30be3e5f8d3c Reviewed-by: Andy Nichols <andy.nichols@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>
* Avoid crashing when not having a screen for the contextLaszlo Agocs2015-09-081-1/+1
| | | | | | | | | | | | | | | | Disconnecting the screen to which the context belongs results in a null QOpenGLContext::screen(). Fall back to qguiapp's devicePixelRatio() in this case (giving the highest dpi in the system) due to the lack of any other option. This will fix the crashes when rendering offscreen (QQuickWidget) and using native text rendering. Without this the render attempt after disconnecting the screen with which the context was created would crash due to accessing the already destroyed screen instance. Task-number: QTBUG-42803 Change-Id: Ie5889f59e5d66d09329b3d5fb8e1365d14d5b8fc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-301-6/+43
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/qml/qqmlengine.cpp src/quick/items/qquickitemsmodule.cpp tools/qml/main.cpp Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
| * Support 32-bit color bitmap glyphs in native text rendering.Eli Fidler2015-06-231-6/+43
| | | | | | | | | | | | | | | | | | | | | | We had been accidentally using the 8-bit alpha glyph shader, which resulted in rendering solid black outlines of the glyphs. Task-number: QTBUG-37986 Task-number: QTBUG-45514 Change-Id: Ie8728d50068f58d659e24bc5db2d73e01ca8db75 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Add missing QVector::reserve() callsSérgio Martins2015-06-051-1/+3
| | | | | | | | | | Change-Id: Iab7c9949941559b4773e5d4a0406dc58cfc70adb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-131-1/+9
|\| | | | | | | | | | | | | | | Conflicts: src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/BLACKLIST Change-Id: Ie81612f2884f8ea508c48ba2735ec54ea1c2eca5
| * Update the shader when devicePixelRatio changesPaul Olav Tvete2015-03-271-1/+9
| | | | | | | | | | | | Task-number: QTBUG-45076 Change-Id: I03de20da2e3f436339dcf48fc7d7d3d11a509577 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Address uninitialized scalar fieldsHolger Hans Peter Freyther2015-04-031-2/+5
|/ | | | | | | Fixes Coverity CID 10732, 10734, 10735, 10736, 10739, 10740 Change-Id: Idebb0bdaf42ceb06cd86c73592138e758a8a87c9 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-1/+9
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Avoid sRGB usage when targeting an incapable FBOLaszlo Agocs2015-01-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Native text rendering results in very different output on OS X with QQuickWidget/QOpenGLWidget. When targeting an FBO, enabling sRGB is futile if the FBO was not created with the correct format. In this case we need to disable the usage of sRGB. Task-number: QTBUG-42861 Change-Id: I887482e70be2cbfba40d6758546128d03b36def1 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@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>
* Fix pixelgrid snapping of native text on retina displays.Gunnar Sletta2014-10-231-10/+18
| | | | | | | | | | | Change 63e6c9ada82dc8f16e705cef5f89292784b7ace4 introduced snapping to the pixel grid in the vertex shader for native text, but this code was broken on retina displays because it assumed integer only positions. Fix it by including the retina scale factor into the rounding. Task-number: QTBUG-38702 Change-Id: I84492b02d64f263c9fe030790e04cf79b0dc4e2f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix disfunctional QQuickRenderControl with multiple screensLaszlo Agocs2014-10-221-2/+11
| | | | | | | | | | | | | | | | | | | | Having a retina and non-retina screen connected resulted in getting no output from QQuickRenderControl and QQuickWidget on the non-retina screen. This is caused by the fact that Quick is blindly calling QWindow::devicePixelRatio(). This approach is wrong when using QQuickRenderControl since the QQuickWindow does not have an actual native window and so devicePixelRatio() merely returns some default value which will definitely be wrong for one of the screens. The patch fixes the problem by introducing QQuickWindow::effectiveDevicePixelRatio(), which, via QQuickRenderControl::renderWindowFor, supports the redirected case too. Task-number: QTBUG-42114 Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Snap native glyphs to pixel grid in vertex shader.Gunnar Sletta2014-09-111-22/+2
| | | | | | | | | | | The implementation relied on the full matrix, but did not set the RequiresFullMatrix flag. Setting the flag would have serious negative performance impact as it prevents batching, so we solve it in the vertex shader instead. Task-number: QTBUG-38702 Change-Id: I0c245ea9e18b0b29dd9e3073a2648a7f4e061685 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.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>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-06-041-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | The merge conflict is about the removal of "d1" from the register set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b was reverted to what it was before, per Laszlo's advice. Conflicts: src/qml/jit/qv4isel_masm.cpp Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
| * Fix QSGPlainTexture object leakLiang Jian2014-05-281-0/+1
| | | | | | | | | | | | | | Delete m_texture in the destructor of QSGTextMaskMaterial class Change-Id: I0f3c59d2c5f094dcbc02eafa6ed782d16315eb44 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>