| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The basic approach is to have the batched renderer create and bind a
vertex array object if it detects we are using an OpenGL Core profile
context. The VAO is bound for the duration of the QQ2 renderer's
work cycle and unbound at the end so as to not interfere with any
other VAO's a user may wish to use.
All shaders have been copied and ported to be compliant with the
GLSL 150 core specification which is the minimum for a Core profile
context (OpenGL 3.2 Core). We are not using any newer features as
yet so this will work anywhere we can get a Core profile context.
The QSGShaderSourceBuilder class has been extended to resolve any
requests for shaders to the same basefilename with "_core"
appended prior to any file extension. This could be extended in
the future to allow version, or GPU or platform specific shaders.
The QSGShaderSourceBuilder has also been extended to allow it to
insert #define definitions in the prologue of a shader. Any such
definition is inserted:
* After the last #extension directive (if any are found)
* Otherwise after the #version directive (if found)
* Otherwise at the start of the shader source
This is required by the custom particle shaders which make
extensive use of such #defines.
In addition the mechanism used by the distance field glyph cache to
extend the cache with new glyphs has been modified to work (and
work more efficiently) when using a Core profile context.
Rather than using a shader program and a buffer filling quad to
blit the old texture into the new cache texture, we instead use
the technique of framebuffer blitting. The existing fallback
implementation using glTexSubImage2D() is still available if
needed.
The DECLARATIVE_EXAMPLE_MAIN macro has been extended to allow easy
testing of any of the QtDeclarative examples with a core profile
context. Just run the example with
QT_QUICK_CORE_PROFILE=1 ./text
for e.g. The only ones that may not work out of the box are those
that provide GLSL shader source e.g. the customparticles or
shader effect examples. These work fine if the shader source is
adapted to GLSL 150 core.
In the future it may be a good idea to expose some context property
to QML that the user can use to determine what shader source
variation to provide to Qt Quick. Along these lines it would also
be very nice to allow the provision of shader source to
ShaderEffect or CustomParticle from a separate source file just as
we now do within Qt Quick.
Task-number: QTBUG-32050
Change-Id: Ia6e9f06dbb8508af9ae03c6b60fb418b4cc9e41f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Uploading unaligned and alpha-only data seems to be broken with that
GPU, uploading line by line does the trick.
Task-number: QTBUG-33951
Change-Id: I2790990ca1d3a3016ec3d9fefaea7002b92faeb7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the task for the full reasoning behind this patch.
The threaded renderloop has been refactored to have one window per
thread. This is mostly a simplification of the current code path where
for loops over multiple windows are turned into if (window).
The QSGContext has been split into two classes, QSGRenderContext
for which there is one per OpenGLContext.
The rest of the patch is name changes and a couple of cleanups
in the hopes of simplifying this change.
Task-number: QTBUG-33993
Change-Id: I31c81f9694d7da7474a72333169be38de62613c4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using QtQuick2 Text elements on nVidia with the KHR_debug extension
active we get flooded by messages of the form:
"Texture state usage warning: Waste of memory: Texture 0 has mipmaps,
while its min filter is inconsistent with mipmaps."
This is totally bogus as there really aren't any mipmaps created here.
However, it is very annoying and hides genuine errors. Setting the
mipmap max level to 0 works around the issue. nVidia seem unwilling
to fix it in the driver.
Change-Id: I56632ba1ee777fb54fc8d17e1828669baa183a55
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
|
|
|
|
|
| |
Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some OpenGL drivers assume alpha-only images are always tightly packed,
regardless of what is set for GL_UNPACK_ALIGNMENT. We now use
QDistanceField to store glyphs, which aligns scanlines on a 1-byte
boundary, instead of QImage which uses a 4-byte boundary. A previous
workaround uploaded scanlines one at a time, but this is also broken
with some other drivers...
Task-number: QTBUG-30908
Task-number: QTBUG-32861
Change-Id: I46527fb48de1e00116f776427c45baa752c6176d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It seems uploading an image (into a texture) which has
padding at the end of each scanLine and alpha-only pixel format
is broken with some OpenGL ES drivers.
The workaround is to upload one line at a time.
Task-number: QTBUG-30908
Change-Id: Ic680654951b6aec294c1a173708c1fb75e57ff8f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The environmental variable QML_USE_GLYPHCACHE_WORKAROUND can be
specified to use the workaround path, which performs better on some
hardware.
Task-number: QTBUG-29264
Change-Id: I16d35ceabc12c990e4f791693ec4694f4e7f55f7
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
|
|
|
|
|
|
| |
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We need to use a resource guard for the FBO in case there is no
current context when the glyph cache is deleted.
This reverts commit b3264e2cb6a8fe87754aa1335ab9f8d5e3910c14 which
was implemented as a band-aid for this crash.
Change-Id: I5b3a09a3998da38836ea851cd0978d3ddadcd2cc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
|
|
|
|
|
|
|
| |
Change copyrights and license headers from Nokia to Digia
Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The glyphs are not stored in a fixed 64x64px tile anymore.
Glyphs are stored in area equal to <glyph_width> + 10 (margin) x 64px.
Allocation is now done with QSGAreaAllocator.
When glyph recycling is needed, unused glyphs are freed until the new
glyph can fit in the cache.
Change-Id: I179a8f17bfe35468bdb63bca5113ea4d0f06c414
Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
|
|
|
|
|
|
|
|
| |
Use the stdlib version directly instead
Change-Id: Ifc600f6c418b395c4ada9e5beb207ad3985575e3
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
The default implementation of the distance field glyph cache can now
store the glyphs of one font in several textures, allowing to cache more
glyphs at once. The default maximum number of textures per cache is 3.
Glyphs are recycled when all textures are full.
Change-Id: I28d2d6cf5aa409141e2700b505023f15d3c2cd26
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
|\
| |
| |
| | |
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
|
| |
| |
| |
| |
| |
| |
| | |
These distance field generation functions have been moved to QtGui.
Change-Id: I78d9015c8776717ede2d1299c2ef3787d165e0b9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously done only in the default cache implementation. It
has been moved to the base class.
releaseGlyphs() is called when a glyph is not referenced anymore by any
node.
Added a virtual function referenceGlyphs() that is called everytime glyphs
are being used in a node. This function is called just before
requestGlyphs().
Change-Id: If90f86c328c18ae2a5977847a6adf50b99ea1241
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The distance field glyph node now uses preprocess().
The glyph cache is updated at that time, then when all the glyphs are
ready the node's geometry is updated.
addGlyphPositions and addGlyphTextures in QSGDistanceFieldGlyphCache
have been renamed to setGlyphsPosition and setGlyphsTexture to reflect the
fact that they can be used to update existing glyphs. For example when
a glyph has moved to a different texture.
When an existing glyph is updated, all nodes containing that glyph are
invalidated and their geometries are reconstructed with the new values.
Change-Id: I7758313155f48811e6027434e6c9a1c3df5dfab7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
|
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>
|