From: Timo Lotterbach Date: Mon, 11 Mar 2013 14:54:33 +0000 (-0700) Subject: GLESGraphicSystem: release shader resources on destruction X-Git-Tag: 1_0_rc~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3779ee1b0a76f5ab1bb27f7eda81c8352c05acb9;p=profile%2Fivi%2Flayer-management.git GLESGraphicSystem: release shader resources on destruction Signed-off-by: Timo Lotterbach --- diff --git a/LayerManagerPlugins/Renderers/Graphic/include/GraphicSystems/GLESGraphicSystem.h b/LayerManagerPlugins/Renderers/Graphic/include/GraphicSystems/GLESGraphicSystem.h index 5cda56b..1eab619 100644 --- a/LayerManagerPlugins/Renderers/Graphic/include/GraphicSystems/GLESGraphicSystem.h +++ b/LayerManagerPlugins/Renderers/Graphic/include/GraphicSystems/GLESGraphicSystem.h @@ -43,6 +43,8 @@ public: GLESGraphicsystem(int windowHeight, int windowWidth, PfnShaderProgramCreator shaderProgram); + ~GLESGraphicsystem(); + virtual bool init(EGLNativeDisplayType display, EGLNativeWindowType window); virtual void clearBackground(); diff --git a/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp b/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp index b9c492d..4b81179 100644 --- a/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp +++ b/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp @@ -89,6 +89,25 @@ GLESGraphicsystem::GLESGraphicsystem(int windowWidth, int windowHeight, PfnShade } } +GLESGraphicsystem::~GLESGraphicsystem() +{ + LOG_DEBUG("GLESGraphicsystem", "destroying GLESGraphicsystem"); + delete m_defaultShaderClear; + delete m_defaultShader; + delete m_defaultShaderNoBlend; + delete m_defaultShaderNoUniformAlpha; + delete m_defaultShaderAddUniformChromaKey; + delete m_defaultShaderNoUniformAlphaNoBlend; + delete m_defaultShader2surf; + delete m_defaultShader2surfNoBlend; + delete m_defaultShader2surfNoUniformAlpha; + delete m_defaultShader2surfNoUniformAlphaNoBlend; + delete m_defaultShader2surfNoUniformAlpha0; + delete m_defaultShader2surfNoUniformAlpha0NoBlend; + delete m_defaultShader2surfNoUniformAlpha1; + delete m_defaultShader2surfNoUniformAlpha1NoBlend; +} + void GLESGraphicsystem::activateGraphicContext() { eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext);