From: Joogab Yun Date: Fri, 4 Nov 2016 02:35:49 +0000 (+0900) Subject: [evas_gl] support partial rendering X-Git-Tag: accepted/tizen/common/20170102.152350~197 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b380e858b43a54f4a4ba61ebddcfc6118e92e86;p=platform%2Fupstream%2Fefl.git [evas_gl] support partial rendering If eglSetDamageRegionKHR has already been called on since the most recent frame boundary, an EGL_BAD_ACCESS error is generated Change-Id: I0d02c3cdff855fd355c448027dcf20aafb1c559b --- diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h index efd9568..2725ae3 100644 --- a/src/lib/evas/include/evas_common_private.h +++ b/src/lib/evas/include/evas_common_private.h @@ -245,7 +245,7 @@ extern EAPI int _evas_log_dom_global; /* use exact rects for updates not tiles */ //#define NEWTILER -#define TILESIZE 8 +#define TILESIZE 16 #define IMG_MAX_SIZE 65000 #define IMG_TOO_BIG(w, h) \ diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c index d292d34..8b6dd0b 100644 --- a/src/modules/evas/engines/gl_drm/evas_outbuf.c +++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c @@ -790,8 +790,6 @@ evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx EI ob->gl_context->master_clip.w = w; ob->gl_context->master_clip.h = h; - if (glsym_eglSetDamageRegionKHR) - _damage_rect_set(ob, x, y, w, h); } return ob->gl_context->def_surface; @@ -851,6 +849,9 @@ evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode) _glcoords_convert(&result[i], ob, r->x, r->y, r->w, r->h); i += 4; } + if (glsym_eglSetDamageRegionKHR) + glsym_eglSetDamageRegionKHR(ob->egl.disp, ob->egl.surface[0], result, num); + glsym_eglSwapBuffersWithDamage(ob->egl.disp, ob->egl.surface[0], result, num); } diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index 4448299..eff2a88 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -509,8 +509,6 @@ eng_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx EIN ob->gl_context->master_clip.w = w; ob->gl_context->master_clip.h = h; - if (glsym_eglSetDamageRegionKHR) - _damage_rect_set(ob, x, y, w, h); } return ob->gl_context->def_surface; @@ -568,6 +566,9 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode) _convert_glcoords(&result[i], ob, r->x, r->y, r->w, r->h); i += 4; } + if (glsym_eglSetDamageRegionKHR) + glsym_eglSetDamageRegionKHR(ob->egl_disp, ob->egl_surface[0], result, num); + glsym_eglSwapBuffersWithDamage(ob->egl_disp, ob->egl_surface[0], result, num); }