graphicscomposition/openwfsupport/src/surfacestream.cpp
changeset 152 9f1c3fea0f87
parent 36 01a6848ebfd7
child 160 969102054596
equal deleted inserted replaced
111:29ddb8a72f0e 152:9f1c3fea0f87
   668          case TSurfaceTypes::ESurfaceManagerSurface:
   668          case TSurfaceTypes::ESurfaceManagerSurface:
   669              {                         
   669              {                         
   670              if (iBufferChunk.Handle() == 0)
   670              if (iBufferChunk.Handle() == 0)
   671                  {
   671                  {
   672                  RChunk threadChunk;
   672                  RChunk threadChunk;
   673                  User::LeaveIfError(GetSingletonL().SurfaceManager().MapSurface(iSurfaceId, threadChunk));
   673                  RSurfaceManager sm;
   674 				 CleanupClosePushL(threadChunk);
   674                  sm.Open();
   675 
   675                  TInt err = sm.MapSurface(iSurfaceId, threadChunk);
       
   676                  sm.Close();
       
   677                  CleanupClosePushL(threadChunk);
       
   678                  				 			
   676 				 RChunk duplicateChunk;
   679 				 RChunk duplicateChunk;
   677 				 duplicateChunk.SetHandle(threadChunk.Handle());
   680 				 duplicateChunk.SetHandle(threadChunk.Handle());
   678 				 User::LeaveIfError(duplicateChunk.Duplicate(RThread(), EOwnerProcess));
   681                  User::LeaveIfError(duplicateChunk.Duplicate(RThread(), EOwnerProcess));
   679 
   682  
   680                  iBufferChunk.SetHandle(duplicateChunk.Handle());
   683                  iBufferChunk.SetHandle(duplicateChunk.Handle());
   681 				 CleanupStack::PopAndDestroy(&threadChunk);
   684                  CleanupStack::PopAndDestroy(&threadChunk);
   682                  }
   685                  }
   683              break;
   686              break;
   684              }
   687              }
   685 	     case TSurfaceId::EScreenSurface:
   688 	     case TSurfaceId::EScreenSurface:
   686 	         {
   689 	         {
  1365     immediateAvailable = param.immediateAvailable && ETrue;
  1368     immediateAvailable = param.immediateAvailable && ETrue;
  1366     immediateVisibility = param.immediateVisibility;
  1369     immediateVisibility = param.immediateVisibility;
  1367     serialNumber = param.serialNumber;
  1370     serialNumber = param.serialNumber;
  1368     
  1371     
  1369     
  1372     
  1370     // we take, initially in consideration "availble" even if we might not have received a consumed request status
  1373     // we take, initially in consideration "available" even if we might not have received a consumed request status
  1371     eventsToProcess = 0;
  1374     eventsToProcess = 0;
  1372     
  1375     
  1373     // we try to figure out which are the vents we have to process and to get hold of their position
  1376     // we try to figure out which are the events we have to process and to get hold of their position
  1374     // in the observers array, in order to avoid traversing it again
  1377     // in the observers array, in order to avoid traversing it again
  1375     TInt idx = iCallBacks.Count();
  1378     TInt idx = iCallBacks.Count();
  1376     //we will intend to mark the visited events, as an optimisation
  1379     //we will intend to mark the visited events, as an optimisation
  1377     TInt32 eventsToCheck = eventsReceived | ESOWF_EventAvailable;
  1380     TInt32 eventsToCheck = eventsReceived | ESOWF_EventAvailable;
  1378     TInt32 currentEvent = 0;
  1381     TInt32 currentEvent = 0;
  2132     else
  2135     else
  2133         {
  2136         {
  2134         iNewFlip = EFlippedTargetNormal;
  2137         iNewFlip = EFlippedTargetNormal;
  2135         }
  2138         }
  2136     }
  2139     }
       
  2140 
       
  2141 TInt CSurfaceStream::GetChunkHandle()
       
  2142     {
       
  2143     return iBufferChunk.Handle();
       
  2144     }