[evas_gl] support partial rendering 33/95833/2
authorJoogab Yun <joogab.yun@samsung.com>
Fri, 4 Nov 2016 02:35:49 +0000 (11:35 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 17 Nov 2016 07:54:18 +0000 (16:54 +0900)
          If eglSetDamageRegionKHR has already been called on <surface>
          since the most recent frame boundary, an EGL_BAD_ACCESS error is generated

Change-Id: I0d02c3cdff855fd355c448027dcf20aafb1c559b

src/lib/evas/include/evas_common_private.h
src/modules/evas/engines/gl_drm/evas_outbuf.c
src/modules/evas/engines/wayland_egl/evas_wl_main.c

index efd9568..2725ae3 100644 (file)
@@ -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) \
index d292d34..8b6dd0b 100644 (file)
@@ -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);
           }
index 4448299..eff2a88 100644 (file)
@@ -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);
           }