Change-Id: Ic6229c777a30191ba131b3896984da4f3fecc9d5
Reviewed-on: http://codereview.qt.nokia.com/4066
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
return new FlatColorMaterialShader;
}
+
+int QSGFlatColorMaterial::compare(const QSGMaterial *other) const
+{
+ const QSGFlatColorMaterial *flat = static_cast<const QSGFlatColorMaterial *>(other);
+ return m_color.rgba() - flat->color().rgba();
+
+}
+
QT_END_NAMESPACE
void setColor(const QColor &color);
const QColor &color() const { return m_color; }
+ int compare(const QSGMaterial *other) const;
+
private:
QColor m_color;
};