Remove unnecessary drawhelper member

It was just caching a pointer only used one other place where it could
be looked up.

Change-Id: I3a3455f467f8a107d24b208c8591e7c9725c3389
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
bb10
Allan Sandfeld Jensen 2018-11-13 13:04:29 +01:00
parent 5cabf50164
commit aa7ad517c7
2 changed files with 9 additions and 9 deletions

View File

@ -3827,7 +3827,6 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
bytes_per_line = image->bytesPerLine();
format = image->format();
drawHelper = qDrawHelper + format;
if (image->depth() == 1 && image->colorTable().size() == 2) {
monoDestinationWithClut = true;
const QVector<QRgb> colorTable = image->colorTable();
@ -4715,17 +4714,19 @@ void QSpanData::adjustSpanMethods()
case None:
unclipped_blend = 0;
break;
case Solid:
unclipped_blend = rasterBuffer->drawHelper->blendColor;
bitmapBlit = rasterBuffer->drawHelper->bitmapBlit;
alphamapBlit = rasterBuffer->drawHelper->alphamapBlit;
alphaRGBBlit = rasterBuffer->drawHelper->alphaRGBBlit;
fillRect = rasterBuffer->drawHelper->fillRect;
case Solid: {
const DrawHelper &drawHelper = qDrawHelper[rasterBuffer->format];
unclipped_blend = drawHelper.blendColor;
bitmapBlit = drawHelper.bitmapBlit;
alphamapBlit = drawHelper.alphamapBlit;
alphaRGBBlit = drawHelper.alphaRGBBlit;
fillRect = drawHelper.fillRect;
break;
}
case LinearGradient:
case RadialGradient:
case ConicalGradient:
unclipped_blend = rasterBuffer->drawHelper->blendGradient;
unclipped_blend = qDrawHelper[rasterBuffer->format].blendGradient;
break;
case Texture:
unclipped_blend = qBlendTexture;

View File

@ -471,7 +471,6 @@ public:
QPainter::CompositionMode compositionMode;
QImage::Format format;
DrawHelper *drawHelper;
QImage colorizeBitmap(const QImage &image, const QColor &color);
private: