impress slide previews are not 256x256 so triggers assert

but they don't go through the delta mechanism, so move the assert
to the delta path, the other path is ok wrt gt 256x256

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I2ba4d8affb7645349540f3a5de31d1802f04c53d
This commit is contained in:
Caolán McNamara 2023-07-05 16:32:28 +01:00 committed by Michael Meeks
parent 75dbc5ed79
commit 0231a4d2a2

View file

@ -228,7 +228,6 @@ namespace RenderTiles
const int pixelWidth = tileCombined.getWidth();
const int pixelHeight = tileCombined.getHeight();
assert (pixelWidth > 0 && pixelHeight > 0);
assert (pixelWidth <= 256 && pixelHeight <= 256);
const size_t pixmapWidth = tilesByX * pixelWidth;
const size_t pixmapHeight = tilesByY * pixelHeight;
@ -311,6 +310,7 @@ namespace RenderTiles
{
// Can we create a delta ?
LOG_TRC("Compress new tile #" << tileIndex);
assert(pixelWidth <= 256 && pixelHeight <= 256);
deltaGen.compressOrDelta(pixmap.data(), offsetX, offsetY,
pixelWidth, pixelHeight,
pixmapWidth, pixmapHeight,