Since the opaque state is just as easily settable through the
Blending flag, we ditch it
Change-Id: I92598e3305bd056fdf0711f1fbd6c1be8bf88275
Reviewed-on: http://codereview.qt-project.org/4628
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
setGeometry(g);
setFlag(OwnsGeometry);
}
- static_cast<QSGVertexColorMaterial *>(material())->setColorsAreOpaque(m_gradient_is_opaque);
+ static_cast<QSGVertexColorMaterial *>(material())->setFlag(QSGMaterial::Blending, !m_gradient_is_opaque);
}
m_dirty_geometry = true;
}
-
/*!
- Sets if the renderer should treat colors as opaque.
+ int QSGVertexColorMaterial::compare() const
+
+ As the vertex color material has all its state in the vertex attributes,
+ all materials will be equal.
- Setting this flag can in some cases improve performance.
+ \internal
*/
-void QSGVertexColorMaterial::setColorsAreOpaque(bool opaqueHint)
+int QSGVertexColorMaterial::compare(const QSGMaterial *other) const
{
- setFlag(Blending, !opaqueHint);
+ return 0;
}
-
-
/*!
\internal
*/
QT_MODULE(Declarative)
-class QSGVertexColorMaterial : public QSGMaterial
+class Q_DECLARATIVE_EXPORT QSGVertexColorMaterial : public QSGMaterial
{
public:
QSGVertexColorMaterial();
- void setColorsAreOpaque(bool opaqueHint);
+ int compare(const QSGMaterial *other) const;
protected:
virtual QSGMaterialType *type() const;