[Scummvm-cvs-logs] SF.net SVN: scummvm:[54316] scummvm/trunk/backends/platform/psp/ display_manager.cpp
Bluddy at users.sourceforge.net
Bluddy at users.sourceforge.net
Thu Nov 18 12:32:54 CET 2010
Revision: 54316
http://scummvm.svn.sourceforge.net/scummvm/?rev=54316&view=rev
Author: Bluddy
Date: 2010-11-18 11:32:53 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
PSP: reduced fragmentation by allocating overlay just once
Modified Paths:
--------------
scummvm/trunk/backends/platform/psp/display_manager.cpp
Modified: scummvm/trunk/backends/platform/psp/display_manager.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/display_manager.cpp 2010-11-18 11:31:46 UTC (rev 54315)
+++ scummvm/trunk/backends/platform/psp/display_manager.cpp 2010-11-18 11:32:53 UTC (rev 54316)
@@ -283,13 +283,17 @@
_masterGuRenderer.setupCallbackThread();
#endif
+ // Init overlay since we never change the size
+ _overlay->deallocate();
+ _overlay->setBytesPerPixel(sizeof(OverlayColor));
+ _overlay->setSize(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
+ _overlay->allocate();
}
void DisplayManager::setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format) {
DEBUG_ENTER_FUNC();
PSP_DEBUG_PRINT("w[%u], h[%u], pformat[%p]\n", width, height, format);
- _overlay->deallocate();
_screen->deallocate();
_screen->setScummvmPixelFormat(format);
@@ -298,10 +302,6 @@
_cursor->setScreenPaletteScummvmPixelFormat(format);
- _overlay->setBytesPerPixel(sizeof(OverlayColor));
- _overlay->setSize(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
- _overlay->allocate();
-
_displayParams.screenSource.width = width;
_displayParams.screenSource.height = height;
calculateScaleParams();
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