QskBoxRenderer::isGradientSupported does not need the shape

This commit is contained in:
Uwe Rathmann 2024-09-17 13:34:23 +02:00
parent ada3be71e0
commit d6b9f4edc7
5 changed files with 5 additions and 6 deletions

View File

@ -172,7 +172,7 @@ QSGNode* GradientView::updatePaintNode(
shape.setRadius( 80 );
#endif
if ( !QskBoxRenderer::isGradientSupported( shape, m_gradient ) )
if ( !QskBoxRenderer::isGradientSupported( m_gradient ) )
{
delete oldNode;
return nullptr;

View File

@ -83,7 +83,7 @@ void QskBoxNode::updateNode( const QRectF& rect,
Note, that the border is always done with a QskBoxRectangleNode
*/
if ( QskBoxRenderer::isGradientSupported( shape, gradient ) )
if ( QskBoxRenderer::isGradientSupported( gradient ) )
{
rectNode = qskNode< QskBoxRectangleNode >( this, BoxRole );
rectNode->updateNode( rect, shape, borderMetrics, borderColors, gradient );

View File

@ -67,8 +67,7 @@ static inline bool qskMaybeSpreading( const QskGradient& gradient )
return true;
}
bool QskBoxRenderer::isGradientSupported(
const QskBoxShapeMetrics&, const QskGradient& gradient )
bool QskBoxRenderer::isGradientSupported( const QskGradient& gradient )
{
if ( !gradient.isVisible() || gradient.isMonochrome() )
return true;

View File

@ -39,7 +39,7 @@ namespace QskBoxRenderer
Filling the geometry usually with color information:
see QSGGeometry::defaultAttributes_ColoredPoint2D()
*/
QSK_EXPORT bool isGradientSupported( const QskBoxShapeMetrics&, const QskGradient& );
QSK_EXPORT bool isGradientSupported( const QskGradient& );
QSK_EXPORT void renderBox( const QRectF&,
const QskBoxShapeMetrics&, const QskBoxBorderMetrics&,

View File

@ -72,7 +72,7 @@ void QskRectangleNode::updateNode(
d->rect = rect;
d->shape = effectiveShape;
if ( QskBoxRenderer::isGradientSupported( effectiveShape, effectiveGradient ) )
if ( QskBoxRenderer::isGradientSupported( effectiveGradient ) )
{
setColoring( Polychrome );