summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-09-28 02:30:09 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-28 02:30:09 +0000
commit56ffcbe9e542922396ebfc21c1309b9bd79141ae (patch)
treeedf73de87ded812d2af4a2aad2fefbca8e3e1961 /legacy/evas/src/modules/engines
parent5bb2df9101a9a3e4957f856ccfe8b2b502a90021 (diff)
deal with losing our backbuffer (after a resurf) with partial updates.
SVN revision: 77175
Diffstat (limited to 'legacy/evas/src/modules/engines')
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 0992d505e9..21fd3b63e3 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -34,6 +34,7 @@ struct _Render_Engine
34 int mode; 34 int mode;
35 int w, h; 35 int w, h;
36 int vsync; 36 int vsync;
37 int lost_back;
37 38
38 EVGL_Engine *evgl_engine; 39 EVGL_Engine *evgl_engine;
39}; 40};
@@ -620,6 +621,7 @@ _re_wincheck(Render_Engine *re)
620{ 621{
621 if (re->win->surf) return 1; 622 if (re->win->surf) return 1;
622 eng_window_resurf(re->win); 623 eng_window_resurf(re->win);
624 re->lost_back = 1;
623 if (!re->win->surf) 625 if (!re->win->surf)
624 { 626 {
625 ERR("GL engine can't re-create window surface!"); 627 ERR("GL engine can't re-create window surface!");
@@ -1059,9 +1061,16 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
1059 if (!re->rects) 1061 if (!re->rects)
1060 { 1062 {
1061 re->rects = evas_common_tilebuf_get_render_rects(re->tb); 1063 re->rects = evas_common_tilebuf_get_render_rects(re->tb);
1062 evas_common_tilebuf_clear(re->tb);
1063 if (re->rects) 1064 if (re->rects)
1064 { 1065 {
1066 if (re->lost_back)
1067 {
1068 /* if we lost our backbuffer since the last frame redraw all */
1069 re->lost_back = 0;
1070 evas_common_tilebuf_add_redraw(re->tb, 0, 0, re->win->w, re->win->h);
1071 evas_common_tilebuf_free_render_rects(re->rects);
1072 re->rects = evas_common_tilebuf_get_render_rects(re->tb);
1073 }
1065 /* ensure we get rid of previous rect lists we dont need if mode 1074 /* ensure we get rid of previous rect lists we dont need if mode
1066 * changed/is appropriate */ 1075 * changed/is appropriate */
1067 switch (re->mode) 1076 switch (re->mode)
@@ -1092,6 +1101,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
1092 re->cur_rect = EINA_INLIST_GET(re->rects); 1101 re->cur_rect = EINA_INLIST_GET(re->rects);
1093 first_rect = EINA_TRUE; 1102 first_rect = EINA_TRUE;
1094 } 1103 }
1104 evas_common_tilebuf_clear(re->tb);
1095 } 1105 }
1096 if (!re->cur_rect) return NULL; 1106 if (!re->cur_rect) return NULL;
1097 rect = (Tilebuf_Rect *)re->cur_rect; 1107 rect = (Tilebuf_Rect *)re->cur_rect;