e_comp_canvas: add damage rect when HWC end 90/118890/2
authorJuyeon Lee <juyeonne.lee@samsung.com>
Tue, 14 Mar 2017 10:35:56 +0000 (19:35 +0900)
committerJuyeon Lee <juyeonne.lee@samsung.com>
Tue, 14 Mar 2017 10:54:46 +0000 (19:54 +0900)
Change-Id: I2ee3bd8d84b14d31e3ea43b2e8201fec7ca5797d

src/bin/e_comp_canvas.c

index 4068fa9..c0049ae 100644 (file)
@@ -141,6 +141,19 @@ _e_comp_canvas_prerender(Ecore_Evas *ee EINA_UNUSED)
      cb();
 }
 
+static Eina_Bool
+_e_comp_cb_compositor_enabled()
+{
+   // canvas is not updated if there were no window or no obj changes on canvas by evas calc.
+   // it happens sometimes after hwc end, than force canvas render
+   DBG("Compositor Enabled");
+
+   if (e_comp->evas)
+     evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->w, e_comp->h);
+
+   return ECORE_CALLBACK_PASS_ON;
+}
+
 E_API Eina_Bool
 e_comp_canvas_init(int w, int h)
 {
@@ -215,6 +228,7 @@ e_comp_canvas_init(int w, int h)
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_MOVE_RESIZE, _e_comp_cb_zone_change, NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _e_comp_cb_zone_change, NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _e_comp_cb_zone_change, NULL);
+   E_LIST_HANDLER_APPEND(handlers, E_EVENT_COMPOSITOR_ENABLE,    _e_comp_cb_compositor_enabled, NULL);
    E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_DOWN, _e_comp_cb_key_down, NULL);
    E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_UP, _e_comp_cb_key_up, NULL);