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

sev- sev at scummvm.org
Sat Sep 3 21:20:38 CEST 2016


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

Summary:
7910123446 SDL: Optimize OSD drawing
b8ee5322f4 JANITORIAL: Remove trailing whitespaces


Commit: 791012344607df1bd364da3e751dc9ad86445c62
    https://github.com/scummvm/scummvm/commit/791012344607df1bd364da3e751dc9ad86445c62
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T21:20:02+02:00

Commit Message:
SDL: Optimize OSD drawing

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 fdf2101..29f94c3 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1199,7 +1199,8 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
 		drawMouse();
 
 #ifdef USE_OSD
-		SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
+		if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT)
+			SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
 #endif
 
 #ifdef USE_SDL_DEBUG_FOCUSRECT


Commit: b8ee5322f4e5c277fcf55852dade79c643cf8cc3
    https://github.com/scummvm/scummvm/commit/b8ee5322f4e5c277fcf55852dade79c643cf8cc3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T21:20:16+02:00

Commit Message:
JANITORIAL: Remove trailing whitespaces

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 29f94c3..f4a466d 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1091,7 +1091,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
 				dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2;
 				dstRect.w = _osdMessageSurface->w;
 				dstRect.h = _osdMessageSurface->h;
-				blitOSDMessage(dstRect);				
+				blitOSDMessage(dstRect);
 			}
 		}
 	}
@@ -2178,13 +2178,13 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const char *msg) {
 		SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
 		width, height, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF
 	);
-	
+
 	// Lock the surface
 	if (SDL_LockSurface(_osdMessageSurface))
 		error("displayMessageOnOSD: SDL_LockSurface failed: %s", SDL_GetError());
 
 	// Draw a dark gray rect
-	// TODO: Rounded corners ? Border?	
+	// TODO: Rounded corners ? Border?
 	SDL_FillRect(_osdMessageSurface, nullptr, SDL_MapRGB(_osdMessageSurface->format, 64, 64, 64));
 
 	Graphics::Surface dst;
@@ -2258,7 +2258,7 @@ void SurfaceSdlGraphicsManager::copyRectToOSD(const void *buf, int pitch, int x,
 }
 
 void SurfaceSdlGraphicsManager::clearOSD() {
-	assert(_transactionMode == kTransactionNone);	
+	assert(_transactionMode == kTransactionNone);
 
 	Common::StackLock lock(_graphicsMutex);	// Lock the mutex until this function ends
 
@@ -2292,7 +2292,7 @@ void SurfaceSdlGraphicsManager::removeOSDMessage() {
 		osdRect.w = _osdMessageSurface->w;
 		osdRect.h = _osdMessageSurface->h;
 		SDL_FillRect(_osdSurface, &osdRect, kOSDColorKey);
-		SDL_FreeSurface(_osdMessageSurface);		
+		SDL_FreeSurface(_osdMessageSurface);
 	}
 
 	_osdMessageSurface = NULL;





More information about the Scummvm-git-logs mailing list