Change-Id: I4a3c9bbb49725b6f8f5a236b26e02a68fd0b6892
Signed-off-by: Sukwon Suh <sukwon.suh@samsung.com>
sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmap.get(), null);
SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmap.get(), null);
SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
- BufferInfo bufferInfo;
- bitmap.get()->Lock(bufferInfo);
- memset(bufferInfo.pPixels, 0, bufferInfo.pitch * bufferInfo.height);
- bitmap.get()->Unlock();
-
_SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex);
pSglInfo->sglIndex = sglIndex;
pSglInfo->display = dpy;
_SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex);
pSglInfo->sglIndex = sglIndex;
pSglInfo->display = dpy;
sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmapSecond.get(), null);
SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
sglIndex = (_SglIndex)_SglCreatePixmapSurface(dpy, config, (EGLNativePixmapType)bitmapSecond.get(), null);
SysTryReturn(NID_GRP, sglIndex > INVALID_SGL_INDEX, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
- bitmapSecond.get()->Lock(bufferInfo);
- memset(bufferInfo.pPixels, 0, bufferInfo.pitch * bufferInfo.height);
- bitmapSecond.get()->Unlock();
-
_SglInfo* pSglInfoSecond = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex);
pSglInfoSecond->sglIndex = sglIndex;
pSglInfoSecond->display = dpy;
_SglInfo* pSglInfoSecond = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex);
pSglInfoSecond->sglIndex = sglIndex;
pSglInfoSecond->display = dpy;
#endif //#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER)
#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
#endif //#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER)
#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+ pBitmap->Lock(bufferInfo);
+ memset(bufferInfo.pPixels, 0, bufferInfo.pitch * bufferInfo.height);
+ pBitmap->Unlock();
+
return (EGLNativePixmapType)pPixmapInfo->nativePixmap;
CATCH_06:
return (EGLNativePixmapType)pPixmapInfo->nativePixmap;
CATCH_06:
bufferInfo.bitsPerPixel = 32;
bufferInfo.pixelFormat = PIXEL_FORMAT_ARGB8888;
bufferInfo.bitsPerPixel = 32;
bufferInfo.pixelFormat = PIXEL_FORMAT_ARGB8888;
- bufferInfo.pitch = bufferInfo.width * bufferInfo.bitsPerPixel / 4;
- memset(bufferInfo.pPixels, 0, bufferInfo.width * bufferInfo.height * 4);
+ bufferInfo.pitch = bufferInfo.width * bufferInfo.bitsPerPixel / 8;
+ memset(bufferInfo.pPixels, 0, bufferInfo.pitch * bufferInfo.height);
r = pBitmapImpl->Construct(bufferInfo);
if (r != E_SUCCESS)
{
r = pBitmapImpl->Construct(bufferInfo);
if (r != E_SUCCESS)
{