aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgadaptationlayer_p.h
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2012-06-29 17:14:10 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-13 11:25:25 +0200
commitd83eb21fb296b73bd111d907dfb9ecde373b9bb3 (patch)
treefbe6b8be85e5a52094a310a72fe5575b7e4131ee /src/quick/scenegraph/qsgadaptationlayer_p.h
parent60a13ee3fd021080d92a11b3456602103ad61a79 (diff)
Change antialiasing method for QML2.
Since multisampling can require a lot of memory, and might not be supported on some hardware, turn off multisampling and implement antialiasing in the vertex shader instead. The alternative method of antialiasing is implemented for Rectangle, Image, BorderImage and AnimatedImage, and must be explicitly enabled by setting the new antialiasing property. Task-number: QTBUG-26268 Change-Id: I39a93d978658a494bf51e9f0fd02d8414eb8be12 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgadaptationlayer_p.h')
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer_p.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h
index c1b2afc8fa..76e2fea455 100644
--- a/src/quick/scenegraph/qsgadaptationlayer_p.h
+++ b/src/quick/scenegraph/qsgadaptationlayer_p.h
@@ -69,7 +69,6 @@ class TextureReference;
class QSGDistanceFieldGlyphCacheManager;
class QSGDistanceFieldGlyphNode;
-// TODO: Rename from XInterface to AbstractX.
class Q_QUICK_PRIVATE_EXPORT QSGRectangleNode : public QSGGeometryNode
{
public:
@@ -79,6 +78,7 @@ public:
virtual void setPenWidth(qreal width) = 0;
virtual void setGradientStops(const QGradientStops &stops) = 0;
virtual void setRadius(qreal radius) = 0;
+ virtual void setAntialiasing(bool antialiasing) { Q_UNUSED(antialiasing) }
virtual void setAligned(bool aligned) = 0;
virtual void update() = 0;
@@ -89,9 +89,15 @@ class Q_QUICK_PRIVATE_EXPORT QSGImageNode : public QSGGeometryNode
{
public:
virtual void setTargetRect(const QRectF &rect) = 0;
- virtual void setSourceRect(const QRectF &rect) = 0;
+ virtual void setInnerTargetRect(const QRectF &rect) = 0;
+ virtual void setInnerSourceRect(const QRectF &rect) = 0;
+ // The sub-source rect's width and height specify the number of times the inner source rect
+ // is repeated inside the inner target rect. The x and y specify which (normalized) location
+ // in the inner source rect maps to the upper-left corner of the inner target rect.
+ virtual void setSubSourceRect(const QRectF &rect) = 0;
virtual void setTexture(QSGTexture *texture) = 0;
-
+ virtual void setAntialiasing(bool antialiasing) { Q_UNUSED(antialiasing) }
+ virtual void setMirror(bool mirror) = 0;
virtual void setMipmapFiltering(QSGTexture::Filtering filtering) = 0;
virtual void setFiltering(QSGTexture::Filtering filtering) = 0;
virtual void setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) = 0;