mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1207958 - Fix heuristic for choosing which ICO sub-image to render - r=tn
This commit is contained in:
parent
eb839af130
commit
34402636fb
@ -235,8 +235,8 @@ nsICODecoder::ReadDirEntry(const char* aData)
|
||||
// choose the smallest resource that is >= the target size (i.e. we assume
|
||||
// it's better to downscale a larger icon than to upscale a smaller one).
|
||||
IntSize desiredSize = mDownscaler->TargetSize();
|
||||
int32_t delta = entrySize.width - desiredSize.width +
|
||||
entrySize.height - desiredSize.height;
|
||||
int32_t delta = std::min(entrySize.width - desiredSize.width,
|
||||
entrySize.height - desiredSize.height);
|
||||
if (e.mBitCount >= mBestResourceColorDepth &&
|
||||
((mBestResourceDelta < 0 && delta >= mBestResourceDelta) ||
|
||||
(delta >= 0 && delta <= mBestResourceDelta))) {
|
||||
|
Loading…
Reference in New Issue
Block a user