[Scummvm-git-logs] scummvm master -> dc598bd8e9ab2af5b002929b590b15ac9345d956

lephilousophe noreply at scummvm.org
Thu May 29 15:18:12 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
dc598bd8e9 GRAPHICS: Disable filtering when scaling image to its original size


Commit: dc598bd8e9ab2af5b002929b590b15ac9345d956
    https://github.com/scummvm/scummvm/commit/dc598bd8e9ab2af5b002929b590b15ac9345d956
Author: Łukasz Lenkiewicz (lukasz at lenkiewicz.xyz)
Date: 2025-05-29T17:18:08+02:00

Commit Message:
GRAPHICS: Disable filtering when scaling image to its original size

Changed paths:
    graphics/image-archive.cpp


diff --git a/graphics/image-archive.cpp b/graphics/image-archive.cpp
index 235e0d7bf6c..bc195d12a72 100644
--- a/graphics/image-archive.cpp
+++ b/graphics/image-archive.cpp
@@ -101,7 +101,14 @@ const Surface *ImageArchive::getImageSurface(const Common::Path &fname, int w, i
 	}
 
 	const Graphics::Surface *surf = decoder.getSurface();
-	_imageCache[fname] = surf->scale(w ? w : surf->w, h ? h : surf->h, true);
+
+	// Disable filtering when surface dimensions are not changed to improve performance
+	if (w && h) {
+		_imageCache[fname] = surf->scale(w, h, true);
+	}
+	else {
+		_imageCache[fname] = surf->scale(surf->w, surf->h, false);
+	}
 
 	return _imageCache[fname];
 #endif // USE_PNG




More information about the Scummvm-git-logs mailing list