| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed-by: Sarah Smith
|
|
|
|
| |
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
QGLShareContextScope is safer and more reliable than trying to manually
detect how and when to temporarily switch contexts. Replace the few
remaining instances of context-switching with it.
Reviewed-by: trustme
|
|
|
|
|
|
|
|
|
| |
This is internal API.
It's possible to specify a horizontal and vertical scale, rotation,
opacity and source rectangle for each pixmap item.
Useful for particle effects.
Reviewed-by: Trond
|
|
|
|
| |
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
| |
The antialiasing is currently not gamma corrected and is disabled on
OpenGL ES 2.0.
Reviewed-by: Samuel
|
|
|
|
| |
This reverts commit 1b34feacef7a2d3ac005449a7cfbcb08a6bbf947.
|
|
|
|
|
|
|
| |
The antialiasing is currently not gamma corrected and is disabled on
OpenGL ES 2.0.
Reviewed-by: Samuel
|
|
|
|
|
|
| |
Breaks the GL2 paint engine on X11 and OpenGL/ES 2.0.
This reverts commit b8ff02a67ebd8246253823b53cfed98eef400547.
|
|
|
|
|
|
| |
The antialiasing is currently not gamma corrected.
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
|
|
| |
The setTextureCoordsEnabled was enabled in two places, but never disabled
causing it to always be used. When using a varying in a vertex shader
and not using it again in the fragment shader this produces a warning,
and rightly so. Since the property is 100% detectable based on the
fragment shader used, move the logic into the shader selection code
and kill the property all together. This should also speed up
solid filling a bit...
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use qpen_ and qbrush_ accessors for slightly better performance
and avoid calling for the same value again and again. Secondly,
the engine doesn't use its pen and brush states so there is
no point in maintaining them, so don't reset old brush all the
time.
Reviewed-by: Samuel
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
| |
Both the shaders and the engine states were shared between OpenGL
contexts, but the states should be only apply to one context, not a
group of contexts. This commit separates the shaders and the states.
Task-number: 257254
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
| |
It's very likely that some of the shader objects in required program
will be null, as not all are manditory. Check to see if they exist
before de-referencing them and asking for their log string.
Reviewed-by: Trustme
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
| |
Reviewed-by: Tom
|
|\ |
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| | |
This brings performance back up to where it was pre-merge.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/opengl/gl2paintengineex/qglengineshadermanager.cpp
src/opengl/gl2paintengineex/qglengineshadermanager_p.h
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
Merge custom shader / GL blur pixmap filter implementation from graphics
team repo with implementation from kinetic graphics-team repo.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Ensures that the programs are evicted from the cache when the shaders
are destroyed.
|
| | |
| | |
| | |
| | |
| | | |
This will make it easier to implement pixmap filters, YUV->RGB
conversions, etc in other parts of Qt.
|
| | | |
|
| | | |
|
| | | |
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I added a QGLContextResource class which can be used internally in Qt
for sharing resources between contexts. The QGLContextResource is a
hash map where the context is used as 'key', and the resource is the
'value'. All the sharing contexts point to the same resource, and the
resource is automatically deleted when it is not referenced any more.
Now, the shader manager uses the QGLContextResource class.
I also added a pointer to a struct in the QGLContextPrivate class. The
struct is shared between all the sharing contexts and is deleted
automatically. Currently, the struct only contains the resolved OpenGL
function pointers.
The shared context register code has been simplified.
Reviewed-by: Tom
|
|/
|
|
|
|
| |
Simplified caching of uniform locations.
Reviewed-by: Samuel
|
|
|
|
|
|
|
| |
Keep track of uniform locations for the current shader program in the
shader manager. Also don't change texture parameters unless necessary.
Reviewed-by: Kim
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
| |
The pen color should be used when drawPixmap is called with a bitmap,
and the brush color should be used for texture patterns that are
bitmaps.
Task-number: 245802
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the stencil method to draw clip paths and regions to the Z-buffer
instead of using glClear / glScissor. Using different depth values for
the various clip parts also makes restore() very cheap when only
IntersectClip is used.
As an additional bonus this patch gives antialiased clip in the GL 2
paint engine.
Task-number: 254658
Reviewed-by: Trond
|
|
|
|
|
| |
Task-number: QT-80
Reviewed-by: Ian Walters
|
|
|
|
|
|
|
|
|
| |
Now there's only a copy of the texture glyph cache in graphics memory,
avoiding the system memory copy that we used earlier. In addition the
texture will use the GL_ALPHA texture format when possible, making it
consume less graphics memory as well.
Reviewed-by: Tom
|
| |
|
| |
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
|
| |
Returns true if it had to change the shader program so the engine knows
it needs to clean the uniforms.
|
| |
|
|
|
|
|
|
|
|
| |
Rename inputVertex -> vertexCoordsArray to be more consistent with other
vertex attribute array naming conventions.
SimpleVertexShader has also been replaced with a combination of
MainVertexShader & PositionOnlyVertexShader, so can be killed.
|
| |
|
|
|
|
|
|
| |
If you see shocking pink in the rendering output, it's probably because
the "simple" shader is in use but color writes have somehow been
enabled. :-)
|
| |
|