graphicscomposition/openwfcompositionengine/composition/src/wfcdevice.c
branchRCL_3
changeset 163 bbf46f59e123
parent 0 5d03bc08d59c
child 164 25ffed67c7ef
equal deleted inserted replaced
150:57c618273d5c 163:bbf46f59e123
     1 /* Copyright (c) 2009 The Khronos Group Inc.
     1 /* Copyright (c) 2009-2010 The Khronos Group Inc.
       
     2  * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
     2  *
     3  *
     3  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * copy of this software and/or associated documentation files (the
     5  * copy of this software and/or associated documentation files (the
     5  * "Materials"), to deal in the Materials without restriction, including
     6  * "Materials"), to deal in the Materials without restriction, including
     6  * without limitation the rights to use, copy, modify, merge, publish,
     7  * without limitation the rights to use, copy, modify, merge, publish,
   822     for (i = 0; i < device->providers.length; i++)
   823     for (i = 0; i < device->providers.length; i++)
   823     {
   824     {
   824         WFC_IMAGE_PROVIDER* object;
   825         WFC_IMAGE_PROVIDER* object;
   825 
   826 
   826         object = (WFC_IMAGE_PROVIDER*)OWF_Array_GetItemAt(&device->providers, i);
   827         object = (WFC_IMAGE_PROVIDER*)OWF_Array_GetItemAt(&device->providers, i);
       
   828 		OWF_ASSERT(object);
   827         if (object->handle == handle)
   829         if (object->handle == handle)
   828         {
   830         {
   829         
   831         
   830             DPRINT(("  Destroying image provider %d", handle));
   832             DPRINT(("  Destroying image provider %d", handle));
   831             
   833             
  1134             WFC_Device_DestroyImageProvider(device, provider->handle);
  1136             WFC_Device_DestroyImageProvider(device, provider->handle);
  1135         }
  1137         }
  1136     }
  1138     }
  1137 }
  1139 }
  1138 
  1140 
       
  1141 OWF_API_CALL WFCboolean
       
  1142 WFC_Device_FindScreenNumber(WFCint screenNumber)
       
  1143 {
       
  1144     WFCint i, j, deviceArrayLength, contextArrayLength;
       
  1145     WFC_DEVICE* pDevice = NULL;
       
  1146     ENTER(WFC_Device_DestroyContext);
       
  1147 
       
  1148     DPRINT(("WFC_Device_CheckScreenNumber(screenNumber = %d)", screenNumber));
       
  1149 
       
  1150     deviceArrayLength = gPhyDevice.iDeviceInstanceArray.length;
       
  1151     for (i = 0; i < deviceArrayLength; ++i)
       
  1152     {
       
  1153         pDevice = DEVICE(OWF_Array_GetItemAt(&(gPhyDevice.iDeviceInstanceArray), i));
       
  1154         OWF_ASSERT(pDevice);
       
  1155         if (pDevice)
       
  1156         {
       
  1157             contextArrayLength = pDevice->contexts.length;
       
  1158             for (j = 0; j < contextArrayLength; j++)
       
  1159             {
       
  1160                 WFC_CONTEXT*    pContext;
       
  1161                 pContext = CONTEXT(OWF_Array_GetItemAt(&pDevice->contexts, j));
       
  1162                 OWF_ASSERT(pContext);
       
  1163                 if (pContext && (pContext->screenNumber == screenNumber))
       
  1164                 {
       
  1165                     return WFC_TRUE;
       
  1166                 }
       
  1167             }
       
  1168         }
       
  1169     }
       
  1170     return WFC_FALSE;
       
  1171 }
       
  1172 
  1139 #ifdef __cplusplus
  1173 #ifdef __cplusplus
  1140 }
  1174 }
  1141 #endif
  1175 #endif