Mask potentially undefined alpha in blend_transformed_argb
Makes sure the ARGB32PM that is painted on always have a defined alpha. Task-number: QTBUG-55645 Change-Id: Ifcf5fcc2127d255518eca4763845a197da6c7914 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
e739e984c3
commit
3dd0308634
@ -4719,6 +4719,7 @@ static void blend_transformed_argb(int count, const QSpan *spans, void *userData
|
||||
|
||||
CompositionFunction func = functionForMode[data->rasterBuffer->compositionMode];
|
||||
uint buffer[buffer_size];
|
||||
quint32 mask = (data->texture.format == QImage::Format_RGB32) ? 0xff000000 : 0;
|
||||
|
||||
const int image_x1 = data->texture.x1;
|
||||
const int image_y1 = data->texture.y1;
|
||||
@ -4752,7 +4753,7 @@ static void blend_transformed_argb(int count, const QSpan *spans, void *userData
|
||||
while (b < end) {
|
||||
int px = qBound(image_x1, x >> 16, image_x2);
|
||||
int py = qBound(image_y1, y >> 16, image_y2);
|
||||
*b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px];
|
||||
*b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px] | mask;
|
||||
|
||||
x += fdx;
|
||||
y += fdy;
|
||||
@ -4793,7 +4794,7 @@ static void blend_transformed_argb(int count, const QSpan *spans, void *userData
|
||||
const int px = qBound(image_x1, int(tx) - (tx < 0), image_x2);
|
||||
const int py = qBound(image_y1, int(ty) - (ty < 0), image_y2);
|
||||
|
||||
*b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px];
|
||||
*b = reinterpret_cast<const uint *>(data->texture.scanLine(py))[px] | mask;
|
||||
x += fdx;
|
||||
y += fdy;
|
||||
w += fdw;
|
||||
|
Loading…
x
Reference in New Issue
Block a user