graphicscomposition/openwfcompositionengine/composition/src/wfcdevice.c
changeset 152 9f1c3fea0f87
parent 36 01a6848ebfd7
equal deleted inserted replaced
111:29ddb8a72f0e 152:9f1c3fea0f87
     1 /* Copyright (c) 2009-2010 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,
  1135             WFC_Device_DestroyImageProvider(device, provider->handle);
  1136             WFC_Device_DestroyImageProvider(device, provider->handle);
  1136         }
  1137         }
  1137     }
  1138     }
  1138 }
  1139 }
  1139 
  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 
  1140 #ifdef __cplusplus
  1173 #ifdef __cplusplus
  1141 }
  1174 }
  1142 #endif
  1175 #endif