From: Sangjin Kim Date: Tue, 31 Jul 2012 09:41:05 +0000 (+0900) Subject: [Title] gl capability check bug fix. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1532 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf3d2cd4bebdf6e7daab5553adcf5fa2fa0f236d;p=sdk%2Femulator%2Fqemu.git [Title] gl capability check bug fix. [Type] bug fix [Module] opengl [Priority] [CQ#] [Redmine#] [Problem] glo_init() return value was not checked. [Cause] If glo_init() failed, emulator crashed. [Solution] glo_init() return value check. [TestCase] --- diff --git a/tizen/src/hw/gloffscreen_test.c b/tizen/src/hw/gloffscreen_test.c index 1e9e9bc9a0..cbeb02c55e 100644 --- a/tizen/src/hw/gloffscreen_test.c +++ b/tizen/src/hw/gloffscreen_test.c @@ -108,14 +108,27 @@ int gl_acceleration_capability_check (void) { memcpy(&datain_flip[((TY-1)-y)*bpp*TX], &datain[y*bpp*TX], bpp*TX); } - glo_init(); + if (glo_init() != 0) { + printf ("Host does not have GL hardware acceleration!(glo_init() failed)\n"); + test_failure = 1; + goto TEST_END; + } + // new surface context = glo_context_create(bufferFlags, 0); - if (context == NULL) - return 1; + if (context == NULL) { + printf ("Host does not have GL hardware acceleration!(context_create() failed)\n"); + test_failure = 1; + goto TEST_END; + } + surface = glo_surface_create(TX, TY, context); - if (surface == NULL) - return 1; + if (surface == NULL) { + printf ("Host does not have GL hardware acceleration!(surface_create() failed)\n"); + test_failure = 1; + goto TEST_END; + } + glo_surface_makecurrent(surface); printf("GL VENDOR %s\n", glGetString(GL_VENDOR)); printf("GL RENDERER %s\n", glGetString(GL_RENDERER));