mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
The cache manager now differentiates between mipmapped and non-mipmapped images.
This commit is contained in:
parent
ad0cfdba8b
commit
486942c792
|
@ -179,7 +179,7 @@ std::shared_ptr<TextureResource> TextureResource::get(const std::string& path,
|
||||||
const bool isScalable {Utils::String::toLower(canonicalPath.substr(
|
const bool isScalable {Utils::String::toLower(canonicalPath.substr(
|
||||||
canonicalPath.size() - 4, std::string::npos)) == ".svg"};
|
canonicalPath.size() - 4, std::string::npos)) == ".svg"};
|
||||||
|
|
||||||
TextureKeyType key {canonicalPath, tile, linearMagnify, isScalable, width, height};
|
TextureKeyType key {canonicalPath, tile, linearMagnify, mipmapping, isScalable, width, height};
|
||||||
auto foundTexture = sTextureMap.find(key);
|
auto foundTexture = sTextureMap.find(key);
|
||||||
|
|
||||||
std::string resolutionInfo;
|
std::string resolutionInfo;
|
||||||
|
|
|
@ -105,8 +105,8 @@ private:
|
||||||
bool mInvalidSVGFile;
|
bool mInvalidSVGFile;
|
||||||
bool mForceLoad;
|
bool mForceLoad;
|
||||||
|
|
||||||
// File path, tile, linear interpolation, scalable/SVG, width, height.
|
// File path, tile, linear interpolation, mipmapping, scalable/SVG, width, height.
|
||||||
using TextureKeyType = std::tuple<std::string, bool, bool, bool, size_t, size_t>;
|
using TextureKeyType = std::tuple<std::string, bool, bool, bool, bool, size_t, size_t>;
|
||||||
// Map of textures, used to prevent duplicate textures.
|
// Map of textures, used to prevent duplicate textures.
|
||||||
static inline std::map<TextureKeyType, std::weak_ptr<TextureResource>> sTextureMap;
|
static inline std::map<TextureKeyType, std::weak_ptr<TextureResource>> sTextureMap;
|
||||||
// Set of all textures, used for memory management.
|
// Set of all textures, used for memory management.
|
||||||
|
|
Loading…
Reference in a new issue