imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailscaletask.cpp
branchRCL_3
changeset 5 82749d516180
parent 0 2014ca87e772
child 7 2eb74cf6572e
equal deleted inserted replaced
1:235a7fc86938 5:82749d516180
    84 // Symbian 2nd phase constructor can leave.
    84 // Symbian 2nd phase constructor can leave.
    85 // ---------------------------------------------------------------------------
    85 // ---------------------------------------------------------------------------
    86 //
    86 //
    87 void CThumbnailScaleTask::ConstructL()
    87 void CThumbnailScaleTask::ConstructL()
    88     {
    88     {
    89     iServer.AddBitmapToPoolL( NULL, iOwnBitmap );
    89     iServer.AddBitmapToPoolL( iRequestId.iSession, iOwnBitmap, iRequestId );
    90 
    90 
    91     // Successfully added bitmap to pool, we are no longer responsible for
    91     // Successfully added bitmap to pool, we are no longer responsible for
    92     // deleting it directly.
    92     // deleting it directly.
    93     iBitmap = iOwnBitmap;
    93     iBitmap = iOwnBitmap;
    94     iOwnBitmap = NULL;
    94     iOwnBitmap = NULL;
   360             {
   360             {
   361             iServer.StoreThumbnailL( iFilename, iScaledBitmap, iOriginalSize, iCrop, iThumbnailSize, iThumbnailId, ETrue );
   361             iServer.StoreThumbnailL( iFilename, iScaledBitmap, iOriginalSize, iCrop, iThumbnailSize, iThumbnailId, ETrue );
   362             }
   362             }
   363         }    
   363         }    
   364     
   364     
   365     if ( iMessage.Handle() )
   365     if ( ClientThreadAlive() )
   366         {
   366         {
   367         TN_DEBUG1("CThumbnailScaleTask()::StoreAndCompleteL() scaled bitmap handle to params");
   367         TN_DEBUG1("CThumbnailScaleTask()::StoreAndCompleteL() scaled bitmap handle to params");
   368         
   368         
   369     	TThumbnailRequestParams& params = iParamsBuf();
   369         TThumbnailRequestParams& params = iParamsBuf();
   370 		iMessage.ReadL( 0, iParamsBuf );
   370         iMessage.ReadL( 0, iParamsBuf );
   371 		params.iBitmapHandle = iScaledBitmap->Handle();
   371                     
   372 	   
       
   373         // if need to add scaled bitmap to pool
   372         // if need to add scaled bitmap to pool
   374         if (iBitmapToPool)
   373         if (iBitmapToPool)
   375             {
   374             {
   376             TN_DEBUG1("CThumbnailScaleTask()::StoreAndCompleteL() scaled bitmap to pool");
   375             TN_DEBUG1("CThumbnailScaleTask()::StoreAndCompleteL() scaled bitmap to pool");
   377             
   376             
   378             iServer.AddBitmapToPoolL( iRequestId.iSession, iScaledBitmap );
   377             
       
   378             params.iBitmapHandle = iScaledBitmap->Handle();
       
   379             
       
   380             iServer.AddBitmapToPoolL( iRequestId.iSession, iScaledBitmap, iRequestId );
   379             iScaledBitmapHandle = params.iBitmapHandle;
   381             iScaledBitmapHandle = params.iBitmapHandle;
   380             }    
   382             }    
   381 		
   383 		
   382 	    if( params.iQualityPreference == CThumbnailManager::EOptimizeForQualityWithPreview
   384 	    if( params.iQualityPreference == CThumbnailManager::EOptimizeForQualityWithPreview
   383 	        && iEXIF && !iDoStore)
   385 	        && iEXIF && !iDoStore)