899 TRequestStatus status; |
899 TRequestStatus status; |
900 |
900 |
901 // Set attributs for creating the surface |
901 // Set attributs for creating the surface |
902 RSurfaceManager::TSurfaceCreationAttributesBuf buf; |
902 RSurfaceManager::TSurfaceCreationAttributesBuf buf; |
903 RSurfaceManager::TSurfaceCreationAttributes& attributes=buf(); |
903 RSurfaceManager::TSurfaceCreationAttributes& attributes=buf(); |
904 attributes.iSize = TSize(200,200); |
904 attributes.iSize = TSize(100,100); |
905 attributes.iBuffers = 1; |
905 attributes.iBuffers = 1; // number of buffers in the surface |
906 attributes.iPixelFormat = EUidPixelFormatARGB_1555; |
906 attributes.iPixelFormat = EUidPixelFormatYUV_422SemiPlanar; // 2bpp |
907 attributes.iStride = 415; |
907 attributes.iStride = 400; // Number of bytes between start of one line and start of next |
908 attributes.iOffsetToFirstBuffer = 80; |
908 attributes.iOffsetToFirstBuffer = 0; // way of reserving space before the surface pixel data |
909 attributes.iAlignment = 8; |
909 attributes.iAlignment = 2; // alignment, 1,2,4,8,16,32,64 byte aligned or EPageAligned |
910 attributes.iContiguous=ETrue; |
910 attributes.iContiguous=ETrue; |
911 |
911 |
912 RSurfaceManager::THintPair hints[2]; // two hint pairs specified |
912 RSurfaceManager::THintPair hints[2]; // two hint pairs specified |
913 attributes.iHintCount = 2; |
913 attributes.iHintCount = 2; |
914 attributes.iSurfaceHints = hints; |
914 attributes.iSurfaceHints = hints; |
915 hints[0].Set(TUid::Uid(0x124545), 50, EFalse); |
915 hints[0].Set(TUid::Uid(0x124545), 50, EFalse); |