61 User::LeaveIfError(surfaceManager.Open()); |
61 User::LeaveIfError(surfaceManager.Open()); |
62 // Store the attributes used to create the Surface |
62 // Store the attributes used to create the Surface |
63 RSurfaceManager::TSurfaceCreationAttributesBuf buf; |
63 RSurfaceManager::TSurfaceCreationAttributesBuf buf; |
64 RSurfaceManager::TSurfaceCreationAttributes& attributes = buf(); |
64 RSurfaceManager::TSurfaceCreationAttributes& attributes = buf(); |
65 |
65 |
66 attributes.iSize = TSize(361,341); // w > 0, h > 0 |
66 attributes.iSize = TSize(320, 240); // w > 0, h > 0 |
67 attributes.iBuffers = 4; // > 0, <= 4 |
67 attributes.iBuffers = 4; // > 0, <= 4 |
68 attributes.iPixelFormat = EUidPixelFormatYUV_422Planar; // 2bpp |
68 attributes.iPixelFormat = EUidPixelFormatYUV_422Interleaved; // 1bpp |
69 attributes.iStride = 1400; // > 0, width * bpp |
69 attributes.iStride = 320; // > 0, width * bpp |
70 attributes.iOffsetToFirstBuffer = 184; // > 0, divisible by alignment |
70 attributes.iOffsetToFirstBuffer = 184; // > 0, divisible by alignment |
71 attributes.iAlignment = 4; // 1 || 2 || 4 || 8 |
71 attributes.iAlignment = 4; // 1 || 2 || 4 || 8 |
72 attributes.iContiguous = EFalse; |
72 attributes.iContiguous = EFalse; |
73 attributes.iMappable = ETrue; |
73 attributes.iMappable = ETrue; |
74 |
74 |