summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas_buffer.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-05-23 17:35:18 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-05-23 17:35:18 -0400
commitb7530726c80d67f0c009540be1d6df74f9195bba (patch)
tree23ab1249cdffbc3042262cedb3959b2f4950dcbe /src/lib/ecore_evas/ecore_evas_buffer.c
parent0f57eb861060b63b954f881da572dde88d626a32 (diff)
ecore-evas-buffer: defer resize callback until pre-render
Summary: this mimics other engines, all of which have the same mechanics due to display server interactions. it also avoids unnecessary recalcs before pre-render if the canvas size was changing repeatedly fix T6924 ref D6019 Reviewers: cedric, JackDanielZ Reviewed By: JackDanielZ Subscribers: #committers, JackDanielZ Tags: #efl Maniphest Tasks: T6924 Differential Revision: https://phab.enlightenment.org/D6145
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas_buffer.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index 241a122daa..cad4999337 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -100,7 +100,8 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
100 } 100 }
101 if (bdata->image) 101 if (bdata->image)
102 evas_object_image_data_set(bdata->image, bdata->pixels); 102 evas_object_image_data_set(bdata->image, bdata->pixels);
103 if (ee->func.fn_resize) ee->func.fn_resize(ee); 103 else
104 bdata->resized = 1;
104} 105}
105 106
106static void 107static void
@@ -163,6 +164,11 @@ _ecore_evas_buffer_prepare(Ecore_Evas *ee)
163 _ecore_evas_resize(ee, w, h); 164 _ecore_evas_resize(ee, w, h);
164 bdata->pixels = evas_object_image_data_get(bdata->image, 1); 165 bdata->pixels = evas_object_image_data_get(bdata->image, 1);
165 } 166 }
167 else if (bdata->resized)
168 {
169 if (ee->func.fn_resize) ee->func.fn_resize(ee);
170 bdata->resized = 0;
171 }
166 172
167 return EINA_TRUE; 173 return EINA_TRUE;
168} 174}