summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_egl/evas_engine.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 17:06:18 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 17:08:22 +0900
commita7063973819c087a3a6e039e4cbeed13b29a1fd5 (patch)
tree67952c6d12fb7dd2bd65e97d9c0fa67fc672fa88 /src/modules/evas/engines/wayland_egl/evas_engine.c
parent3593186a60e5530871a252a4bd6b03d881a0ead4 (diff)
waylang-egl: Remove trailing spaces
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c134
1 files changed, 67 insertions, 67 deletions
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index e9a35a9bde..0d6ad0db78 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -159,16 +159,16 @@ gl_symbols(void)
159 FINDSYM(glsym_eglDestroyImage, "eglDestroyImageARB", glsym_func_void); 159 FINDSYM(glsym_eglDestroyImage, "eglDestroyImageARB", glsym_func_void);
160 FINDSYM(glsym_eglDestroyImage, "eglDestroyImage", glsym_func_void); 160 FINDSYM(glsym_eglDestroyImage, "eglDestroyImage", glsym_func_void);
161 161
162 FINDSYM(glsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", 162 FINDSYM(glsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES",
163 glsym_func_void); 163 glsym_func_void);
164 164
165 FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageEXT", 165 FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageEXT",
166 glsym_func_uint); 166 glsym_func_uint);
167 FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageINTEL", 167 FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageINTEL",
168 glsym_func_uint); 168 glsym_func_uint);
169 FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamage", 169 FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamage",
170 glsym_func_uint); 170 glsym_func_uint);
171 FINDSYM(glsym_eglSetDamageRegionKHR, "eglSetDamageRegionKHR", 171 FINDSYM(glsym_eglSetDamageRegionKHR, "eglSetDamageRegionKHR",
172 glsym_func_uint); 172 glsym_func_uint);
173 173
174 FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL", 174 FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL",
@@ -240,7 +240,7 @@ gl_extn_veto(Render_Engine *re)
240 } 240 }
241} 241}
242 242
243static void 243static void
244_re_winfree(Render_Engine *re) 244_re_winfree(Render_Engine *re)
245{ 245{
246 Outbuf *ob; 246 Outbuf *ob;
@@ -292,7 +292,7 @@ evgl_eng_native_window_create(void *data)
292 return (void *)win; 292 return (void *)win;
293} 293}
294 294
295static int 295static int
296evgl_eng_native_window_destroy(void *data, void *win) 296evgl_eng_native_window_destroy(void *data, void *win)
297{ 297{
298 Render_Engine *re; 298 Render_Engine *re;
@@ -316,7 +316,7 @@ evgl_eng_window_surface_create(void *data, void *win)
316 if (!(re = (Render_Engine *)data)) return NULL; 316 if (!(re = (Render_Engine *)data)) return NULL;
317 if (!(ob = eng_get_ob(re))) return NULL; 317 if (!(ob = eng_get_ob(re))) return NULL;
318 318
319 surface = eglCreateWindowSurface(ob->egl_disp, ob->egl_config, 319 surface = eglCreateWindowSurface(ob->egl_disp, ob->egl_config,
320 (EGLNativeWindowType)win, NULL); 320 (EGLNativeWindowType)win, NULL);
321 if (!surface) 321 if (!surface)
322 { 322 {
@@ -327,7 +327,7 @@ evgl_eng_window_surface_create(void *data, void *win)
327 return (void *)surface; 327 return (void *)surface;
328} 328}
329 329
330static int 330static int
331evgl_eng_window_surface_destroy(void *data, void *surface) 331evgl_eng_window_surface_destroy(void *data, void *surface)
332{ 332{
333 Render_Engine *re; 333 Render_Engine *re;
@@ -364,14 +364,14 @@ evgl_eng_context_create(void *data, void *ctxt, Evas_GL_Context_Version version)
364 364
365 if (ctxt) 365 if (ctxt)
366 { 366 {
367 context = 367 context =
368 eglCreateContext(ob->egl_disp, ob->egl_config, 368 eglCreateContext(ob->egl_disp, ob->egl_config,
369 (EGLContext)ctxt, attrs); 369 (EGLContext)ctxt, attrs);
370 } 370 }
371 else 371 else
372 { 372 {
373 context = 373 context =
374 eglCreateContext(ob->egl_disp, ob->egl_config, 374 eglCreateContext(ob->egl_disp, ob->egl_config,
375 ob->egl_context[0], attrs); 375 ob->egl_context[0], attrs);
376 } 376 }
377 377
@@ -384,7 +384,7 @@ evgl_eng_context_create(void *data, void *ctxt, Evas_GL_Context_Version version)
384 return (void *)context; 384 return (void *)context;
385} 385}
386 386
387static int 387static int
388evgl_eng_context_destroy(void *data, void *ctxt) 388evgl_eng_context_destroy(void *data, void *ctxt)
389{ 389{
390 Render_Engine *re; 390 Render_Engine *re;
@@ -398,7 +398,7 @@ evgl_eng_context_destroy(void *data, void *ctxt)
398 return 1; 398 return 1;
399} 399}
400 400
401static int 401static int
402evgl_eng_make_current(void *data, void *surface, void *ctxt, int flush) 402evgl_eng_make_current(void *data, void *surface, void *ctxt, int flush)
403{ 403{
404 Render_Engine *re; 404 Render_Engine *re;
@@ -415,8 +415,8 @@ evgl_eng_make_current(void *data, void *surface, void *ctxt, int flush)
415 415
416 if ((!ctxt) && (!surface)) 416 if ((!ctxt) && (!surface))
417 { 417 {
418 ret = 418 ret =
419 eglMakeCurrent(ob->egl_disp, EGL_NO_SURFACE, 419 eglMakeCurrent(ob->egl_disp, EGL_NO_SURFACE,
420 EGL_NO_SURFACE, EGL_NO_CONTEXT); 420 EGL_NO_SURFACE, EGL_NO_CONTEXT);
421 if (!ret) 421 if (!ret)
422 { 422 {
@@ -426,8 +426,8 @@ evgl_eng_make_current(void *data, void *surface, void *ctxt, int flush)
426 return 1; 426 return 1;
427 } 427 }
428 428
429 if ((eglGetCurrentContext() != ctx) || 429 if ((eglGetCurrentContext() != ctx) ||
430 (eglGetCurrentSurface(EGL_READ) != surf) || 430 (eglGetCurrentSurface(EGL_READ) != surf) ||
431 (eglGetCurrentSurface(EGL_DRAW) != surf)) 431 (eglGetCurrentSurface(EGL_DRAW) != surf))
432 { 432 {
433 if (flush) eng_window_use(NULL); 433 if (flush) eng_window_use(NULL);
@@ -462,7 +462,7 @@ evgl_eng_string_get(void *data)
462 return eglQueryString(ob->egl_disp, EGL_EXTENSIONS); 462 return eglQueryString(ob->egl_disp, EGL_EXTENSIONS);
463} 463}
464 464
465static int 465static int
466evgl_eng_rotation_angle_get(void *data) 466evgl_eng_rotation_angle_get(void *data)
467{ 467{
468 Render_Engine *re; 468 Render_Engine *re;
@@ -477,7 +477,7 @@ evgl_eng_rotation_angle_get(void *data)
477 return 0; 477 return 0;
478} 478}
479 479
480static const EVGL_Interface evgl_funcs = 480static const EVGL_Interface evgl_funcs =
481{ 481{
482 evgl_eng_display_get, 482 evgl_eng_display_get,
483 evgl_eng_evas_surface_get, 483 evgl_eng_evas_surface_get,
@@ -515,7 +515,7 @@ eng_info(Evas *evas EINA_UNUSED)
515 return info; 515 return info;
516} 516}
517 517
518static void 518static void
519eng_info_free(Evas *evas EINA_UNUSED, void *info) 519eng_info_free(Evas *evas EINA_UNUSED, void *info)
520{ 520{
521 Evas_Engine_Info_Wayland_Egl *inf; 521 Evas_Engine_Info_Wayland_Egl *inf;
@@ -524,7 +524,7 @@ eng_info_free(Evas *evas EINA_UNUSED, void *info)
524 free(inf); 524 free(inf);
525} 525}
526 526
527static int 527static int
528eng_setup(Evas *evas, void *info) 528eng_setup(Evas *evas, void *info)
529{ 529{
530 Render_Engine_Swap_Mode swap_mode = MODE_FULL; 530 Render_Engine_Swap_Mode swap_mode = MODE_FULL;
@@ -621,23 +621,23 @@ eng_setup(Evas *evas, void *info)
621 ob = eng_window_new(evas, inf, epd->output.w, epd->output.h, swap_mode); 621 ob = eng_window_new(evas, inf, epd->output.w, epd->output.h, swap_mode);
622 if (!ob) goto ob_err; 622 if (!ob) goto ob_err;
623 623
624 if (!evas_render_engine_gl_generic_init(&re->generic, ob, 624 if (!evas_render_engine_gl_generic_init(&re->generic, ob,
625 eng_outbuf_swap_mode_get, 625 eng_outbuf_swap_mode_get,
626 eng_outbuf_rotation_get, 626 eng_outbuf_rotation_get,
627 eng_outbuf_reconfigure, 627 eng_outbuf_reconfigure,
628 eng_outbuf_region_first_rect, 628 eng_outbuf_region_first_rect,
629 eng_outbuf_update_region_new, 629 eng_outbuf_update_region_new,
630 eng_outbuf_update_region_push, 630 eng_outbuf_update_region_push,
631 eng_outbuf_update_region_free, 631 eng_outbuf_update_region_free,
632 NULL, 632 NULL,
633 eng_outbuf_flush, 633 eng_outbuf_flush,
634 eng_window_free, 634 eng_window_free,
635 eng_window_use, 635 eng_window_use,
636 eng_outbuf_gl_context_get, 636 eng_outbuf_gl_context_get,
637 eng_outbuf_egl_display_get, 637 eng_outbuf_egl_display_get,
638 eng_gl_context_new, 638 eng_gl_context_new,
639 eng_gl_context_use, 639 eng_gl_context_use,
640 &evgl_funcs, 640 &evgl_funcs,
641 epd->output.w, epd->output.h)) 641 epd->output.w, epd->output.h))
642 { 642 {
643 eng_window_free(ob); 643 eng_window_free(ob);
@@ -672,15 +672,15 @@ eng_setup(Evas *evas, void *info)
672 if ((ob) && (_re_wincheck(ob))) 672 if ((ob) && (_re_wincheck(ob)))
673 { 673 {
674 ob->info = inf; 674 ob->info = inf;
675 if ((ob->info->info.display != ob->disp) || 675 if ((ob->info->info.display != ob->disp) ||
676 (ob->info->info.surface != ob->surface) || 676 (ob->info->info.surface != ob->surface) ||
677 /* FIXME: comment out below line. 677 /* FIXME: comment out below line.
678 * since there is no place set the info->info.win for now, 678 * since there is no place set the info->info.win for now,
679 * it causes renew the window unnecessarily. 679 * it causes renew the window unnecessarily.
680 */ 680 */
681 /* (ob->info->info.win != ob->win) || */ 681 /* (ob->info->info.win != ob->win) || */
682 (ob->info->info.depth != ob->depth) || 682 (ob->info->info.depth != ob->depth) ||
683 (ob->info->info.screen != ob->screen) || 683 (ob->info->info.screen != ob->screen) ||
684 (ob->info->info.destination_alpha != ob->alpha)) 684 (ob->info->info.destination_alpha != ob->alpha))
685 { 685 {
686 ob->gl_context->references++; 686 ob->gl_context->references++;
@@ -688,18 +688,18 @@ eng_setup(Evas *evas, void *info)
688 688
689 ob = eng_window_new(evas, inf, epd->output.w, epd->output.h, swap_mode); 689 ob = eng_window_new(evas, inf, epd->output.w, epd->output.h, swap_mode);
690 if (!ob) goto ob_err; 690 if (!ob) goto ob_err;
691 691
692 eng_window_use(ob); 692 eng_window_use(ob);
693 693
694 evas_render_engine_software_generic_update(&re->generic.software, ob, 694 evas_render_engine_software_generic_update(&re->generic.software, ob,
695 epd->output.w, epd->output.h); 695 epd->output.w, epd->output.h);
696 gl_wins++; 696 gl_wins++;
697 eng_get_ob(re)->gl_context->references--; 697 eng_get_ob(re)->gl_context->references--;
698 } 698 }
699 else if ((ob->w != epd->output.w) || (ob->h != epd->output.h) || 699 else if ((ob->w != epd->output.w) || (ob->h != epd->output.h) ||
700 (ob->info->info.rotation != ob->rot)) 700 (ob->info->info.rotation != ob->rot))
701 { 701 {
702 eng_outbuf_reconfigure(ob, epd->output.w, epd->output.h, 702 eng_outbuf_reconfigure(ob, epd->output.w, epd->output.h,
703 ob->info->info.rotation, 0); 703 ob->info->info.rotation, 0);
704 } 704 }
705 } 705 }
@@ -719,12 +719,12 @@ eng_setup(Evas *evas, void *info)
719 719
720 if (re->generic.software.tb) 720 if (re->generic.software.tb)
721 evas_common_tilebuf_free(re->generic.software.tb); 721 evas_common_tilebuf_free(re->generic.software.tb);
722 re->generic.software.tb = 722 re->generic.software.tb =
723 evas_common_tilebuf_new(epd->output.w, epd->output.h); 723 evas_common_tilebuf_new(epd->output.w, epd->output.h);
724 724
725 if (re->generic.software.tb) 725 if (re->generic.software.tb)
726 { 726 {
727 evas_common_tilebuf_set_tile_size(re->generic.software.tb, 727 evas_common_tilebuf_set_tile_size(re->generic.software.tb,
728 TILESIZE, TILESIZE); 728 TILESIZE, TILESIZE);
729 evas_render_engine_software_generic_tile_strict_set 729 evas_render_engine_software_generic_tile_strict_set
730 (&re->generic.software, EINA_TRUE); 730 (&re->generic.software, EINA_TRUE);
@@ -732,7 +732,7 @@ eng_setup(Evas *evas, void *info)
732 732
733 if (!epd->engine.data.context) 733 if (!epd->engine.data.context)
734 { 734 {
735 epd->engine.data.context = 735 epd->engine.data.context =
736 epd->engine.func->context_new(epd->engine.data.output); 736 epd->engine.func->context_new(epd->engine.data.output);
737 } 737 }
738 738
@@ -745,7 +745,7 @@ ob_err:
745 return 0; 745 return 0;
746} 746}
747 747
748static Eina_Bool 748static Eina_Bool
749eng_canvas_alpha_get(void *data, void *info EINA_UNUSED) 749eng_canvas_alpha_get(void *data, void *info EINA_UNUSED)
750{ 750{
751 Render_Engine *re; 751 Render_Engine *re;
@@ -756,7 +756,7 @@ eng_canvas_alpha_get(void *data, void *info EINA_UNUSED)
756 return EINA_FALSE; 756 return EINA_FALSE;
757} 757}
758 758
759static void 759static void
760eng_output_free(void *data) 760eng_output_free(void *data)
761{ 761{
762 Render_Engine *re; 762 Render_Engine *re;
@@ -782,7 +782,7 @@ eng_output_free(void *data)
782 } 782 }
783} 783}
784 784
785static void 785static void
786eng_output_dump(void *data) 786eng_output_dump(void *data)
787{ 787{
788 Render_Engine *re; 788 Render_Engine *re;
@@ -795,7 +795,7 @@ eng_output_dump(void *data)
795 _re_winfree(re); 795 _re_winfree(re);
796} 796}
797 797
798static void 798static void
799_native_cb_bind(void *data EINA_UNUSED, void *image) 799_native_cb_bind(void *data EINA_UNUSED, void *image)
800{ 800{
801 Evas_GL_Image *img; 801 Evas_GL_Image *img;
@@ -830,7 +830,7 @@ _native_cb_bind(void *data EINA_UNUSED, void *image)
830 830
831 if (glsym_evgl_native_surface_buffer_get) 831 if (glsym_evgl_native_surface_buffer_get)
832 surface = glsym_evgl_native_surface_buffer_get(n->ns_data.evasgl.surface, &is_egl_image); 832 surface = glsym_evgl_native_surface_buffer_get(n->ns_data.evasgl.surface, &is_egl_image);
833 833
834 if (is_egl_image) 834 if (is_egl_image)
835 { 835 {
836 if (glsym_glEGLImageTargetTexture2DOES) 836 if (glsym_glEGLImageTargetTexture2DOES)
@@ -866,7 +866,7 @@ _native_cb_bind(void *data EINA_UNUSED, void *image)
866 } 866 }
867} 867}
868 868
869static void 869static void
870_native_cb_unbind(void *data EINA_UNUSED, void *image) 870_native_cb_unbind(void *data EINA_UNUSED, void *image)
871{ 871{
872 Evas_GL_Image *img; 872 Evas_GL_Image *img;
@@ -893,7 +893,7 @@ _native_cb_unbind(void *data EINA_UNUSED, void *image)
893 } 893 }
894} 894}
895 895
896static void 896static void
897_native_cb_free(void *data, void *image) 897_native_cb_free(void *data, void *image)
898{ 898{
899 Render_Engine *re; 899 Render_Engine *re;
@@ -1015,11 +1015,11 @@ eng_image_native_set(void *data, void *image, void *native)
1015 { 1015 {
1016 if ((ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL)) 1016 if ((ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL))
1017 { 1017 {
1018 img = 1018 img =
1019 glsym_evas_gl_common_image_new_from_data(ob->gl_context, 1019 glsym_evas_gl_common_image_new_from_data(ob->gl_context,
1020 ns->data.opengl.w, 1020 ns->data.opengl.w,
1021 ns->data.opengl.h, 1021 ns->data.opengl.h,
1022 NULL, 1, 1022 NULL, 1,
1023 EVAS_COLORSPACE_ARGB8888); 1023 EVAS_COLORSPACE_ARGB8888);
1024 } 1024 }
1025 else 1025 else
@@ -1346,13 +1346,13 @@ eng_preload_make_current(void *data, void *doit)
1346 1346
1347 if (doit) 1347 if (doit)
1348 { 1348 {
1349 if (!eglMakeCurrent(ob->egl_disp, ob->egl_surface[0], 1349 if (!eglMakeCurrent(ob->egl_disp, ob->egl_surface[0],
1350 ob->egl_surface[0], ob->egl_context[0])) 1350 ob->egl_surface[0], ob->egl_context[0]))
1351 return EINA_FALSE; 1351 return EINA_FALSE;
1352 } 1352 }
1353 else 1353 else
1354 { 1354 {
1355 if (!eglMakeCurrent(ob->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, 1355 if (!eglMakeCurrent(ob->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE,
1356 EGL_NO_CONTEXT)) 1356 EGL_NO_CONTEXT))
1357 return EINA_FALSE; 1357 return EINA_FALSE;
1358 } 1358 }
@@ -1361,7 +1361,7 @@ eng_preload_make_current(void *data, void *doit)
1361} 1361}
1362 1362
1363/* evas module functions */ 1363/* evas module functions */
1364static int 1364static int
1365module_open(Evas_Module *em) 1365module_open(Evas_Module *em)
1366{ 1366{
1367 /* check for valid module */ 1367 /* check for valid module */
@@ -1373,7 +1373,7 @@ module_open(Evas_Module *em)
1373 /* setup logging domain */ 1373 /* setup logging domain */
1374 if (_evas_engine_wl_egl_log_dom < 0) 1374 if (_evas_engine_wl_egl_log_dom < 0)
1375 { 1375 {
1376 _evas_engine_wl_egl_log_dom = 1376 _evas_engine_wl_egl_log_dom =
1377 eina_log_domain_register("evas-wayland_egl", EVAS_DEFAULT_LOG_COLOR); 1377 eina_log_domain_register("evas-wayland_egl", EVAS_DEFAULT_LOG_COLOR);
1378 } 1378 }
1379 1379
@@ -1406,7 +1406,7 @@ module_open(Evas_Module *em)
1406 return 1; 1406 return 1;
1407} 1407}
1408 1408
1409static void 1409static void
1410module_close(Evas_Module *em EINA_UNUSED) 1410module_close(Evas_Module *em EINA_UNUSED)
1411{ 1411{
1412 eina_log_domain_unregister(_evas_engine_wl_egl_log_dom); 1412 eina_log_domain_unregister(_evas_engine_wl_egl_log_dom);