From: Karthik Bhat Date: Tue, 7 May 2019 08:26:07 +0000 (+0530) Subject: Refactor code. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fad538ead0d772106f0299c3f2feed7f49bb9e30;p=sdk%2Femulator%2Fqemu.git Refactor code. Change-Id: I08c61c2a7dcea11bf85680807aeb5f834f3eb936 Signed-off-by: Karthik Bhat --- diff --git a/hw/yagl/yagl_drivers/egl_cgl/yagl_egl_cgl.c b/hw/yagl/yagl_drivers/egl_cgl/yagl_egl_cgl.c index 40b15b15be..90cd0bc332 100644 --- a/hw/yagl/yagl_drivers/egl_cgl/yagl_egl_cgl.c +++ b/hw/yagl/yagl_drivers/egl_cgl/yagl_egl_cgl.c @@ -380,7 +380,6 @@ static EGLSurface yagl_egl_cgl_pbuffer_surface_create(struct yagl_egl_driver *dr { CGLPBufferObj pbuffer = NULL; CGLError error; - bool is_3_2_core = false; YAGL_LOG_FUNC_ENTER(yagl_egl_cgl_pbuffer_surface_create, "dpy = %p, width = %d, height = %d", @@ -388,15 +387,12 @@ static EGLSurface yagl_egl_cgl_pbuffer_surface_create(struct yagl_egl_driver *dr width, height); - if (driver->gl_version > yagl_gl_2) - is_3_2_core = true; - // TODO: Migrate to Metal Framework // CGLCreatePBuffer is deprecated on MAC. // Below hack is to fix Emulator launch issue on MAC. // The surface returned by CGLCreatePBuffer is not used in case of opengl 3.2 // Hence return dummy surface in case of opengl 3.2 instead of returning null and exiting. - if (is_3_2_core) { + if (driver->gl_version > yagl_gl_2) { YAGL_LOG_INFO("Creating Dummy EGLSurface\n"); pbuffer = (EGLSurface)1; } @@ -424,15 +420,14 @@ static void yagl_egl_cgl_pbuffer_surface_destroy(struct yagl_egl_driver *driver, "dpy = %p, sfc = %p", dpy, sfc); - if (driver->gl_version > yagl_gl_2) - goto done; - - error = CGLDestroyPBuffer((CGLPBufferObj)sfc); + if (!(driver->gl_version > yagl_gl_2)) { + error = CGLDestroyPBuffer((CGLPBufferObj)sfc); - if (error) { - YAGL_LOG_ERROR("CGLDestroyPBuffer failed: %s", CGLErrorString(error)); + if (error) { + YAGL_LOG_ERROR("CGLDestroyPBuffer failed: %s", CGLErrorString(error)); + } } -done: + YAGL_LOG_FUNC_EXIT(NULL); } @@ -520,7 +515,7 @@ static bool yagl_egl_cgl_make_current(struct yagl_egl_driver *driver, draw, read, ctx); - + // Call CGLSetPBuffer only in case a valid CGLCreatePBuffer is created. if (cgl_ctx && !cgl_ctx->is_3_2_core) { if (read_pbuffer) { error = CGLSetPBuffer(cgl_ctx->base, read_pbuffer, 0, 0, 0); diff --git a/package/changelog b/package/changelog index 0a79ffe9c3..ef3285df98 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,6 @@ +* 2.8.0.29 +- Refactor code. +== Karthik Bhat 2019-05-07 * 2.8.0.28 - YAGL: Fix emulator launch fail on MAC == Karthik Bhat 2019-05-07 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index aa3d4ee8c3..508783f3e0 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version: 2.8.0.28 +Version: 2.8.0.29 Maintainer: SeokYeon Hwang Source: emulator