diff -r f7ac710697a9 -r 06ff229162e9 src/hbservers/hbthemeserver/hbsgimagerenderer.cpp --- a/src/hbservers/hbthemeserver/hbsgimagerenderer.cpp Mon May 03 12:48:33 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbsgimagerenderer.cpp Fri May 14 16:09:54 2010 +0300 @@ -24,6 +24,8 @@ ****************************************************************************/ #include "hbsgimagerenderer_p.h" +#include "hbnvg_p.h" + #include QHash HbSgImageRenderer::sgImageHash; @@ -39,7 +41,8 @@ currentSurface(EGL_NO_SURFACE), eglContext(EGL_NO_CONTEXT), eglConfig(0), - init(false) + init(false), + engine(0) { #ifdef HB_ICON_CACHE_DEBUG eglQueryProfilingData = 0; @@ -74,6 +77,7 @@ if (error != KErrNone) { return false; } + engine = new HbNvgEngine; } init = true; @@ -83,6 +87,7 @@ void HbSgImageRenderer::terminate() { if (init) { + eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (eglContext != EGL_NO_CONTEXT) { eglDestroyContext(display, eglContext); eglContext = EGL_NO_CONTEXT; @@ -91,8 +96,10 @@ sgDriver.Close(); eglTerminate(display); + eglReleaseThread(); display = EGL_NO_DISPLAY; - + delete engine; + engine = 0; init = false; } } @@ -117,7 +124,7 @@ eglContext = eglCreateContext(display, eglConfig, EGL_NO_CONTEXT, 0); - return true; + return eglContext != EGL_NO_CONTEXT; } bool HbSgImageRenderer::beginRendering(RSgImage * sgImage)