aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickborderimage_p_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-08-26 10:52:22 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-09-10 13:52:07 +0200
commita9238292145e05d36be7c35bdd50829c6400a3de (patch)
treed5bca3fa163215f7b4bb1cba63018da7492d91c9 /src/quick/items/qquickborderimage_p_p.h
parentf9ee33f9683a4cd4d1a2e41efa6e8d124e9d731d (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/items/qquickborderimage_p_p.h')
-rw-r--r--src/quick/items/qquickborderimage_p_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/items/qquickborderimage_p_p.h b/src/quick/items/qquickborderimage_p_p.h
index d5b959fd9f..bda2867696 100644
--- a/src/quick/items/qquickborderimage_p_p.h
+++ b/src/quick/items/qquickborderimage_p_p.h
@@ -89,6 +89,16 @@ public:
QQuickBorderImage::TileMode verticalTileMode;
int redirectCount;
+ struct BorderImageRegion
+ {
+ BorderImageRegion() : node(0), textureFactory(0) {}
+ QImage image;
+ QSGImageNode *node;
+ QScopedPointer<QQuickTextureFactory> textureFactory;
+ QRectF targetRect;
+ };
+ BorderImageRegion regions[9];
+
bool pixmapChanged : 1;
};