Display* pNativeDisplay = null;
Drawable nativeWindow = 0;
Tizen::Graphics::_BitmapImpl* pBitmapImpl = null;
- _PixmapInfo* pPixmapInfo = null;
#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+ _PixmapInfo* pPixmapInfo = null;
unsigned int attachments[] = { DRI2BufferFrontLeft };
char* pDeviceName = null;
char* pDriverName = null;
pNativeDisplay = (Display*) ecore_x_display_get();
nativeWindow = DefaultRootWindow(pNativeDisplay);
+#if defined(FGRAPHICS_INTERNAL_USE_DRM)
pPixmapInfo = new (std::nothrow) _PixmapInfo;
if (pPixmapInfo == null)
{
goto CATCH_02;
}
-#if defined(FGRAPHICS_INTERNAL_USE_DRM)
DRI2CreateDrawable(pNativeDisplay, pPixmapInfo->nativePixmap);
XSync(pNativeDisplay, False);
{
goto CATCH_06;
}
-#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
return (EGLNativePixmapType)pPixmapInfo->nativePixmap;
+#else
+ return (EGLNativePixmapType)XCreatePixmap(pNativeDisplay, nativeWindow, width, height, bitsPerPixel);
+#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM)
+
#if defined(FGRAPHICS_INTERNAL_USE_DRM)
CATCH_06:
DRI2DestroyDrawable(pNativeDisplay, pPixmapInfo->nativePixmap);
XFreePixmap(pNativeDisplay, pPixmapInfo->nativePixmap);
//fall through
-#endif
CATCH_02:
delete pPixmapInfo;
//fall through
+#endif
CATCH_01:
SysLog(NID_GRP, "_CreateNativePixmap failed!! pBitmap:%#x", (unsigned int)pBitmap);