devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b41867cd778449f8b5b5abe266fea0cfce90e487
commit b41867cd778449f8b5b5abe266fea0cfce90e487 Author: Chris Michael <cp.mich...@samsung.com> Date: Wed Oct 22 09:18:05 2014 -0400 evas-gl-drm: Cleanup formatting NB: No functional changes Signed-off-by: Chris Michael <cp.mich...@samsung.com> --- src/modules/evas/engines/gl_drm/evas_drm.c | 4 +--- src/modules/evas/engines/gl_drm/evas_drm_main.c | 25 ++++++++++-------------- src/modules/evas/engines/gl_drm/evas_engine.c | 26 +++++++++---------------- 3 files changed, 20 insertions(+), 35 deletions(-) diff --git a/src/modules/evas/engines/gl_drm/evas_drm.c b/src/modules/evas/engines/gl_drm/evas_drm.c index 2fe0d5f..22d92e3 100644 --- a/src/modules/evas/engines/gl_drm/evas_drm.c +++ b/src/modules/evas/engines/gl_drm/evas_drm.c @@ -147,9 +147,7 @@ evas_drm_gbm_init(Evas_Engine_Info_GL_Drm *info, int w, int h) if (info->info.fd < 0) return EINA_FALSE; if (!(info->info.gbm = gbm_create_device(info->info.fd))) - { - return EINA_FALSE; - } + return EINA_FALSE; if (!(info->info.surface = gbm_surface_create(info->info.gbm, w, h, diff --git a/src/modules/evas/engines/gl_drm/evas_drm_main.c b/src/modules/evas/engines/gl_drm/evas_drm_main.c index e108bc4..e2fd783 100644 --- a/src/modules/evas/engines/gl_drm/evas_drm_main.c +++ b/src/modules/evas/engines/gl_drm/evas_drm_main.c @@ -37,7 +37,8 @@ _outbuf_flush_famebuffer(Outbuf *ob) _outbuf_buffer_swap(ob, rects, n); } -Outbuf *eng_window_new(Evas_Engine_Info_GL_Drm *info, Evas *e, struct gbm_device *gbm, struct gbm_surface *surface, int screen, int depth, int w, int h, int indirect EINA_UNUSED, int alpha, int rot, Render_Engine_Swap_Mode swap_mode) +Outbuf * +eng_window_new(Evas_Engine_Info_GL_Drm *info, Evas *e, struct gbm_device *gbm, struct gbm_surface *surface, int screen, int depth, int w, int h, int indirect EINA_UNUSED, int alpha, int rot, Render_Engine_Swap_Mode swap_mode) { Outbuf *gw; int context_attrs[3]; @@ -421,9 +422,7 @@ eng_gl_context_use(Context_3D *ctx) { if (eglMakeCurrent(ctx->display, ctx->surface, ctx->surface, ctx->context) == EGL_FALSE) - { - ERR("eglMakeCurrent() failed."); - } + ERR("eglMakeCurrent() failed."); } void @@ -487,13 +486,11 @@ eng_outbuf_region_first_rect(Outbuf *ob) return EINA_FALSE; } -void* +void * eng_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *cx EINA_UNUSED, int *cy EINA_UNUSED, int *cw EINA_UNUSED, int *ch EINA_UNUSED) { - if (w == ob->w && h == ob->h) - { - ob->gl_context->master_clip.enabled = EINA_FALSE; - } + if ((w == ob->w) && (h == ob->h)) + ob->gl_context->master_clip.enabled = EINA_FALSE; else { ob->gl_context->master_clip.enabled = EINA_TRUE; @@ -539,10 +536,10 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode r else eglSwapInterval(ob->egl_disp, 0); ob->vsync = 1; } + if (ob->info->callback.pre_swap) - { - ob->info->callback.pre_swap(ob->info->callback.data, ob->evas); - } + ob->info->callback.pre_swap(ob->info->callback.data, ob->evas); + // TODO: Check eglSwapBuffersWithDamage for gl_drm and apply #if 0 if ((glsym_eglSwapBuffersWithDamage) && (ob->swap_mode != MODE_FULL)) @@ -606,9 +603,7 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode r eglSwapBuffers(ob->egl_disp, ob->egl_surface[0]); if (ob->info->callback.post_swap) - { - ob->info->callback.post_swap(ob->info->callback.data, ob->evas); - } + ob->info->callback.post_swap(ob->info->callback.data, ob->evas); //Flush GL Surface data to Framebuffer _outbuf_flush_famebuffer(ob); diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c index 5c804ad..3fdad3a 100644 --- a/src/modules/evas/engines/gl_drm/evas_engine.c +++ b/src/modules/evas/engines/gl_drm/evas_engine.c @@ -207,13 +207,9 @@ gl_extn_veto(Render_Engine *re) if (getenv("EVAS_GL_INFO")) printf("EGL EXTN:\n%s\n", str); if (!strstr(str, "EGL_EXT_buffer_age")) - { - extn_have_buffer_age = 0; - } + extn_have_buffer_age = 0; if (!strstr(str, "EGL_EXT_swap_buffers_with_damage")) - { - glsym_eglSwapBuffersWithDamage = NULL; - } + glsym_eglSwapBuffersWithDamage = NULL; } else { @@ -325,13 +321,10 @@ evgl_eng_native_window_create(void *data) return NULL; } - surface = gbm_surface_create(info->info.gbm, 1, 1, - info->info.format, + surface = gbm_surface_create(info->info.gbm, 1, 1, info->info.format, info->info.flags); if (!surface) - { - ERR("Could not create gl drm window: %m"); - } + ERR("Could not create gl drm window: %m"); return (void*)surface; } @@ -402,7 +395,6 @@ evgl_eng_window_surface_destroy(void *data, void *surface) } ret = eglDestroySurface(eng_get_ob(re)->egl_disp, (EGLSurface)surface); - if (ret == EGL_TRUE) return 1; return 0; @@ -469,7 +461,6 @@ evgl_eng_context_destroy(void *data, void *context) } ret = eglDestroyContext(eng_get_ob(re)->egl_disp, (EGLContext)context); - if (ret == EGL_TRUE) return 1; return 0; @@ -845,8 +836,9 @@ eng_preload_make_current(void *data, void *doit) static Eina_Bool eng_canvas_alpha_get(void *data, void *info EINA_UNUSED) { - Render_Engine *re = (Render_Engine *)data; - if (!re) return EINA_FALSE; + Render_Engine *re; + + if (!(re = (Render_Engine *)data)) return EINA_FALSE; return re->generic.software.ob->alpha; } @@ -856,8 +848,8 @@ eng_output_dump(void *data) { Render_Engine *re; - re = (Render_Engine *)data; - if (!re) return; + if (!(re = (Render_Engine *)data)) return; + evas_common_image_image_all_unload(); evas_common_font_font_all_unload(); glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context); --