diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-11-15 11:22:14 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-11-17 18:41:31 +0900 |
commit | a479745e4ffaf0e252a350ffe11de439faebbb67 (patch) | |
tree | 0b479bee537ff81b32d569718d8537b5030b6662 /src/lib/evas/include/evas_private.h | |
parent | dbebf2835f616c8b0144c8b795a18ddec01e7771 (diff) |
evas - add a prepare stage for objects before render
preparing an object is a good idea. especially with gl. you want to do
texture uploads BEFORE using textures all in one batch. otherwise this
may mean the gl implementation has to make a copy of your data in a
tmp location then copy it in later when texture becomes "unused" as it
may be in use at the moment, or it may have to stall and wait.
i have seen somewhere around 7-10% speedups on nvidia and intel
drivers with this on given a very special test case i brewed up (1000
32x32 images where i change 1 pixel every frame). this should have
impact really when we are modifying textures a lot. this is all i've
implemented for now, but this should/would/could do much more like
re-order map, proxy renders to render FIRST in a pre-render list
instead of inline and to pre-render fbo/buffer content for complex
objects like text or textblock etc.
Diffstat (limited to 'src/lib/evas/include/evas_private.h')
-rw-r--r-- | src/lib/evas/include/evas_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 65e7023a2c..398109cfd9 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h | |||
@@ -1289,6 +1289,10 @@ struct _Evas_Object_Func | |||
1289 | Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | 1289 | Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); |
1290 | 1290 | ||
1291 | int (*can_map) (Evas_Object *obj); | 1291 | int (*can_map) (Evas_Object *obj); |
1292 | // new - add to prepare list during render if object needs some pre-render | ||
1293 | // preparation - may include rendering content to buffer or loading data | ||
1294 | // from disk or uploading to texture etc. | ||
1295 | void (*render_prepare) (Evas_Object *obj, Evas_Object_Protected_Data *pd); | ||
1292 | 1296 | ||
1293 | // new render2 functions | 1297 | // new render2 functions |
1294 | 1298 | ||
@@ -1384,6 +1388,8 @@ struct _Evas_Func | |||
1384 | /* new api for direct data set (not put) */ | 1388 | /* new api for direct data set (not put) */ |
1385 | void *(*image_data_slice_add) (void *data, void *image, const Eina_Slice *slice, Eina_Bool copy, int w, int h, int stride, Evas_Colorspace space, int plane, Eina_Bool alpha); | 1389 | void *(*image_data_slice_add) (void *data, void *image, const Eina_Slice *slice, Eina_Bool copy, int w, int h, int stride, Evas_Colorspace space, int plane, Eina_Bool alpha); |
1386 | 1390 | ||
1391 | void (*image_prepare) (void *data, void *image); | ||
1392 | |||
1387 | int (*image_native_init) (void *data, Evas_Native_Surface_Type type); | 1393 | int (*image_native_init) (void *data, Evas_Native_Surface_Type type); |
1388 | void (*image_native_shutdown) (void *data, Evas_Native_Surface_Type type); | 1394 | void (*image_native_shutdown) (void *data, Evas_Native_Surface_Type type); |
1389 | void *(*image_native_set) (void *data, void *image, void *native); | 1395 | void *(*image_native_set) (void *data, void *image, void *native); |