aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2016-07-15 15:46:33 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-07-19 10:41:01 +0000
commit764ca4053dbcb44555e9286a25f21f3a5be504e4 (patch)
tree7c3e45226c439c4aa5a8e1ab17188cade9ac3b42 /src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h
parent4cb2552313280384b59ee1e7d7fc557c7bd64a68 (diff)
SoftwareImageNodes: Support textureFiltering and mirroring
Missing features in the QSGImageNode based software node. Change-Id: If6a759873d201307e013a3ab019bd906d98ba7d5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h
index 8a11f25c82..9f1913205b 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h
@@ -88,17 +88,17 @@ public:
void setSourceRect(const QRectF &r) override { m_sourceRect = r; }
QRectF sourceRect() const override { return m_sourceRect; }
- void setTexture(QSGTexture *texture) override { m_texture = texture; markDirty(DirtyMaterial); }
+ void setTexture(QSGTexture *texture) override;
QSGTexture *texture() const override { return m_texture; }
- void setFiltering(QSGTexture::Filtering) override { }
- QSGTexture::Filtering filtering() const override { return QSGTexture::None; }
+ void setFiltering(QSGTexture::Filtering filtering) override { m_filtering = filtering; markDirty(DirtyMaterial); }
+ QSGTexture::Filtering filtering() const override { return m_filtering; }
void setMipmapFiltering(QSGTexture::Filtering) override { }
QSGTexture::Filtering mipmapFiltering() const override { return QSGTexture::None; }
- void setTextureCoordinatesTransform(TextureCoordinatesTransformMode) override { }
- TextureCoordinatesTransformMode textureCoordinatesTransform() const override { return NoTransform; }
+ void setTextureCoordinatesTransform(TextureCoordinatesTransformMode transformNode) override;
+ TextureCoordinatesTransformMode textureCoordinatesTransform() const override { return m_transformMode; }
void setOwnsTexture(bool owns) override { m_owns = owns; }
bool ownsTexture() const override { return m_owns; }
@@ -106,11 +106,16 @@ public:
void paint(QPainter *painter);
private:
- QPixmap m_pixmap;
+ void updateCachedMirroredPixmap();
+
+ QPixmap m_cachedPixmap;
QSGTexture *m_texture;
QRectF m_rect;
QRectF m_sourceRect;
bool m_owns;
+ QSGTexture::Filtering m_filtering;
+ TextureCoordinatesTransformMode m_transformMode;
+ bool m_cachedMirroredPixmapIsDirty;
};
class QSGSoftwareNinePatchNode : public QSGNinePatchNode