diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 92d3ad8d821..6ba94cfb171 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -3793,6 +3793,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span switch(data->type) { case QSpanData::Solid: solidSource = data->solidColor.alphaF() >= 1.0f; + op.noGradient = {}; op.srcFetch = nullptr; op.srcFetch64 = nullptr; op.srcFetchFP = nullptr; @@ -3821,6 +3822,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span break; case QSpanData::ConicalGradient: solidSource = !data->gradient.alphaColor; + op.noGradient = {}; // sic! op.srcFetch = qt_fetch_conical_gradient; #if QT_CONFIG(raster_64bit) op.srcFetch64 = qt_fetch_conical_gradient_rgb64; @@ -3831,6 +3833,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span break; case QSpanData::Texture: solidSource = !data->texture.hasAlpha; + op.noGradient = {}; op.srcFetch = getSourceFetch(getBlendType(data), data->texture.format); #if QT_CONFIG(raster_64bit) op.srcFetch64 = getSourceFetch64(getBlendType(data), data->texture.format); diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 7363bfff590..646a51020db 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -30,6 +30,7 @@ #include #include +#include // std::monostate QT_BEGIN_NAMESPACE @@ -210,6 +211,7 @@ struct Operator CompositionFunctionFP funcFP; union { + std::monostate noGradient; LinearGradientValues linear; RadialGradientValues radial; };