| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
QGraphicsView based applications will set a new transform for every
item before it's painted. This leads to lots of updates to the PMV
matrix. So switching to a 3x3 rather than a 4x4 gives us less data
to pass to GL for each QGraphicsItem which gets rendered. It also
means the vertex shader is more efficient. However, this patch only
gives a maximum 2.5% speed improvement on the SGX, which seems to be
only due to the faster vertex shader rather than the reduced amount
of data we pass to GL.
Reviewed-By: Kim
|
|
|
|
|
|
|
| |
The shader manager will now a) not seg-fault and b) actually tell you
which shader has the error.
Reviewed-By: Kim
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the triangulating stroker, the last point was being duplicated in
dashed paths. But because QDataBuffer::add() takes a ref to a float
rather than a float, it would resize the data buffer and then try to
fetch the values out of a pointer to the original buffer memory.
This change copies the values into temporary variables before
resizing the array.
Task-number: QTBUG-6045
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
|
| |
If the same brush is used over and over again, this gives a
huge performance boost (measured to be 25% faster on desktop
and 73% faster on SGX).
Reviewed-By: Samuel Rødal
|
|
|
|
|
|
|
|
|
| |
Do the blur in half the resolution in software and then upload the
result as a texture and smooth-scale it on the GPU. This leads to stable
and decent performance regardless of the blur radius, and simplifies the
implementation quite a bit.
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
| |
Reviewed-by: Eskil
|
|
|
|
| |
Reviewed-by: Eskil
|
|
|
|
|
| |
Reviewed-by: Trond
Reviewed-by: Tom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first time a path is drawn we call makeCachable on the path, which
means that if it is drawn again, we start caching it. This is a bit of
a trick to avoid caching paths that are drawn once and discared while
at the same time cache paths that are reused automatically.
The GL engine owns the vertex information and is responsible for cleaning
it up. If the vectorpath is destroyed first, it will call the cleanup function.
if the engine dies first, we still require some hooks to clean up the cache
in the path. More to come. When VBO's are used, these will be a leaked if the
path is destroyed after the engine.
Reviewed-by: Samuel
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed potential bug where you could end up taking the square root of a
negative number in drawTextItem() in the raster and OpenGL paint
engines.
Task-number: QTBUG-6327
Reviewed-by: Trond
|
| |
| |
| |
| | |
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| | |
Some of the functions had become too long to be inlined in my
opinion.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The stroker generated two points for each miter join, one on the
convex side of the join, and one on the concave side. For sharp
joins between curved segments, the point on the concave side
could end up poking out of the stroke. This was fixed by
generating one point on the convex side only.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Complete circles were generated at every round join, so if the
join were close to a flat cap, the circle would extend beyond
the flat cap. This was fixed by generating arcs rather than
complete circles. Likewise, round caps are now semi-circles
instead of full circles.
I also removed some unnecessary calculations when generating
square caps.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| | |
Use subpixel antialiasing even if the there is an alpha channel.
Reviewed-by: Trond
|
| |
| |
| |
| | |
Over src/ tools/ examples/ and demos/
|
| |
| |
| |
| | |
Reviewed-by: Samuel
|
| |
| |
| |
| | |
Reviewed-by: Tom Cooksey
|
|/
|
|
|
|
| |
Testcase with rounded rects went from 55 -> 62 FPS for 1000 random rects
Reviewed-By: Tom Cooksey
|
|
|
|
|
|
|
|
| |
Also fixed square caps which in some cases were extruded in the wrong
direction.
Task-number: QTBUG-5736
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
| |
Since the stroke is rendered as a triangle strip, zero area triangles
must be inserted in order to have gaps in the stroke. This is achieved
by duplicating vertices before and after each gap. It was already done
for open subpaths. This commit fixes gaps between closed subpaths.
Task-number: QTBUG-5736
Reviewed-by: Gunnar
|
|
|
|
|
|
|
| |
QRegion::numRects() is marked obsolete.
Removed all usage of the old function inside Qt and test-cases.
Reviewed-by: Andreas Aardal Hanssen
|
|
|
|
|
|
|
|
|
|
| |
The GL2 paint engine adds a (0.49,0.49) pixel offset when doing aliased
rendering. But this assumed if it was doing aliased rendering then
multisampling was disabled. On GLES, multisampling is always enabled if
the surface has it enabled. So on GLES, we never add the offset if the
surface is multisampled.
Reviewed-By: Gunnar
|
|
|
|
| |
Reviewed-by: Trustme
|
|
|
|
| |
Reviewed-by: Samuel
|
|
|
|
| |
Reviewed-by: Sarah Smith
|
|
|
|
| |
Reviewed-by: Trond
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We add an internal cache which keeps four half-scaled versions of the
source pixmap at different blur radii, then we simply interpolate
between the two pixmaps around the desired blur radius, or between the
base source pixmap and the first blurred version.
Reviewed-by: Gunnar Sletta
|
| |
| |
| |
| | |
Reviewed-By: Samuel
|
|/
|
|
| |
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
| |
When the number of programs held in the cache exceeds a threshold, the
least frequantly used programs get deleted. This also covers programs
with custom snippets of code. As a conequence, when a
QGLCustomShaderStage gets deleted, any programs using that code will
(eventually) be freed.
Reviewed-By: Samuel Rødal
|
|
|
|
| |
This patch also adds a "snippetNameStr" helper for debugging.
|
|
|
|
|
|
|
|
|
| |
This is a first step towards supporting binary shaders.
Note: This change will introduce a (rare) leak of shader objects, as the
shaders will never be kicked out from the cache (because the cache is
still a QList) :-) This will be corrected by the next patch.
Reviewed-By: Samuel
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Looks like a couple of files missed the namespace macro...
Rev-By: gunnar
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Use ExpandToTransparentBorderPadMode since we can use GL_CLAMP_TO_EDGE
to clamp to the texture.
* Shrink the bounding rects reported by the blur
and drop shadow filters (expanding by 2 * radius isn't needed).
* Use a single-pass blur for radii <= 3 to avoid the overhead of
rendering to an FBO.
* Made the fast blur setting generate filters for only a predefined set
of radii, and then use the actual blur radius to spread the sample
points outwards.
* Optimized the generated program to rely less on temporary variables,
as those seemed to not be handled very well by certain GLSL compilers.
Reviewed-by: Gunnar Sletta
|
| |
| |
| |
| | |
Reviewed-by: Samuel
|
|/
|
|
| |
Reviewed-by: Eskil
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
src/gui/painting/qtextureglyphcache.cpp
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QGLEngineShaderManager pointers in QGLCustomShaderStagePrivate have
been changed to QPointers to prevent the QGLPixmapFilters in
QGL2PaintEngineEx from dereferencing the QGLEngineShaderManager after
it is destroyed.
Reviewed-by: Rhys Weatherley
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-4822, QTBUG-4824
Reviewed-by: Sarah Smith
Reviewed-by: Samuel
|
| |
| |
| |
| |
| | |
Task-number: QTBUG-2222
Reviewed-by: Gunnar
|
|/
|
|
|
|
|
|
| |
Fixed the OpenGL paint engines so that the brush origin is applied
correctly and for all brushes just like in the raster paint engine.
Task-number: QTBUG-2676
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
|
|
| |
Making the triangle fan of each sub path start at the sub path's
centroid will on average improve performance for complex paths, because
less pixels that are outside the path need to be touched. The centroid
is a more balanced choice than just picking the first element of the
sub path as triangle fan origin.
A performance improvement of 20 % was measured for star formed paths.
Reviewed-by: Trond
|