311 */ |
310 */ |
312 void CTestDriverSecondProcess::TestSurfaceInfoUsingSurfaceId() |
311 void CTestDriverSecondProcess::TestSurfaceInfoUsingSurfaceId() |
313 { |
312 { |
314 // Set attributes for the surface - these are expected attributes in the second process |
313 // Set attributes for the surface - these are expected attributes in the second process |
315 RSurfaceManager::TSurfaceCreationAttributesBuf buf; |
314 RSurfaceManager::TSurfaceCreationAttributesBuf buf; |
316 RSurfaceManager::TSurfaceCreationAttributes& attributes=buf(); |
315 RSurfaceManager::TSurfaceCreationAttributes& attributes=buf(); |
317 attributes.iSize = TSize(200,200); |
316 attributes.iSize = TSize(100,100); |
318 attributes.iBuffers = 1; |
317 attributes.iBuffers = 1; // number of buffers in the surface |
319 attributes.iPixelFormat = EUidPixelFormatARGB_1555; |
318 attributes.iPixelFormat = EUidPixelFormatYUV_422SemiPlanar; // 2bpp |
320 attributes.iStride = 415; |
319 attributes.iStride = 400; // Number of bytes between start of one line and start of next |
321 attributes.iOffsetToFirstBuffer = 80; |
320 attributes.iOffsetToFirstBuffer = 0; // way of reserving space before the surface pixel data |
322 attributes.iAlignment = 8; |
321 attributes.iAlignment = 2; // alignment, 1,2,4,8,16,32,64 byte aligned or EPageAligned |
323 attributes.iContiguous=ETrue; |
322 attributes.iContiguous=ETrue; |
324 |
323 |
325 RSurfaceManager::THintPair hints[2]; // two hint pairs specified |
324 RSurfaceManager::THintPair hints[2]; // two hint pairs specified |
326 attributes.iHintCount = 2; |
325 attributes.iHintCount = 2; |
327 attributes.iSurfaceHints = hints; |
326 attributes.iSurfaceHints = hints; |
328 hints[0].Set(TUid::Uid(0x124545), 50, EFalse); |
327 hints[0].Set(TUid::Uid(0x124545), 50, EFalse); |
329 hints[1].Set(TUid::Uid(0x237755), 50, EFalse); |
328 hints[1].Set(TUid::Uid(0x237755), 50, EFalse); |