diff -r f9e827349359 -r b023a8d2866a photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp --- a/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Mon Jun 21 15:40:32 2010 +0300 +++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Thu Jul 15 18:39:01 2010 +0300 @@ -83,6 +83,19 @@ iThumbnailList.Close(); iAnimatedTnmList.Close(); + + // delete DRM GIF textures + count = iDRMGifAnimatedTnmList.Count(); + GLX_LOG_INFO1("CGlxTextureManagerImpl iDRMGifAnimatedTnmList.Count=%d",count); + for(TInt i = count - 1; i >= 0; i--) + { + GLX_LOG_INFO1("CGlxTextureManagerImpl DRM Gif Texture deleted i=%d",i); + for(TInt texCnt = KGlxMaxFrameCount - 1; texCnt >= 0; texCnt--) + { + delete iDRMGifAnimatedTnmList[i].iTexture[texCnt]; + } + } + iDRMGifAnimatedTnmList.Close(); // delete zoom textures count = iZoomedList.Count(); @@ -563,6 +576,23 @@ iAlfTextureManager.UnloadTexture(aTexture ); } } + + i = iDRMGifAnimatedTnmList.Count(); + + while(i > 0) + { + --i; + if (iDRMGifAnimatedTnmList[i].iMediaId == aMediaId) + { + GLX_LOG_INFO("RemoveTexture 2 iDRMGifAnimatedTnmList MediaId found"); + for(TInt textureCnt=0;textureCnt 0) + { + --i; + GLX_LOG_INFO("RemoveTexture 2 iDRMGifAnimatedTnmList MediaId found"); + for (TInt textureCnt = 0; textureCnt < KGlxMaxFrameCount; textureCnt++) + { + TInt aTexture = iDRMGifAnimatedTnmList[i].iTextureId[textureCnt]; + iAlfTextureManager.UnloadTexture(aTexture); + iDRMGifAnimatedTnmList[i].iTexture[textureCnt] = NULL; + } + } } // ----------------------------------------------------------------------------- @@ -946,6 +989,29 @@ return; } } + + // add loop to search the iDRMGifAnimatedTnmList for the aTextureId + i = iDRMGifAnimatedTnmList.Count(); + while (i > 0) + { + --i; + for(TInt textureCnt=0;textureCnt 0 && aThumbnailIndex == KErrNotFound) + { + --i; + if ((iDRMGifAnimatedTnmList[i].iMediaId == aMedia.Id()) + && (iDRMGifAnimatedTnmList[i].iIdSpaceId == aIdSpaceId)) + { + aThumbnailIndex = i; + GLX_LOG_INFO( "GetDRMAnimatedGifThumbnailIndex textureid present" ); + // We have found that the best match already exists + // No need to do anything + return EFalse; + } + } + return ETrue; + }