diff options
author | Yotam Barnoy | 2010-11-18 11:32:53 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-11-18 11:32:53 +0000 |
commit | 50e6fe264b8d84cd40ea2b682a8c9ed2ee3dc7ae (patch) | |
tree | e49833c17fcf70e1b053e37de4be833ccb35e063 | |
parent | dde4f2211c058a109f5ee921ed3700c44cb83519 (diff) | |
download | scummvm-rg350-50e6fe264b8d84cd40ea2b682a8c9ed2ee3dc7ae.tar.gz scummvm-rg350-50e6fe264b8d84cd40ea2b682a8c9ed2ee3dc7ae.tar.bz2 scummvm-rg350-50e6fe264b8d84cd40ea2b682a8c9ed2ee3dc7ae.zip |
PSP: reduced fragmentation by allocating overlay just once
svn-id: r54316
-rw-r--r-- | backends/platform/psp/display_manager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp index 6d2c92c474..63bfe8bd24 100644 --- a/backends/platform/psp/display_manager.cpp +++ b/backends/platform/psp/display_manager.cpp @@ -283,13 +283,17 @@ void DisplayManager::init() { _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 @@ void DisplayManager::setSizeAndPixelFormat(uint width, uint height, const Graphi _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(); |