devilhorns pushed a commit to branch master.

commit 79b65ab1846b8130aa08d2c8805fde5c150923d9
Author: Chris Michael <[email protected]>
Date:   Tue Apr 30 07:23:40 2013 +0100

    Override the output_free engine function.
    Add code to cleanup on engine shutdown.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/evas/engines/drm/evas_engine.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/modules/evas/engines/drm/evas_engine.c 
b/src/modules/evas/engines/drm/evas_engine.c
index b025432..38107e5 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -171,6 +171,22 @@ eng_setup(Evas *evas, void *einfo)
    return 1;
 }
 
+static void 
+eng_output_free(void *data)
+{
+   Render_Engine *re;
+
+   if ((re = data))
+     {
+        if (re->ob) evas_outbuf_free(re->ob);
+        if (re->tb) evas_common_tilebuf_free(re->tb);
+        free(re);
+     }
+
+   evas_common_font_shutdown();
+   evas_common_image_shutdown();
+}
+
 /* module api functions */
 static int
 module_open(Evas_Module *em)
@@ -199,6 +215,7 @@ module_open(Evas_Module *em)
    EVAS_API_OVERRIDE(info, &func, eng_);
    EVAS_API_OVERRIDE(info_free, &func, eng_);
    EVAS_API_OVERRIDE(setup, &func, eng_);
+   EVAS_API_OVERRIDE(output_free, &func, eng_);
 
    /* advertise our engine functions */
    em->functions = (void *)(&func);

-- 

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1

Reply via email to