diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2014-08-26 10:52:22 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2014-09-10 13:52:07 +0200 |
commit | a9238292145e05d36be7c35bdd50829c6400a3de (patch) | |
tree | d5bca3fa163215f7b4bb1cba63018da7492d91c9 /src/quick/scenegraph/qsgadaptationlayer_p.h | |
parent | f9ee33f9683a4cd4d1a2e41efa6e8d124e9d731d (diff) |
Fix pixel bleed in BorderImage
Keeping all patches of the border image in the same texture
with different sample points can cause parts of the border
to bleed over to the center patch. To rectify this, we
create a separate texture for each of the nine patches we
need, and separate image nodes.
To avoid applying antialiasing on the interior edges of the
border image, we introduce new antialiasing flags which can
be used to specify precisely which edges of the image should
be antialiased.
[ChangeLog][BorderImage] Fixed possible pixel bleed between
border patches and center patch in BorderImage.
Change-Id: Icc292b3969217320eecca99e79675316c42eab08
Task-number: QTBUG-35838
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/scenegraph/qsgadaptationlayer_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgadaptationlayer_p.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h index c96d0a99e3..71033bd6d0 100644 --- a/src/quick/scenegraph/qsgadaptationlayer_p.h +++ b/src/quick/scenegraph/qsgadaptationlayer_p.h @@ -126,6 +126,17 @@ public: class Q_QUICK_PRIVATE_EXPORT QSGImageNode : public QSGVisitableNode { public: + enum AntialiasingFlag + { + AntialiasingNone = 0, + AntialiasingLeft = 1, + AntialiasingRight = 2, + AntialiasingTop = 4, + AntialiasingBottom = 8, + AntialiasingAll = AntialiasingLeft | AntialiasingRight | AntialiasingBottom | AntialiasingTop + }; + Q_DECLARE_FLAGS(AntialiasingFlags, AntialiasingFlag) + virtual void setTargetRect(const QRectF &rect) = 0; virtual void setInnerTargetRect(const QRectF &rect) = 0; virtual void setInnerSourceRect(const QRectF &rect) = 0; @@ -140,6 +151,7 @@ public: virtual void setFiltering(QSGTexture::Filtering filtering) = 0; virtual void setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) = 0; virtual void setVerticalWrapMode(QSGTexture::WrapMode wrapMode) = 0; + virtual void setAntialiasing(AntialiasingFlags flags) { Q_UNUSED(flags); } virtual void update() = 0; |