summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-06-03 14:30:10 -0400
committerChris Michael <cp.michael@samsung.com>2015-06-05 10:00:44 -0400
commit47a2602af7554c8876ad078bc49d029a292aa715 (patch)
tree95f80cbae66e9a2885b282fb92e119e0bfe1e750 /src
parent354fd6f67b9d4069bfcf26c1899183f644e429a5 (diff)
evas-gl-drm: Readd support for pre_swap/post_swap callbacks
Summary: The pre/post swap callbacks were forgotten when doing the engine rewrite, so readd them @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_drm/Evas_Engine_GL_Drm.h7
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.c6
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.h2
-rw-r--r--src/modules/evas/engines/gl_drm/evas_outbuf.c10
4 files changed, 20 insertions, 5 deletions
diff --git a/src/modules/evas/engines/gl_drm/Evas_Engine_GL_Drm.h b/src/modules/evas/engines/gl_drm/Evas_Engine_GL_Drm.h
index 6cb7923d70..17fe8cbabc 100644
--- a/src/modules/evas/engines/gl_drm/Evas_Engine_GL_Drm.h
+++ b/src/modules/evas/engines/gl_drm/Evas_Engine_GL_Drm.h
@@ -29,6 +29,13 @@ struct _Evas_Engine_Info_GL_Drm
29 unsigned char swap_mode : 4; 29 unsigned char swap_mode : 4;
30 } info; 30 } info;
31 31
32 struct
33 {
34 void (*pre_swap)(void *data, Evas *evas);
35 void (*post_swap)(void *data, Evas *evas);
36 void *data;
37 } callback;
38
32 /* non-blocking or blocking mode */ 39 /* non-blocking or blocking mode */
33 Evas_Engine_Render_Mode render_mode; 40 Evas_Engine_Render_Mode render_mode;
34}; 41};
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c
index 280035da98..835417ccbb 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -794,6 +794,8 @@ eng_setup(Evas *evas, void *in)
794 return 0; 794 return 0;
795 } 795 }
796 796
797 ob->evas = evas;
798
797 if (!evas_render_engine_gl_generic_init(&re->generic, ob, 799 if (!evas_render_engine_gl_generic_init(&re->generic, ob,
798 evas_outbuf_buffer_state_get, 800 evas_outbuf_buffer_state_get,
799 evas_outbuf_rot_get, 801 evas_outbuf_rot_get,
@@ -861,6 +863,8 @@ eng_setup(Evas *evas, void *in)
861 evas_outbuf_use(ob); 863 evas_outbuf_use(ob);
862 if (ob) 864 if (ob)
863 { 865 {
866 ob->evas = evas;
867
864 evas_render_engine_software_generic_update(&re->generic.software, ob, 868 evas_render_engine_software_generic_update(&re->generic.software, ob,
865 epd->output.w, epd->output.h); 869 epd->output.w, epd->output.h);
866 870
@@ -889,6 +893,8 @@ eng_setup(Evas *evas, void *in)
889 evas_outbuf_use(ob); 893 evas_outbuf_use(ob);
890 if (ob) 894 if (ob)
891 { 895 {
896 ob->evas = evas;
897
892 evas_render_engine_software_generic_update(&re->generic.software, ob, 898 evas_render_engine_software_generic_update(&re->generic.software, ob,
893 epd->output.w, epd->output.h); 899 epd->output.w, epd->output.h);
894 900
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.h b/src/modules/evas/engines/gl_drm/evas_engine.h
index b00cf382cc..3aa25e4a33 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.h
+++ b/src/modules/evas/engines/gl_drm/evas_engine.h
@@ -66,6 +66,8 @@ struct _Outbuf
66 Evas_Engine_Info_GL_Drm *info; 66 Evas_Engine_Info_GL_Drm *info;
67 Evas_Engine_GL_Context *gl_context; 67 Evas_Engine_GL_Context *gl_context;
68 68
69 Evas *evas; // used for pre_swap, post_swap
70
69 int w, h; 71 int w, h;
70 unsigned int rotation, depth; 72 unsigned int rotation, depth;
71 Render_Engine_Swap_Mode swap_mode; 73 Render_Engine_Swap_Mode swap_mode;
diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index 124a3563a3..4365efe237 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -214,7 +214,7 @@ evas_outbuf_new(Evas_Engine_Info_GL_Drm *info, int w, int h, Render_Engine_Swap_
214 ob->depth = info->info.depth; 214 ob->depth = info->info.depth;
215 ob->rotation = info->info.rotation; 215 ob->rotation = info->info.rotation;
216 ob->destination_alpha = info->info.destination_alpha; 216 ob->destination_alpha = info->info.destination_alpha;
217 ob->vsync = info->info.vsync; 217 /* ob->vsync = info->info.vsync; */
218 ob->gbm = info->info.gbm; 218 ob->gbm = info->info.gbm;
219 ob->surface = info->info.surface; 219 ob->surface = info->info.surface;
220 ob->swap_mode = swap_mode; 220 ob->swap_mode = swap_mode;
@@ -528,8 +528,8 @@ evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode
528 ob->vsync = 1; 528 ob->vsync = 1;
529 } 529 }
530 530
531 /* if (ob->info->callback.pre_swap) */ 531 if (ob->info->callback.pre_swap)
532 /* ob->info->callback.pre_swap(ob->info->callback.data, ob->evas); */ 532 ob->info->callback.pre_swap(ob->info->callback.data, ob->evas);
533 533
534// TODO: Check eglSwapBuffersWithDamage for gl_drm and apply 534// TODO: Check eglSwapBuffersWithDamage for gl_drm and apply
535#if 0 535#if 0
@@ -592,8 +592,8 @@ evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode
592#endif 592#endif
593 eglSwapBuffers(ob->egl.disp, ob->egl.surface[0]); 593 eglSwapBuffers(ob->egl.disp, ob->egl.surface[0]);
594 594
595 /* if (ob->info->callback.post_swap) */ 595 if (ob->info->callback.post_swap)
596 /* ob->info->callback.post_swap(ob->info->callback.data, ob->evas); */ 596 ob->info->callback.post_swap(ob->info->callback.data, ob->evas);
597 597
598 //Flush GL Surface data to Framebuffer 598 //Flush GL Surface data to Framebuffer
599 _evas_outbuf_buffer_swap(ob, NULL, 0); 599 _evas_outbuf_buffer_swap(ob, NULL, 0);