- added caching for true color images as well

This commit is contained in:
Christoph Oelckers 2018-12-10 02:35:10 +01:00
commit 4cd60fbe99
13 changed files with 161 additions and 83 deletions

View file

@ -41,10 +41,13 @@ public:
Height = h;
}
int CopyPixels(FBitmap *bmp) override
FBitmap GetBgraBitmap(PalEntry*, int *trans) override
{
bmp->CopyPixelDataRGB(0, 0, (uint8_t*)WorkBuffer.Data(), Width, Height, 4, Width*4, 0, CF_RGBA, nullptr);
return 0;
FBitmap bmp;
bmp.Create(Width, Height);
bmp.CopyPixelDataRGB(0, 0, (uint8_t*)WorkBuffer.Data(), Width, Height, 4, Width*4, 0, CF_RGBA, nullptr);
if (trans) *trans = 0;
return bmp;
}
uint32_t *GetBuffer()