QskBoxRenderer::isGradientSupported does not need the shape
This commit is contained in:
parent
ada3be71e0
commit
d6b9f4edc7
@ -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;
|
||||
|
@ -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 );
|
||||
|
@ -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;
|
||||
|
@ -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&,
|
||||
|
@ -72,7 +72,7 @@ void QskRectangleNode::updateNode(
|
||||
d->rect = rect;
|
||||
d->shape = effectiveShape;
|
||||
|
||||
if ( QskBoxRenderer::isGradientSupported( effectiveShape, effectiveGradient ) )
|
||||
if ( QskBoxRenderer::isGradientSupported( effectiveGradient ) )
|
||||
{
|
||||
setColoring( Polychrome );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user