MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / image

Method image

launcher/minecraft/mod/TexturePack.cpp:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48QPixmap TexturePack::image(QSize size)
49{
50 QPixmap cached_image;
51 if (QPixmapCache::find(m_pack_image_cache_key.key, &cached_image)) {
52 if (size.isNull())
53 return cached_image;
54 return cached_image.scaled(size);
55 }
56
57 // No valid image we can get
58 if (!m_pack_image_cache_key.was_ever_used)
59 return {};
60
61 // Imaged got evicted from the cache. Re-process it and retry.
62 TexturePackUtils::process(*this);
63 return image(size);
64}

Callers 3

char_linkFunction · 0.45
updateWithTexturePackMethod · 0.45

Calls 1

processFunction · 0.50

Tested by

no test coverage detected