[Scummvm-cvs-logs] SF.net SVN: scummvm:[35029] scummvm/trunk/gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Nov 12 23:23:19 CET 2008


Revision: 35029
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35029&view=rev
Author:   fingolfin
Date:     2008-11-12 22:23:19 +0000 (Wed, 12 Nov 2008)

Log Message:
-----------
GUI: Blitting the full screen to the backbuffer (or vice versa) can be done with a single memcpy, which is a bit faster than using _vectorRenderer->blitSurface

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeEngine.cpp
    scummvm/trunk/gui/ThemeEngine.h

Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp	2008-11-12 22:15:47 UTC (rev 35028)
+++ scummvm/trunk/gui/ThemeEngine.cpp	2008-11-12 22:23:19 UTC (rev 35029)
@@ -320,7 +320,7 @@
 	_widgets[type]->_backgroundOffset = maxShadow;
 }
 
-void ThemeEngine::restoreBackground(Common::Rect r, bool special) {
+void ThemeEngine::restoreBackground(Common::Rect r) {
 	r.clip(_screen->w, _screen->h); // AHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA... Oh god. :(
 	_vectorRenderer->blitSurface(_backBuffer, r);
 }
@@ -914,7 +914,7 @@
 		}
 
 		_vectorRenderer->setSurface(_screen);
-		_vectorRenderer->blitSurface(_backBuffer, Common::Rect(0, 0, _screen->w, _screen->h));
+		memcpy(_screen->getBasePtr(0,0), _backBuffer->getBasePtr(0,0), _screen->pitch * _screen->h);
 		_bufferQueue.clear();
 	}
 
@@ -957,8 +957,7 @@
 		addDirtyRect(Common::Rect(0, 0, _screen->w, _screen->h));
 	}
 
-	_vectorRenderer->setSurface(_backBuffer);
-	_vectorRenderer->blitSurface(_screen, Common::Rect(0, 0, _screen->w, _screen->h));
+	memcpy(_backBuffer->getBasePtr(0,0), _screen->getBasePtr(0,0), _screen->pitch * _screen->h);
 	_vectorRenderer->setSurface(_screen);
 }
 

Modified: scummvm/trunk/gui/ThemeEngine.h
===================================================================
--- scummvm/trunk/gui/ThemeEngine.h	2008-11-12 22:15:47 UTC (rev 35028)
+++ scummvm/trunk/gui/ThemeEngine.h	2008-11-12 22:23:19 UTC (rev 35029)
@@ -493,9 +493,8 @@
 	 *	The actual processing is done in the VectorRenderer.
 	 *
 	 *	@param r Area to restore.
-	 *	@param special Deprecated.
 	 */
-	void restoreBackground(Common::Rect r, bool special = false);
+	void restoreBackground(Common::Rect r);
 
 	/**
 	 *	Checks if a given DrawData set for a widget has been cached beforehand


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list