- decoupled the software renderer entirely from FTexture - it will only look at FSoftwareTexture now, all access to the texture manager has been wrapped.

This commit is contained in:
Christoph Oelckers 2020-04-14 00:42:13 +02:00
commit 9593cb56ae
23 changed files with 170 additions and 162 deletions

View file

@ -64,7 +64,7 @@ FSWCanvasTexture::~FSWCanvasTexture()
const uint8_t *FSWCanvasTexture::GetPixels(int style)
{
static_cast<FCanvasTexture*>(mTexture)->NeedUpdate();
static_cast<FCanvasTexture*>(mSource)->NeedUpdate();
if (Canvas == nullptr)
{
MakeTexture();
@ -81,7 +81,7 @@ const uint8_t *FSWCanvasTexture::GetPixels(int style)
const uint32_t *FSWCanvasTexture::GetPixelsBgra()
{
static_cast<FCanvasTexture*>(mTexture)->NeedUpdate();
static_cast<FCanvasTexture*>(mSource)->NeedUpdate();
if (CanvasBgra == nullptr)
{
MakeTextureBgra();
@ -181,5 +181,5 @@ void FSWCanvasTexture::UpdatePixels(bool truecolor)
ImageHelpers::FlipNonSquareBlockRemap(Pixels.Data(), Canvas->GetPixels(), GetWidth(), GetHeight(), Canvas->GetPitch(), GPalette.Remap);
}
static_cast<FCanvasTexture*>(mTexture)->SetUpdated(false);
static_cast<FCanvasTexture*>(mSource)->SetUpdated(false);
}