summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_software_surface.c
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2015-08-17 13:59:59 +0900
committerCedric BAIL <cedric@osg.samsung.com>2015-08-19 14:58:38 +0200
commit230b75acab9665dd77445de6d303d7171d3f684b (patch)
tree5652978acd9fed15676321d9e097713c5d740f7e /src/lib/ector/software/ector_software_surface.c
parentfcb2605f4f5e8c89007818bb968994a4df295ecd (diff)
ector: remove wrong implementation of singleton in software_surface class.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/ector/software/ector_software_surface.c')
-rw-r--r--src/lib/ector/software/ector_software_surface.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c
index a5583028e6..0391150701 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -8,8 +8,6 @@
8#include "ector_private.h" 8#include "ector_private.h"
9#include "ector_software_private.h" 9#include "ector_software_private.h"
10 10
11static unsigned int _software_count = 0;
12
13typedef struct _Ector_Renderer_Software_Base_Data Ector_Renderer_Software_Base_Data; 11typedef struct _Ector_Renderer_Software_Base_Data Ector_Renderer_Software_Base_Data;
14struct _Ector_Renderer_Software_Base_Data 12struct _Ector_Renderer_Software_Base_Data
15{ 13{
@@ -69,14 +67,9 @@ static Eo *
69_ector_software_surface_eo_base_constructor(Eo *obj, 67_ector_software_surface_eo_base_constructor(Eo *obj,
70 Ector_Software_Surface_Data *pd EINA_UNUSED) 68 Ector_Software_Surface_Data *pd EINA_UNUSED)
71{ 69{
72 obj = eo_do_super_ret(obj, ECTOR_SOFTWARE_SURFACE_CLASS, obj, eo_constructor()); 70 obj = eo_do_super_ret(obj, ECTOR_SOFTWARE_SURFACE_CLASS, obj, eo_constructor());
73 if(_software_count == 0) 71 pd->software = (Software_Rasterizer *) calloc(1, sizeof(Software_Rasterizer));
74 { 72 ector_software_rasterizer_init(pd->software);
75 pd->software = (Software_Rasterizer *) calloc(1, sizeof(Software_Rasterizer));
76 ector_software_rasterizer_init(pd->software);
77 }
78 _software_count++;
79
80 return obj; 73 return obj;
81} 74}
82 75
@@ -84,8 +77,6 @@ static void
84_ector_software_surface_eo_base_destructor(Eo *obj EINA_UNUSED, 77_ector_software_surface_eo_base_destructor(Eo *obj EINA_UNUSED,
85 Ector_Software_Surface_Data *pd EINA_UNUSED) 78 Ector_Software_Surface_Data *pd EINA_UNUSED)
86{ 79{
87 --_software_count;
88 if (_software_count > 0) return;
89 ector_software_rasterizer_done(pd->software); 80 ector_software_rasterizer_done(pd->software);
90 free(pd->software); 81 free(pd->software);
91 pd->software = NULL; 82 pd->software = NULL;