summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/software_generic/evas_native_tbm.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 16:54:48 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 17:08:21 +0900
commitd7903e40b326de5323276cdf2869a608cd0c5a33 (patch)
tree87a4a620504beef1e789c046d20e86fccaeaccd6 /src/modules/evas/engines/software_generic/evas_native_tbm.c
parent7db9613e8c95268acfa6d51ea6aa45418ee8e697 (diff)
evas tbm: Fix compilation warnings
Previous patch used a wrong type... harmless but warned.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/software_generic/evas_native_tbm.c53
1 files changed, 18 insertions, 35 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_native_tbm.c b/src/modules/evas/engines/software_generic/evas_native_tbm.c
index bcc81c6d69..07b4414859 100644
--- a/src/modules/evas/engines/software_generic/evas_native_tbm.c
+++ b/src/modules/evas/engines/software_generic/evas_native_tbm.c
@@ -210,24 +210,17 @@ _native_bind_cb(void *data EINA_UNUSED, void *image, int x EINA_UNUSED, int y EI
210 RGBA_Image *im = image; 210 RGBA_Image *im = image;
211 Native *n = im->native.data; 211 Native *n = im->native.data;
212 tbm_surface_info_s info; 212 tbm_surface_info_s info;
213 tbm_surface_h *tbm_surf; 213 tbm_surface_h tbm_surf;
214 214
215 if (!im) return; 215 if (!im || !n) return;
216 if (n) 216 if (n->ns.type != EVAS_NATIVE_SURFACE_TBM)
217 { 217 return;
218 if (n->ns.type == EVAS_NATIVE_SURFACE_TBM)
219 {
220 tbm_surf = n->ns.data.tbm.buffer;
221 }
222 else tbm_surf = NULL;
223 218
224 if (!tbm_surf) 219 tbm_surf = n->ns.data.tbm.buffer;
225 return; 220 if (sym_tbm_surface_map(tbm_surf, TBM_SURF_OPTION_READ|TBM_SURF_OPTION_WRITE, &info))
226 if (sym_tbm_surface_map(tbm_surf, TBM_SURF_OPTION_READ|TBM_SURF_OPTION_WRITE, &info)) 221 return;
227 return;
228 222
229 im->image.data = (DATA32 *)info.planes[0].ptr; 223 im->image.data = (DATA32 *)info.planes[0].ptr;
230 }
231} 224}
232 225
233static void 226static void
@@ -235,21 +228,14 @@ _native_unbind_cb(void *data EINA_UNUSED, void *image)
235{ 228{
236 RGBA_Image *im = image; 229 RGBA_Image *im = image;
237 Native *n = im->native.data; 230 Native *n = im->native.data;
238 tbm_surface_h *tbm_surf; 231 tbm_surface_h tbm_surf;
239 232
240 if (!im) return; 233 if (!im || !n) return;
241 if (n) 234 if (n->ns.type != EVAS_NATIVE_SURFACE_TBM)
242 { 235 return;
243 if (n->ns.type == EVAS_NATIVE_SURFACE_TBM)
244 {
245 tbm_surf = n->ns.data.tbm.buffer;
246 }
247 else tbm_surf = NULL;
248 236
249 if (!tbm_surf) 237 tbm_surf = n->ns.data.tbm.buffer;
250 return; 238 sym_tbm_surface_unmap(tbm_surf);
251 sym_tbm_surface_unmap(tbm_surf);
252 }
253} 239}
254 240
255static void 241static void
@@ -276,7 +262,7 @@ evas_native_tbm_surface_image_set(void *data EINA_UNUSED, void *image, void *nat
276{ 262{
277 Evas_Native_Surface *ns = native; 263 Evas_Native_Surface *ns = native;
278 RGBA_Image *im = image; 264 RGBA_Image *im = image;
279 tbm_surface_h *tbm_surf; 265 tbm_surface_h tbm_surf;
280 266
281 if (!im) return NULL; 267 if (!im) return NULL;
282 268
@@ -288,13 +274,10 @@ evas_native_tbm_surface_image_set(void *data EINA_UNUSED, void *image, void *nat
288 tbm_surface_info_s info; 274 tbm_surface_info_s info;
289 Native *n; 275 Native *n;
290 276
291 if (ns->type == EVAS_NATIVE_SURFACE_TBM) 277 if (ns->type != EVAS_NATIVE_SURFACE_TBM)
292 { 278 return NULL;
293 tbm_surf = ns->data.tbm.buffer;
294 }
295 else tbm_surf = NULL;
296 279
297 if (!tbm_surf) return NULL; 280 tbm_surf = ns->data.tbm.buffer;
298 281
299 if (!tbm_init()) 282 if (!tbm_init())
300 { 283 {