summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-15 18:26:35 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-15 18:26:35 +0900
commit8291c9e33e3c005993a1b28b278d1c4a2e4d314d (patch)
tree063036e2d509afea893fecd97b819b10edddeeb8 /src/lib/evas/canvas
parenta9968b975f7c8749e795ec2058685e687bec5715 (diff)
evas - sw async render - move pixel upload/swap to a thread
@feature this should unload mainloop some more and have pixel upload now in a thread - same as rendering. this eeems to work where i see it so let's put this in and see with further testing.
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_render.c48
1 files changed, 30 insertions, 18 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index dbe0e5d94a..aee5a131b3 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2722,16 +2722,17 @@ evas_render_updates_internal(Evas *eo_e,
2722 fx, fy, alpha, 2722 fx, fy, alpha,
2723 do_async, 2723 do_async,
2724 &offset); 2724 &offset);
2725 2725 if (!do_async)
2726 eina_evlog("+render_push", eo_e, 0.0, NULL); 2726 {
2727 e->engine.func->output_redraws_next_update_push(e->engine.data.output, 2727 eina_evlog("+render_push", eo_e, 0.0, NULL);
2728 surface, 2728 e->engine.func->output_redraws_next_update_push(e->engine.data.output,
2729 ux, uy, uw, uh, 2729 surface,
2730 render_mode); 2730 ux, uy, uw, uh,
2731 eina_evlog("-render_push", eo_e, 0.0, NULL); 2731 render_mode);
2732 eina_evlog("-render_push", eo_e, 0.0, NULL);
2733 }
2732 } 2734 }
2733 2735
2734 eina_evlog("+render_output_flush", eo_e, 0.0, NULL);
2735 if (do_async) 2736 if (do_async)
2736 { 2737 {
2737 eo_ref(eo_e); 2738 eo_ref(eo_e);
@@ -2742,6 +2743,7 @@ evas_render_updates_internal(Evas *eo_e,
2742 } 2743 }
2743 else if (haveup) 2744 else if (haveup)
2744 { 2745 {
2746 eina_evlog("+render_output_flush", eo_e, 0.0, NULL);
2745 EINA_LIST_FOREACH(e->video_objects, ll, eo_obj) 2747 EINA_LIST_FOREACH(e->video_objects, ll, eo_obj)
2746 { 2748 {
2747 _evas_object_image_video_overlay_do(eo_obj); 2749 _evas_object_image_video_overlay_do(eo_obj);
@@ -2750,8 +2752,8 @@ evas_render_updates_internal(Evas *eo_e,
2750 e->engine.func->output_flush(e->engine.data.output, 2752 e->engine.func->output_flush(e->engine.data.output,
2751 EVAS_RENDER_MODE_SYNC); 2753 EVAS_RENDER_MODE_SYNC);
2752 _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); 2754 _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL);
2755 eina_evlog("-render_output_flush", eo_e, 0.0, NULL);
2753 } 2756 }
2754 eina_evlog("-render_output_flush", eo_e, 0.0, NULL);
2755 eina_evlog("-render_surface", eo_e, 0.0, NULL); 2757 eina_evlog("-render_surface", eo_e, 0.0, NULL);
2756 } 2758 }
2757 eina_evlog("-render_phase6", eo_e, 0.0, NULL); 2759 eina_evlog("-render_phase6", eo_e, 0.0, NULL);
@@ -2940,14 +2942,7 @@ evas_render_wakeup(Evas *eo_e)
2940 2942
2941 EINA_LIST_FREE(e->render.updates, ru) 2943 EINA_LIST_FREE(e->render.updates, ru)
2942 { 2944 {
2943 /* punch rect out */
2944 e->engine.func->output_redraws_next_update_push
2945 (e->engine.data.output, ru->surface,
2946 ru->area->x, ru->area->y, ru->area->w, ru->area->h,
2947 EVAS_RENDER_MODE_ASYNC_END);
2948
2949 ret_updates = eina_list_append(ret_updates, ru->area); 2945 ret_updates = eina_list_append(ret_updates, ru->area);
2950 evas_cache_image_drop(ru->surface);
2951 free(ru); 2946 free(ru);
2952 haveup = EINA_TRUE; 2947 haveup = EINA_TRUE;
2953 } 2948 }
@@ -2962,8 +2957,6 @@ evas_render_wakeup(Evas *eo_e)
2962 _evas_object_image_video_overlay_do(eo_obj); 2957 _evas_object_image_video_overlay_do(eo_obj);
2963 } 2958 }
2964 _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL); 2959 _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL);
2965 e->engine.func->output_flush(e->engine.data.output,
2966 EVAS_RENDER_MODE_ASYNC_END);
2967 _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); 2960 _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL);
2968 } 2961 }
2969 2962
@@ -3011,6 +3004,25 @@ evas_render_async_wakeup(void *target, Evas_Callback_Type type EINA_UNUSED, void
3011static void 3004static void
3012evas_render_pipe_wakeup(void *data) 3005evas_render_pipe_wakeup(void *data)
3013{ 3006{
3007 Eina_List *l;
3008 Render_Updates *ru;
3009 Evas_Public_Data *e = data;
3010
3011 EINA_LIST_FOREACH(e->render.updates, l, ru)
3012 {
3013 eina_evlog("+render_push", e->evas, 0.0, NULL);
3014 e->engine.func->output_redraws_next_update_push
3015 (e->engine.data.output, ru->surface,
3016 ru->area->x, ru->area->y, ru->area->w, ru->area->h,
3017 EVAS_RENDER_MODE_ASYNC_END);
3018 eina_evlog("-render_push", e->evas, 0.0, NULL);
3019 evas_cache_image_drop(ru->surface);
3020 ru->surface = NULL;
3021 }
3022 eina_evlog("+render_output_flush", e->evas, 0.0, NULL);
3023 e->engine.func->output_flush(e->engine.data.output,
3024 EVAS_RENDER_MODE_ASYNC_END);
3025 eina_evlog("+render_output_flush", e->evas, 0.0, NULL);
3014 evas_async_events_put(data, 0, NULL, evas_render_async_wakeup); 3026 evas_async_events_put(data, 0, NULL, evas_render_async_wakeup);
3015} 3027}
3016 3028