summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-24 13:22:09 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-03-24 13:22:09 -0400
commitb37ebdad253f1505df7f95eea3a8e8830d7b58b3 (patch)
tree53acf66acd08f93473d6fafce69d4905cb9a1881
parent9deee134c907e4a415f6a644e6e1fcf22dfb9c32 (diff)
evas/render: produce update regions when do_draw isn't set but make_updates is
Summary: this is a valid combination of parameters that should be handled Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11581
-rw-r--r--src/lib/evas/canvas/evas_render.c42
1 files changed, 36 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index db9f14bf1f..c7dff56336 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3618,6 +3618,33 @@ evas_render_updates_internal(Evas *eo_e,
3618 3618
3619 eina_evlog("-render_surface", eo_e, 0.0, NULL); 3619 eina_evlog("-render_surface", eo_e, 0.0, NULL);
3620 } 3620 }
3621 else if (make_updates)
3622 {
3623 Render_Updates *ru;
3624 void *surface;
3625 int ux, uy, uw, uh;
3626 int cx, cy, cw, ch;
3627 while ((surface =
3628 ENFN->output_redraws_next_update_get
3629 (ENC, out->output,
3630 &ux, &uy, &uw, &uh,
3631 &cx, &cy, &cw, &ch)))
3632 {
3633 haveup = EINA_TRUE;
3634
3635 /* adjust the rendering rectangle to the output offset */
3636 ux += out->geometry.x;
3637 uy += out->geometry.y;
3638 ru = malloc(sizeof(*ru));
3639 ru->surface = surface;
3640 //XXX: need a way of reffing output surfaces
3641 NEW_RECT(ru->area, ux, uy, uw, uh);
3642 eina_spinlock_take(&(e->render.lock));
3643 out->updates = eina_list_append(out->updates, ru);
3644 eina_spinlock_release(&(e->render.lock));
3645 }
3646
3647 }
3621 } 3648 }
3622 3649
3623 /* First process all output, then flush */ 3650 /* First process all output, then flush */
@@ -3789,14 +3816,17 @@ evas_render_updates_internal(Evas *eo_e,
3789 Render_Updates *ru; 3816 Render_Updates *ru;
3790 3817
3791 post.updated_area = NULL; 3818 post.updated_area = NULL;
3792 EINA_LIST_FOREACH(e->outputs, l1, out) 3819 if (haveup)
3793 { 3820 {
3794 if (!out->output) continue ; 3821 EINA_LIST_FOREACH(e->outputs, l1, out)
3795 EINA_LIST_FOREACH(out->updates, l2, ru)
3796 { 3822 {
3797 post.updated_area = eina_list_append(post.updated_area, ru->area); 3823 if (!out->output) continue ;
3798 //XXX: need a way of unreffing output surfaces 3824 EINA_LIST_FOREACH(out->updates, l2, ru)
3799 ru->surface = NULL; 3825 {
3826 post.updated_area = eina_list_append(post.updated_area, ru->area);
3827 //XXX: need a way of unreffing output surfaces
3828 ru->surface = NULL;
3829 }
3800 } 3830 }
3801 } 3831 }
3802 eina_spinlock_take(&(e->render.lock)); 3832 eina_spinlock_take(&(e->render.lock));