[Scummvm-git-logs] scummvm master -> 668daec6a1057bfd2c8c862c4f0d85db27dcf093
sev-
noreply at scummvm.org
Wed Mar 18 15:41:50 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
09bf226e1a GRAPHICS: Enhance ImageArchive API with filtering setting
668daec6a1 GRAPHICS: MACGUI: Do not use bilinear filtering for MacText images
Commit: 09bf226e1a348d971dd98f1c16fc7c43c684566a
https://github.com/scummvm/scummvm/commit/09bf226e1a348d971dd98f1c16fc7c43c684566a
Author: StoneVerve (30987025+StoneVerve at users.noreply.github.com)
Date: 2026-03-18T16:41:45+01:00
Commit Message:
GRAPHICS: Enhance ImageArchive API with filtering setting
Changed paths:
graphics/image-archive.cpp
graphics/image-archive.h
diff --git a/graphics/image-archive.cpp b/graphics/image-archive.cpp
index 2246ecce366..d71701abc24 100644
--- a/graphics/image-archive.cpp
+++ b/graphics/image-archive.cpp
@@ -103,9 +103,9 @@ const Surface *ImageArchive::getImageSurface(const Common::Path &fname, int w, i
const Graphics::Surface *surf = decoder.getSurface();
- // Disable filtering when surface dimensions are not changed to improve performance
+ // Disable filtering when surface dimensions are not changed to improve performance, unless filtering is manually disable
if (w && h) {
- _imageCache[fname] = surf->scale(w, h, true);
+ _imageCache[fname] = surf->scale(w, h, _filtering);
}
else {
_imageCache[fname] = surf->scale(surf->w, surf->h, false);
diff --git a/graphics/image-archive.h b/graphics/image-archive.h
index 6a0315810aa..210d16ff492 100644
--- a/graphics/image-archive.h
+++ b/graphics/image-archive.h
@@ -45,6 +45,9 @@ public:
/* Open a new zip archive, after closing the previous one. */
bool setImageArchive(const Common::Path &fname);
+ /* Allows to disable filtering to improve perfomance when loading an image */
+ void setFiltering(bool filtering) { _filtering = filtering; }
+
/* Retrieve an image from the cache, or load it from the archive if it hasn't been loaded previously. */
const Surface *getImageSurface(const Common::Path &fname) {
return getImageSurface(fname, 0, 0);
@@ -56,6 +59,7 @@ private:
Common::HashMap<Common::Path, Surface *, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo> _imageCache;
#endif
Common::Archive *_imageArchive = nullptr;
+ bool _filtering = true;
};
} // End of namespace Graphics
Commit: 668daec6a1057bfd2c8c862c4f0d85db27dcf093
https://github.com/scummvm/scummvm/commit/668daec6a1057bfd2c8c862c4f0d85db27dcf093
Author: StoneVerve (30987025+StoneVerve at users.noreply.github.com)
Date: 2026-03-18T16:41:45+01:00
Commit Message:
GRAPHICS: MACGUI: Do not use bilinear filtering for MacText images
Improves speed in the Help Dialog
Changed paths:
graphics/macgui/mactext-canvas.cpp
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext-canvas.cpp b/graphics/macgui/mactext-canvas.cpp
index e92a184a966..92412398df3 100644
--- a/graphics/macgui/mactext-canvas.cpp
+++ b/graphics/macgui/mactext-canvas.cpp
@@ -691,7 +691,9 @@ void MacTextCanvas::render(int from, int to, ManagedSurface *target, uint32 fill
for (int i = myFrom; i != myTo; i += delta) {
if (!_text[i].picfname.empty()) {
+ _imageArchive.setFiltering(false);
const Surface *image = _imageArchive.getImageSurface(_text[i].picfname, _text[i].charwidth, _text[i].height);
+ _imageArchive.setFiltering(true);
if (image) {
int xOffset = (_text[i].width - _text[i].charwidth) / 2;
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 12d859e2b1e..663d9ad6d64 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -950,7 +950,7 @@ void MacText::draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int
if (_canvas._textShadow)
g->blitFrom(*_canvas._shadowSurface, Common::Rect(MIN<int>(_canvas._surface->w, x), MIN<int>(_canvas._surface->h, y), MIN<int>(_canvas._surface->w, x + w), MIN<int>(_canvas._surface->h, y + h)), Common::Point(xoff + _canvas._textShadow, yoff + _canvas._textShadow));
- g->transBlitFrom(*_canvas._surface, Common::Rect(MIN<int>(_canvas._surface->w, x), MIN<int>(_canvas._surface->h, y), MIN<int>(_canvas._surface->w, x + w), MIN<int>(_canvas._surface->h, y + h)), Common::Point(xoff, yoff), _canvas._tbgcolor);
+ g->simpleBlitFrom(*_canvas._surface, Common::Rect(MIN<int>(_canvas._surface->w, x), MIN<int>(_canvas._surface->h, y), MIN<int>(_canvas._surface->w, x + w), MIN<int>(_canvas._surface->h, y + h)), Common::Point(xoff, yoff));
if (_scrollBar && _scrollBorder.hasBorder(kWindowBorderScrollbar)) {
uint32 transcolor = (_wm->_pixelformat.bytesPerPixel == 1) ? _wm->_colorGreen : 0;
More information about the Scummvm-git-logs
mailing list