photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp
branchRCL_3
changeset 9 6b87b143d312
parent 1 9ba538e329bd
child 11 71da52165949
equal deleted inserted replaced
5:f7f0874bfe7d 9:6b87b143d312
   370     TRACER("CGlxTextureManagerImpl::CreateFlatColourTextureL");
   370     TRACER("CGlxTextureManagerImpl::CreateFlatColourTextureL");
   371     // Create a picture with the colour
   371     // Create a picture with the colour
   372 	CFbsBitmap* picture = new (ELeave) CFbsBitmap;
   372 	CFbsBitmap* picture = new (ELeave) CFbsBitmap;
   373 	CleanupStack::PushL(picture);
   373 	CleanupStack::PushL(picture);
   374 	User::LeaveIfError(picture->Create(TSize(KGlxFlatTextureSize,
   374 	User::LeaveIfError(picture->Create(TSize(KGlxFlatTextureSize,
   375 	                                        KGlxFlatTextureSize), EColor64K ) );
   375 	                                        KGlxFlatTextureSize), EColor16MU ) );
   376 
   376 
   377 	CFbsBitmapDevice* drawBufDevice = CFbsBitmapDevice::NewL(picture);
   377 	CFbsBitmapDevice* drawBufDevice = CFbsBitmapDevice::NewL(picture);
   378 	CleanupStack::PushL(drawBufDevice);
   378 	CleanupStack::PushL(drawBufDevice);
   379 
   379 
   380 	CFbsBitGc* drawBufContext;
   380 	CFbsBitGc* drawBufContext;
  1003 TMPXAttribute CGlxTextureManagerImpl::SelectAttributeL( TSize& aSize,
  1003 TMPXAttribute CGlxTextureManagerImpl::SelectAttributeL( TSize& aSize,
  1004                                               const TGlxMedia& aMedia )
  1004                                               const TGlxMedia& aMedia )
  1005     {
  1005     {
  1006     TRACER("CGlxTextureManagerImpl::SelectAttributeL");
  1006     TRACER("CGlxTextureManagerImpl::SelectAttributeL");
  1007     const CGlxMedia& media = *aMedia.Properties();
  1007     const CGlxMedia& media = *aMedia.Properties();
  1008     if ( aMedia.Properties() ==  NULL || media.Count() == 0 )
  1008     if ( !aMedia.Properties() || media.Count() == 0 )
  1009         {
  1009         {
  1010         GLX_LOG_INFO("SelectAttributeL - NULL CGlxMedia / No Attribs"); 
  1010         GLX_LOG_INFO("SelectAttributeL - NULL CGlxMedia / No Attribs"); 
  1011         User::Leave( KErrArgument );
  1011         User::Leave( KErrArgument );
  1012         }
  1012         }
  1013     // first check if DRM protected
  1013     // first check if DRM protected
  1101     TBool textureCreated = ETrue;
  1101     TBool textureCreated = ETrue;
  1102     TInt textureID = -1;
  1102     TInt textureID = -1;
  1103     TInt textureToBeUnloaded = -1;
  1103     TInt textureToBeUnloaded = -1;
  1104 
  1104 
  1105     //check if the image is decoded
  1105     //check if the image is decoded
  1106     if(aBitmap != NULL)
  1106     if ( aBitmap )
  1107         {
  1107         {
  1108         iZoomedList[aThumbnailIndex].iBitmap = aBitmap;
  1108         iZoomedList[aThumbnailIndex].iBitmap = aBitmap;
  1109 
  1109 
  1110         //if we already have a texture then dont unload the texture before creating 
  1110         //if we already have a texture then dont unload the texture before creating 
  1111         //the next one. It might happen that because of low memory we might not be able
  1111         //the next one. It might happen that because of low memory we might not be able