Add AA table caching

This commit is contained in:
elasota
2020-11-13 00:52:10 -05:00
parent 9dafba1092
commit 30b39c6991
3 changed files with 70 additions and 6 deletions

View File

@@ -11,7 +11,13 @@ namespace PortabilityLayer
// Striped 256x16 because constant background color is more likely than constant sample
uint8_t m_aaTranslate[256][16];
void GenerateForPalette(const RGBAColor &baseColor, const RGBAColor *colors, size_t numColors);
void GenerateForSimpleScale(uint8_t colorChannel);
void GenerateForPalette(const RGBAColor &baseColor, const RGBAColor *colors, size_t numColors, bool cacheable);
void GenerateForSimpleScale(uint8_t colorChannel, bool cacheable);
private:
bool LoadFromCache(const char *path);
void SaveToCache(const char *path);
static const unsigned int kCacheVersion = 1;
};
}