8#include "../drivers/Mutex.h"
32 GuiImageData(
const uint8_t * i, uint8_t * dst,
int maxw=0,
int maxh=0);
41 GuiImageData(
void * t,
int w,
int h,
bool takeOwnership =
true);
51 bool reload(
const uint8_t * pngData,
int maxw = 0,
int maxh = 0);
81 bool decodeImage(
const uint8_t * pngData,
int *
width,
int *
height,
int maxw,
int maxh);
~GuiImageData()
Destructor.
GuiImageData()
Constructor.
void * texture
Attached platform-native texture.
bool reload(const uint8_t *pngData, int maxw=0, int maxh=0)
Decodes new PNG data into this object's own texture, reusing the existing allocation whenever it's al...
static void setDecodeScratch(void *buffer, unsigned int size)
Sets the scratch buffer that every decode (the PNG-decoding constructors, and reload()) will stage it...
void * getTexture()
Gets the attached platform-native texture.
int getWidth()
Gets the image width.
int height
Height of image.
int getHeight()
Gets the image height.
static Mutex & scratchLock()
A simple mutual-exclusion lock.