Extend tiled optimization in 64-bit painting to 64-bit sources
Change-Id: I74b88781d631ee68822cd08f9cb0aca03f7b688e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>bb10
parent
08fff0cb55
commit
5e1e4b9d52
|
|
@ -5139,7 +5139,8 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD
|
|||
yoff += image_height;
|
||||
|
||||
bool isBpp32 = qPixelLayouts[data->rasterBuffer->format].bpp == QPixelLayout::BPP32;
|
||||
if (op.destFetch64 == destFetch64Undefined && image_width <= BufferSize && isBpp32) {
|
||||
bool isBpp64 = qPixelLayouts[data->rasterBuffer->format].bpp == QPixelLayout::BPP64;
|
||||
if (op.destFetch64 == destFetch64Undefined && image_width <= BufferSize && (isBpp32 || isBpp64)) {
|
||||
// If destination isn't blended into the result, we can do the tiling directly on destination pixels.
|
||||
while (count--) {
|
||||
int x = spans->x;
|
||||
|
|
@ -5173,9 +5174,14 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD
|
|||
if (sx >= image_width)
|
||||
sx = 0;
|
||||
}
|
||||
uint *dest = (uint*)data->rasterBuffer->scanLine(y) + x - image_width;
|
||||
for (int i = image_width; i < length; ++i) {
|
||||
dest[i] = dest[i - image_width];
|
||||
if (isBpp32) {
|
||||
uint *dest = reinterpret_cast<uint *>(data->rasterBuffer->scanLine(y)) + x - image_width;
|
||||
for (int i = image_width; i < length; ++i)
|
||||
dest[i] = dest[i - image_width];
|
||||
} else {
|
||||
quint64 *dest = reinterpret_cast<quint64 *>(data->rasterBuffer->scanLine(y)) + x - image_width;
|
||||
for (int i = image_width; i < length; ++i)
|
||||
dest[i] = dest[i - image_width];
|
||||
}
|
||||
++spans;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue