| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The cache wasn't invalidated for widgets with a graphics effect inside a
scrolling QScrollArea, so for now we disable caching for widget source
pixmaps. Also, we can't clip the source pixmap to device coordinates
since there's no knowledge of which areas of the source pixmap the
effect uses to compute the visible pixels. See change fd30cc9fabe6fc023
for the graphics item effect backend fix.
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
|
|
|
|
| |
Our graphics effects are always done in device coordinates (unless they
can be done in logical coordinates with the same result as an
optimization, e.g. opacity effects).
Reviewed-by: Andy Shaw
|
|
|
|
| |
Reviewed-by: Bjørn Erik Nilsen
|
| |
|
|
|
|
|
|
|
|
| |
Don't invalidate the cache if we're only translating and the effect rect
is fully contained within the device rect of the painter.
Task-number: QTBUG-6901
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This lets us ignore the invalidateCache call when the transform of a
graphics item with an effect changes, and the cached system is
LogicalCoordinates and cached mode is not PadToEffectiveBoundingRect.
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
|
|
| |
We need to take the pixmap item's drawing offset into consideration.
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
|
|
|
|
|
|
| |
QGraphicsEffect::boundingRectFor() needs the source bounding rect in
device coordinates. This patch fixes the documentation to reflect this,
and fixes some internal usage of boundingRectFor() to ensure it always
gets the device rect of the source.
Task-number: QTBUG-5918
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
|
|
| |
Someone had changed an operator==() and an operator!=() from
single parameter members to two-parameter friends but hadn't
changed the qdoc comments.
|
|
|
|
|
|
|
| |
Q3MainWindow and Q3TitleBar depend on it.
Reviewed-By: dt
Reviewed-By: Alessandro Portale
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Get rid of QGraphicsEffectSource from the public API, instead add
convenience functions in QGraphicsEffect. This way we commit to less
API, and are free to introduce a customizable QGraphicsEffectSource
in a future release.
* Move PixmapPadMode into QGraphicsEffect and tweak the names of the
enum values.
* Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility.
Reviewed-by: Bjørn Erik Nilsen
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Building QtSvg for Symbian (ARMV5 build) fails due to the following linker
error:
QGraphicsEffectSourcePrivate::invalidateCache(bool) const
(referred from qsvgwidget.o). This function is called from the
inline destructor of QGraphicsEffectSourcePrivate. Making this
destructor non-inline fixes the problem.
It is not clear why QtSvg is instantiating this destructor, however, as
neither QGraphicsEffectSourcePrivate nor any of its derived classes are
referred to from QtSvg source.
This problem seems to have been triggered by 85e41590.
Reviewed-by: Shane Kearns
|
| |/
|/|
| |
| | |
Reviewed-by: Trust Me
|
|/
|
|
|
|
|
| |
It depends on QT_NO_GRAPHICSVIEW for now, but it is possible to remove
this dependency.
Reviewed-by: paul
|
|\ |
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
src/gui/effects/qgraphicseffect.cpp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem was that we painted on null pixmap. We also want to use the
pixmap cache (QGraphicsEffectSource::pixmap()) to improve performance.
Reported by Andrew Baldwin's performance team.
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Small optimization for the case where the source pixmap is cached.
Reviewed-by: Gunnar Sletta
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added AnimationHint, which didn't make too much sense in a generic enum,
so Qt::RenderHint was moved back into QGraphicsBlurEffect as
QGraphicsBlurEffect::BlurHint.
Reviewed-by: Gunnar Sletta
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
When the effect rect changes we only need to invalidate the cache if the
mode is ExpandToEffectRectPadMode.
Reviewed-by: Gunnar Sletta
|
|/ /
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
There's no reason to lock ourselves to int in the API when some of the
backend could handle floating point blur radii.
Reviewed-by: Bjørn Erik Nilsen
|
| |
| |
| |
| |
| |
| | |
Usable for future optimizations.
Reviewed-by: Samuel
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
When blurring and the blur radius increases we need a bigger effect rect
to do within-pixmap-bounds filtering.
Reviewed-by: Bjørn Erik Nilsen
|
| |
| |
| |
| | |
Reviewed-by: Samuel
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is new API and we don't want to add several items that are not
strictly needed. This is a new set of features and we can grow them
once we have more input from users on what is needed.
The Bloom filter was added based on input from designers, but is not
implemented according to how designers think of blook, so the effect
doesn't meet the requirements.
The Grayscale filter is functionally a duplicate of the colorize
filter and is therefore not needed.
The Pixelize filter has no genuine usecase.
Reviewed-by: Samuel
|
|
|
|
|
|
|
| |
If an effect is applied repeatedly on the same source, just with
varying parameters, we can save a lot by caching the source pixmaps.
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
|
|
| |
There's no implicit conversion from QPixmap to QImage
Reviewed-by: Gunnar
|
|
|
|
|
|
|
| |
Avoid doing so many conversions by operating on raster pixmaps, and by
using INV_PREMUL/PREMUL instead of converting to ARGB32.
Reviewed-by: Gunnar Sletta
|
|
|
|
|
|
|
|
|
|
|
| |
The blur, drop shadow, and bloom graphics effects are scale dependent,
since they have radius and offset (in the case of drop shadow)
parameters that are specified in device coordinates. Thus, we can't
apply the effect in logical coordinates and scale up, and need to always
use the device coordinate path for these effects. The opacity and
grayscale effects still use the logical coordinate optimization.
Reviewed-by: Gunnar Sletta
|
|
|
|
|
| |
Merge-request: 1716
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
|
|
|
|
| |
Reviewed-by: thartman
|
| |
|
|
|
|
|
|
|
| |
This allows the user to control whether to use a fast dynamic blur or
a static high quality blur.
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
|
|
|
| |
We need a way to control various rendering operations. For example,
whether quality is more important than performance, or the other way
around.
This change also replaces occurences of QPixmapFilter/QGraphicsEffect::BlurHint
(introduced in 1a431e850893b6b162c833f4f148f090e2427dda) with Qt::RenderHint.
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
| |
This effect was removed in 1c9a28ea64cc53e61a64644dc5a4ff121b475bc5, but
has now been readded on request from a couple of customers. Andreas also
agreed we should provide this effect.
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
| |
This lets the user control whether to use a fast dynamic blur when
animating the radius of the blur for example, or to use a static high
quality blur for one-time or constant radius blurring.
Reviewed-by: Gunnar Sletta
|
|
|
|
|
|
|
| |
This greatly increases the blur quality in the OpenGL implementation,
and doesn't affect the performance of the raster implementation.
Reviewed-by: Bjørn Erik Nilsen
|
| |
|
|
|
|
|
| |
Autotest: included
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
| |
The custom shader code in the OpenGL2 paint engine needs time to
mature before we make this official public API.
Reviewed-by: trustme
|