diff -r b023a8d2866a -r ea65f74e6de4 photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp --- a/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Thu Jul 15 18:39:01 2010 +0300 +++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Thu Aug 19 09:55:03 2010 +0300 @@ -39,6 +39,7 @@ #include #include #include +#include #include "mglxtextureobserver.h" namespace @@ -1236,6 +1237,18 @@ { iZoomedList[aThumbnailIndex].iBitmap = aBitmap; + CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); + CleanupClosePushL(*uiUtility); + TBool foregroundStatus = uiUtility->GetForegroundStatus(); + CleanupStack::PopAndDestroy(uiUtility); + + // Photos not in foreground; do not create zoom texture + if (!foregroundStatus) + { + GLX_LOG_INFO("CGlxTextureManagerImpl HandleBitmapDecodedL - Not in foreground; do not create zoom texture"); + return; + } + //if we already have a texture then dont unload the texture before creating //the next one. It might happen that because of low memory we might not be able //to create a new texture.