summaryrefslogtreecommitdiff
path: root/legacy/evas
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2009-12-27 00:40:25 +0000
committerCarsten Haitzler <raster@rasterman.com>2009-12-27 00:40:25 +0000
commitc3f6caa568ed8980daf7ec8d64b1f49f723f9e3c (patch)
tree431ef0bcf40a386efe776955829b6f8cca402096 /legacy/evas
parent8c14ca031eb7c115c198813e8b830537d8d48490 (diff)
gl -> polygons now work. slow - but does it matter?
SVN revision: 44724
Diffstat (limited to 'legacy/evas')
-rw-r--r--legacy/evas/src/modules/engines/gl_common/Makefile.am4
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_common.h22
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_polygon.c375
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_rectangle.c2
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c8
5 files changed, 269 insertions, 142 deletions
diff --git a/legacy/evas/src/modules/engines/gl_common/Makefile.am b/legacy/evas/src/modules/engines/gl_common/Makefile.am
index fc4ec02eba..3b357b6b3b 100644
--- a/legacy/evas/src/modules/engines/gl_common/Makefile.am
+++ b/legacy/evas/src/modules/engines/gl_common/Makefile.am
@@ -39,8 +39,8 @@ shader/tex_vert_bin_s3c6410.h \
39evas_gl_rectangle.c \ 39evas_gl_rectangle.c \
40evas_gl_texture.c \ 40evas_gl_texture.c \
41evas_gl_image.c \ 41evas_gl_image.c \
42evas_gl_font.c 42evas_gl_font.c \
43 43evas_gl_polygon.c
44 44
45#evas_gl_gradient.c \ 45#evas_gl_gradient.c \
46#evas_gl_line.c \ 46#evas_gl_line.c \
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
index 919d58fc9a..48ab923cb2 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
@@ -55,12 +55,10 @@ typedef struct _Evas_GL_Texture_Pool Evas_GL_Texture_Pool;
55typedef struct _Evas_GL_Texture Evas_GL_Texture; 55typedef struct _Evas_GL_Texture Evas_GL_Texture;
56typedef struct _Evas_GL_Image Evas_GL_Image; 56typedef struct _Evas_GL_Image Evas_GL_Image;
57typedef struct _Evas_GL_Font_Texture Evas_GL_Font_Texture; 57typedef struct _Evas_GL_Font_Texture Evas_GL_Font_Texture;
58/*
59typedef struct _Evas_GL_Polygon Evas_GL_Polygon; 58typedef struct _Evas_GL_Polygon Evas_GL_Polygon;
60typedef struct _Evas_GL_Polygon_Point Evas_GL_Polygon_Point; 59typedef struct _Evas_GL_Polygon_Point Evas_GL_Polygon_Point;
60/*
61typedef struct _Evas_GL_Gradient Evas_GL_Gradient; 61typedef struct _Evas_GL_Gradient Evas_GL_Gradient;
62typedef struct _Evas_GL_Font_Texture_Pool Evas_GL_Font_Texture_Pool;
63typedef struct _Evas_GL_Font_Texture_Pool_Allocation Evas_GL_Font_Texture_Pool_Allocation;
64*/ 62*/
65 63
66struct _Evas_GL_Program 64struct _Evas_GL_Program
@@ -189,11 +187,10 @@ struct _Evas_GL_Font_Texture
189{ 187{
190 Evas_GL_Texture *tex; 188 Evas_GL_Texture *tex;
191}; 189};
192/* 190
193struct _Evas_GL_Polygon 191struct _Evas_GL_Polygon
194{ 192{
195 Eina_List *points; 193 Eina_List *points;
196 GLuint dl;
197 Eina_Bool changed : 1; 194 Eina_Bool changed : 1;
198}; 195};
199 196
@@ -202,6 +199,7 @@ struct _Evas_GL_Polygon_Point
202 int x, y; 199 int x, y;
203}; 200};
204 201
202/*
205struct _Evas_GL_Gradient 203struct _Evas_GL_Gradient
206{ 204{
207 RGBA_Gradient *grad; 205 RGBA_Gradient *grad;
@@ -209,14 +207,6 @@ struct _Evas_GL_Gradient
209 int tw, th; 207 int tw, th;
210 unsigned char changed : 1; 208 unsigned char changed : 1;
211}; 209};
212
213struct _Evas_GL_Font_Texture_Pool
214{
215 Evas_GL_Context *gc;
216 int w, h;
217 GLuint texture;
218 unsigned char rectangle : 1;
219};
220*/ 210*/
221 211
222extern Evas_GL_Program_Source shader_rect_frag_src; 212extern Evas_GL_Program_Source shader_rect_frag_src;
@@ -297,6 +287,9 @@ void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg);
297void evas_gl_font_texture_free(void *); 287void evas_gl_font_texture_free(void *);
298void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, RGBA_Font_Glyph *fg, int x, int y); 288void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, RGBA_Font_Glyph *fg, int x, int y);
299 289
290Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
291Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
292void evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly);
300 293
301void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b); 294void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b);
302void (*glsym_glBindFramebuffer) (GLenum a, GLuint b); 295void (*glsym_glBindFramebuffer) (GLenum a, GLuint b);
@@ -322,8 +315,6 @@ void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b);
322 315
323 316
324/* 317/*
325Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
326Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
327 318
328Evas_GL_Gradient *evas_gl_common_gradient_new(void); 319Evas_GL_Gradient *evas_gl_common_gradient_new(void);
329void evas_gl_common_gradient_free(Evas_GL_Gradient *gr); 320void evas_gl_common_gradient_free(Evas_GL_Gradient *gr);
@@ -349,7 +340,6 @@ void evas_gl_common_gradient_draw(Evas_GL_Context *gc, Evas_GL_Grad
349void evas_gl_common_swap_rect(Evas_GL_Context *gc, int x, int y, int w, int h); 340void evas_gl_common_swap_rect(Evas_GL_Context *gc, int x, int y, int w, int h);
350 341
351void evas_gl_common_line_draw(Evas_GL_Context *gc, int x1, int y1, int x2, int y2); 342void evas_gl_common_line_draw(Evas_GL_Context *gc, int x1, int y1, int x2, int y2);
352void evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly);
353*/ 343*/
354 344
355#endif 345#endif
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_polygon.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_polygon.c
index 6f0ab10d59..1425d1c4f8 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_polygon.c
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_polygon.c
@@ -1,12 +1,69 @@
1#include "evas_gl_private.h" 1#include "evas_gl_private.h"
2 2
3#ifdef _WIN32 3// FIXME: this is a verbatim copy of the software poly renderer. it just
4# define EFL_STDCALL __stdcall 4// use gl to draw 1 pixel high spans like software does. this is to make
5#else 5// sure rendering correctness matches the software engine but also to save
6# define EFL_STDCALL 6// time in coming up with a good triangulation algorithm. if you want to
7#endif 7// feel free to turn this into a real triangulation system and use gl to its
8// fullest, but as such polygons are used so little, it's not worth it.
8 9
9#define GLU_TESS 10typedef struct _RGBA_Span RGBA_Span;
11typedef struct _RGBA_Edge RGBA_Edge;
12typedef struct _RGBA_Vertex RGBA_Vertex;
13
14struct _RGBA_Span
15{
16 EINA_INLIST;
17 int x, y, w;
18};
19
20struct _RGBA_Edge
21{
22 double x, dx;
23 int i;
24};
25
26struct _RGBA_Vertex
27{
28 double x, y;
29 int i;
30};
31
32#define POLY_EDGE_DEL(_i) \
33 { \
34 int _j; \
35 \
36 for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \
37 if (_j < num_active_edges) \
38 { \
39 num_active_edges--; \
40 memmove(&(edges[_j]), &(edges[_j + 1]), \
41 (num_active_edges - _j) * sizeof(RGBA_Edge)); \
42 } \
43 }
44
45#define POLY_EDGE_ADD(_i, _y) \
46 { \
47 int _j; \
48 float _dx; \
49 RGBA_Vertex *_p, *_q; \
50 if (_i < (n - 1)) _j = _i + 1; \
51 else _j = 0; \
52 if (point[_i].y < point[_j].y) \
53 { \
54 _p = &(point[_i]); \
55 _q = &(point[_j]); \
56 } \
57 else \
58 { \
59 _p = &(point[_j]); \
60 _q = &(point[_i]); \
61 } \
62 edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
63 edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
64 edges[num_active_edges].i = _i; \
65 num_active_edges++; \
66 }
10 67
11Evas_GL_Polygon * 68Evas_GL_Polygon *
12evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y) 69evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y)
@@ -36,133 +93,215 @@ evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly)
36 poly->points = eina_list_remove(poly->points, pt); 93 poly->points = eina_list_remove(poly->points, pt);
37 free(pt); 94 free(pt);
38 } 95 }
39 if (poly->dl > 0) glDeleteLists(poly->dl, 1);
40 free(poly); 96 free(poly);
41 return NULL; 97 return NULL;
42} 98}
43 99
44#ifdef GLU_TESS 100static int
45static void EFL_STDCALL _evas_gl_tess_begin_cb(GLenum which); 101polygon_point_sorter(const void *a, const void *b)
46static void EFL_STDCALL _evas_gl_tess_end_cb(void);
47static void EFL_STDCALL _evas_gl_tess_error_cb(GLenum errorcode);
48static void EFL_STDCALL _evas_gl_tess_vertex_cb(GLvoid *vertex);
49static void EFL_STDCALL _evas_gl_tess_combine_cb(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **data_out);
50
51static void EFL_STDCALL
52_evas_gl_tess_begin_cb(GLenum which)
53{
54 glBegin(which);
55}
56
57static void EFL_STDCALL
58_evas_gl_tess_end_cb(void)
59{
60 glEnd();
61}
62
63static void EFL_STDCALL
64_evas_gl_tess_error_cb(GLenum errorcode __UNUSED__)
65{
66}
67
68static void EFL_STDCALL
69_evas_gl_tess_vertex_cb(GLvoid *vertex)
70{ 102{
71 GLdouble *v; 103 RGBA_Vertex *p, *q;
72 104
73 v = vertex; 105 p = (RGBA_Vertex *)a;
74 glVertex2d(v[0], v[1]); 106 q = (RGBA_Vertex *)b;
107 if (p->y <= q->y) return -1;
108 return 1;
75} 109}
76 110
77static void EFL_STDCALL 111static int
78_evas_gl_tess_combine_cb(GLdouble coords[3], GLdouble *vertex_data[4] __UNUSED__, GLfloat weight[4] __UNUSED__, GLdouble **data_out) 112polygon_edge_sorter(const void *a, const void *b)
79{ 113{
80 GLdouble *vertex; 114 RGBA_Edge *p, *q;
81 115
82 vertex = (GLdouble *) malloc(6 * sizeof(GLdouble)); 116 p = (RGBA_Edge *)a;
83 vertex[0] = coords[0]; 117 q = (RGBA_Edge *)b;
84 vertex[1] = coords[1]; 118 if (p->x <= q->x) return -1;
85 *data_out = vertex; 119 return 1;
86} 120}
87#endif
88 121
89void 122void
90evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly) 123evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly)
91{ 124{
92 int r, g, b, a; 125 Cutout_Rects *rects;
126 Cutout_Rect *r;
127 int c, cx, cy, cw, ch, cr, cg, cb, ca, i;
128 int x, y, w, h;
129
93 Eina_List *l; 130 Eina_List *l;
94 static void *tess = NULL; 131 int n, k, num_active_edges, y0, y1, *sorted_index, j;
95 GLdouble *glp = NULL; 132 RGBA_Edge *edges;
96 int i, num; 133 RGBA_Vertex *point;
97 RGBA_Draw_Context *dc = gc->dc; 134 Evas_GL_Polygon_Point *pt;
98 Evas_GL_Polygon_Point *p; 135 Eina_Inlist *spans;
99 136
100 a = (dc->col.col >> 24) & 0xff; 137 /* save out clip info */
101 r = (dc->col.col >> 16) & 0xff; 138 c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h;
102 g = (dc->col.col >> 8 ) & 0xff; 139
103 b = (dc->col.col ) & 0xff; 140 ca = (gc->dc->col.col >> 24) & 0xff;
104 evas_gl_common_context_color_set(gc, r, g, b, a); 141 if (ca <= 0) return;
105 if (a < 255) evas_gl_common_context_blend_set(gc, 1); 142 cr = (gc->dc->col.col >> 16) & 0xff;
106 else evas_gl_common_context_blend_set(gc, 0); 143 cg = (gc->dc->col.col >> 8 ) & 0xff;
107 if (dc->clip.use) 144 cb = (gc->dc->col.col ) & 0xff;
108 evas_gl_common_context_clip_set(gc, 1, 145
109 dc->clip.x, dc->clip.y, 146 n = eina_list_count(poly->points);
110 dc->clip.w, dc->clip.h); 147 if (n < 3) return;
111 else 148 edges = malloc(sizeof(RGBA_Edge) * n);
112 evas_gl_common_context_clip_set(gc, 0, 149 if (!edges) return;
113 0, 0, 0, 0); 150 point = malloc(sizeof(RGBA_Vertex) * n);
114 evas_gl_common_context_texture_set(gc, NULL, 0, 0, 0); 151 if (!point)
115 evas_gl_common_context_read_buf_set(gc, GL_BACK); 152 {
116 evas_gl_common_context_write_buf_set(gc, GL_BACK); 153 free(edges);
117 154 return;
118 if (poly->changed || poly->dl <= 0) 155 }
156 sorted_index = malloc(sizeof(int) * n);
157 if (!sorted_index)
119 { 158 {
120 if (poly->dl > 0) glDeleteLists(poly->dl, 1); 159 free(edges);
121 poly->dl = glGenLists(1); 160 free(point);
122 161 return;
123 glNewList(poly->dl, GL_COMPILE_AND_EXECUTE);
124#ifdef GLU_TESS
125 if (!tess)
126 {
127 tess = gluNewTess();
128
129 gluTessCallback(tess, GLU_TESS_BEGIN, _evas_gl_tess_begin_cb);
130 gluTessCallback(tess, GLU_TESS_END, _evas_gl_tess_end_cb);
131 gluTessCallback(tess, GLU_TESS_ERROR, _evas_gl_tess_error_cb);
132 gluTessCallback(tess, GLU_TESS_VERTEX, _evas_gl_tess_vertex_cb);
133 gluTessCallback(tess, GLU_TESS_COMBINE, _evas_gl_tess_combine_cb);
134 }
135 num = 0;
136 num = eina_list_count(poly->points);
137 i = 0;
138 glp = malloc(num * 6 * sizeof(GLdouble));
139 gluTessNormal(tess, 0, 0, 1);
140 gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD);
141 gluTessBeginPolygon(tess, NULL);
142 gluTessBeginContour(tess);
143 EINA_LIST_FOREACH(poly->points, l, p)
144 {
145 glp[i++] = p->x;
146 glp[i++] = p->y;
147 glp[i++] = 0;
148 gluTessVertex(tess, &(glp[i - 3]), &(glp[i - 3]));
149 i += 3;
150 }
151 gluTessEndContour(tess);
152 gluTessEndPolygon(tess);
153 free(glp);
154#else
155 glBegin(GL_POLYGON);
156 EINA_LIST_FOREACH(poly->points, l, p)
157 glVertex2i(p->x, p->y);
158 glEnd();
159#endif
160 glEndList();
161
162 poly->changed = 0;
163
164 return ;
165 } 162 }
163
164 k = 0;
165 EINA_LIST_FOREACH(poly->points, l, pt)
166 {
167 point[k].x = pt->x;
168 point[k].y = pt->y;
169 point[k].i = k;
170 k++;
171 }
172 qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
173 for (k = 0; k < n; k++) sorted_index[k] = point[k].i;
174 k = 0;
175
176 EINA_LIST_FOREACH(poly->points, l, pt)
177 {
178 point[k].x = pt->x;
179 point[k].y = pt->y;
180 point[k].i = k;
181 k++;
182 }
183
184 y0 = MAX(cy, ceil(point[sorted_index[0]].y - 0.5));
185 y1 = MIN(cy + ch - 1, floor(point[sorted_index[n - 1]].y - 0.5));
186
187 k = 0;
188 num_active_edges = 0;
189 spans = NULL;
190
191 for (y = y0; y <= y1; y++)
192 {
193 for (; (k < n) && (point[sorted_index[k]].y <= ((double)y + 0.5)); k++)
194 {
195 i = sorted_index[k];
196
197 if (i > 0) j = i - 1;
198 else j = n - 1;
199 if (point[j].y <= ((double)y - 0.5))
200 {
201 POLY_EDGE_DEL(j)
202 }
203 else if (point[j].y > ((double)y + 0.5))
204 {
205 POLY_EDGE_ADD(j, y)
206 }
207 if (i < (n - 1)) j = i + 1;
208 else j = 0;
209 if (point[j].y <= ((double)y - 0.5))
210 {
211 POLY_EDGE_DEL(i)
212 }
213 else if (point[j].y > ((double)y + 0.5))
214 {
215 POLY_EDGE_ADD(i, y)
216 }
217 }
218
219 qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter);
220
221 for (j = 0; j < num_active_edges; j += 2)
222 {
223 int x0, x1;
224
225 x0 = ceil(edges[j].x - 0.5);
226 if (j < (num_active_edges - 1))
227 x1 = floor(edges[j + 1].x - 0.5);
228 else
229 x1 = x0;
230 if ((x1 >= cx) && (x0 < (cx + cw)) && (x0 <= x1))
231 {
232 RGBA_Span *span;
233
234 if (x0 < cx) x0 = cx;
235 if (x1 >= (cx + cw)) x1 = cx + cw - 1;
236 span = malloc(sizeof(RGBA_Span));
237 spans = eina_inlist_append(spans, EINA_INLIST_GET(span));
238 span->y = y;
239 span->x = x0;
240 span->w = (x1 - x0) + 1;
241 }
242 edges[j].x += edges[j].dx;
243 edges[j + 1].x += edges[j + 1].dx;
244 }
245 }
246
247 free(edges);
248 free(point);
249 free(sorted_index);
250
251 evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h);
252
253 if (spans)
254 {
255 RGBA_Span *span;
256
257 /* no cutouts - cut right to the chase */
258 if (!gc->dc->cutout.rects)
259 {
260 EINA_INLIST_FOREACH(spans, span)
261 {
262 x = span->x;
263 y = span->y;
264 w = span->w;
265 h = 1;
266 evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca);
267 }
268 }
269 else
270 {
271 evas_common_draw_context_clip_clip(gc->dc, x, y, w, h);
272 /* our clip is 0 size.. abort */
273 if ((gc->dc->clip.w > 0) && (gc->dc->clip.h > 0))
274 {
275 rects = evas_common_draw_context_apply_cutouts(gc->dc);
276 for (i = 0; i < rects->active; ++i)
277 {
278 r = rects->rects + i;
279 if ((r->w > 0) && (r->h > 0))
280 {
281 EINA_INLIST_FOREACH(spans, span)
282 {
283 x = span->x;
284 y = span->y;
285 w = span->w;
286 h = 1;
287 RECTS_CLIP_TO_RECT(x, y, w, h, r->x, r->y, r->w, r->h);
288 if ((w > 0) && (h > 0))
289 evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca);
290 }
291 }
292 }
293 evas_common_draw_context_apply_clear_cutouts(rects);
294 }
295 }
296 while (spans)
297 {
298 span = (RGBA_Span *)spans;
299 spans = eina_inlist_remove(spans, spans);
300 free(span);
301 }
302 }
303
304 /* restore clip info */
305 gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch;
166 306
167 glCallList(poly->dl);
168} 307}
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_rectangle.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_rectangle.c
index 459a6bf6ac..cd3368e17d 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_rectangle.c
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_rectangle.c
@@ -13,7 +13,7 @@ evas_gl_common_rect_draw(Evas_GL_Context *gc, int x, int y, int w, int h)
13 c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; 13 c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h;
14 14
15 ca = (gc->dc->col.col >> 24) & 0xff; 15 ca = (gc->dc->col.col >> 24) & 0xff;
16// if (ca <= 0) return; 16 if (ca <= 0) return;
17 cr = (gc->dc->col.col >> 16) & 0xff; 17 cr = (gc->dc->col.col >> 16) & 0xff;
18 cg = (gc->dc->col.col >> 8 ) & 0xff; 18 cg = (gc->dc->col.col >> 8 ) & 0xff;
19 cb = (gc->dc->col.col ) & 0xff; 19 cb = (gc->dc->col.col ) & 0xff;
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 26f217cc1b..f8630c0622 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -363,8 +363,7 @@ eng_polygon_point_add(void *data, void *context __UNUSED__, void *polygon, int x
363 Render_Engine *re; 363 Render_Engine *re;
364 364
365 re = (Render_Engine *)data; 365 re = (Render_Engine *)data;
366//--// return evas_gl_common_poly_point_add(polygon, x, y); 366 return evas_gl_common_poly_point_add(polygon, x, y);
367 return NULL;
368} 367}
369 368
370static void * 369static void *
@@ -373,8 +372,7 @@ eng_polygon_points_clear(void *data, void *context __UNUSED__, void *polygon)
373 Render_Engine *re; 372 Render_Engine *re;
374 373
375 re = (Render_Engine *)data; 374 re = (Render_Engine *)data;
376//--// return evas_gl_common_poly_points_clear(polygon); 375 return evas_gl_common_poly_points_clear(polygon);
377 return NULL;
378} 376}
379 377
380static void 378static void
@@ -386,7 +384,7 @@ eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
386 eng_window_use(re->win); 384 eng_window_use(re->win);
387 evas_gl_common_context_target_surface_set(re->win->gl_context, surface); 385 evas_gl_common_context_target_surface_set(re->win->gl_context, surface);
388 re->win->gl_context->dc = context; 386 re->win->gl_context->dc = context;
389//--// evas_gl_common_poly_draw(re->win->gl_context, polygon); 387 evas_gl_common_poly_draw(re->win->gl_context, polygon);
390} 388}
391 389
392static void 390static void