summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_device.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-04-07 13:03:28 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2015-04-10 11:09:50 +0200
commit8d1e57e52ef3138e3e5d55bdbaf87f3002cffadd (patch)
treec8645ddb3f2af37072184db182c8cbfac69c7eb3 /src/lib/ecore_drm/ecore_drm_device.c
parente7538322e90632812f13741446c604d42c2dd929 (diff)
ecore-drm: Delay destroy of output if there is a pending flip
Summary: If an output has a pending page flip, we cannot destroy it until the page flip has completed. This commit adds support to delay destroying an output until the page flip is completed. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm_device.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm_device.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c
index 69a8e1c05f..1ba4a2668d 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -24,7 +24,13 @@ _ecore_drm_device_cb_page_flip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSE
24 } 24 }
25 25
26 output->pending_flip = EINA_FALSE; 26 output->pending_flip = EINA_FALSE;
27 if (!output->pending_vblank) ecore_drm_output_repaint(output); 27 if (output->pending_destroy)
28 {
29 output->pending_destroy = EINA_FALSE;
30 ecore_drm_output_free(output);
31 }
32 else if (!output->pending_vblank)
33 ecore_drm_output_repaint(output);
28} 34}
29 35
30static void 36static void
@@ -79,7 +85,7 @@ _ecore_drm_device_cb_idle(void *data)
79 85
80 EINA_LIST_FOREACH(dev->outputs, l, output) 86 EINA_LIST_FOREACH(dev->outputs, l, output)
81 { 87 {
82 output->need_repaint = EINA_TRUE; 88 if ((!output->enabled) || (!output->need_repaint)) continue;
83 if (output->repaint_scheduled) continue; 89 if (output->repaint_scheduled) continue;
84 _ecore_drm_output_repaint_start(output); 90 _ecore_drm_output_repaint_start(output);
85 } 91 }