[Scummvm-git-logs] scummvm branch-1-9 -> f801e07b4acd30a2e7eaa4129ab6587a93850343
bgK
bastien.bouclet at gmail.com
Mon Oct 3 07:48:26 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f801e07b4a SDL: Switch to full screen updates when the OSD is transparent
Commit: f801e07b4acd30a2e7eaa4129ab6587a93850343
https://github.com/scummvm/scummvm/commit/f801e07b4acd30a2e7eaa4129ab6587a93850343
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2016-10-03T07:34:14+02:00
Commit Message:
SDL: Switch to full screen updates when the OSD is transparent
Previous releases also did full screen updates for transparent OSD messages.
There should be no performance regression with that regard.
Computing smaller update rects is non trivial, but should be looked into if
performance is an issue for OSD icons.
Fixes #9598
Changed paths:
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index adb84bf..46e243c 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2176,9 +2176,8 @@ void SurfaceSdlGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
if (_osdIconSurface && !icon) {
- // Add a dirty rect to clear the icon on the next update
- SDL_Rect dstRect = getOSDIconRect();
- addDirtyRect(dstRect.x, dstRect.y, dstRect.w, dstRect.h, true);
+ // Force a redraw to clear the icon on the next update
+ _forceFull = true;
}
if (_osdIconSurface) {
@@ -2249,6 +2248,7 @@ void SurfaceSdlGraphicsManager::updateOSD() {
_osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
}
SDL_SetAlpha(_osdMessageSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdMessageAlpha);
+ _forceFull = true;
}
if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) {
@@ -2256,14 +2256,9 @@ void SurfaceSdlGraphicsManager::updateOSD() {
}
}
- if (_osdMessageSurface) {
- SDL_Rect dstRect = getOSDMessageRect();
- addDirtyRect(dstRect.x, dstRect.y, dstRect.w, dstRect.h, true);
- }
-
if (_osdIconSurface) {
- SDL_Rect dstRect = getOSDIconRect();
- addDirtyRect(dstRect.x, dstRect.y, dstRect.w, dstRect.h, true);
+ // Redraw the area below the icon for the transparent blit to give correct results.
+ _forceFull = true;
}
}
More information about the Scummvm-git-logs
mailing list