e_plane: add setter/getter for fb target plane
authorJuyeon Lee <juyeonne.lee@samsung.com>
Fri, 10 Jun 2016 04:50:10 +0000 (13:50 +0900)
committerJuyeon Lee <juyeonne.lee@samsung.com>
Fri, 10 Jun 2016 04:50:10 +0000 (13:50 +0900)
Change-Id: I35945af4ffb9048aef82e0baa2a8cfe0fd9a6969

src/bin/e_comp.c
src/bin/e_info_server.c
src/bin/e_output.c
src/bin/e_plane.c
src/bin/e_plane.h

index 6f6fcaa346c6a6ef8e815d4e3b7d931c18599230..cfb77f15a31f770b32f7e9a427db81dd968086cf 100644 (file)
@@ -402,6 +402,7 @@ _hwc_set(E_Output * eout)
                     {
                        e_client_redirected_set(ep->prepare_ec, 0);
                        ep->ec = ep->prepare_ec;
+                       e_plane_fb_set(ep, EINA_FALSE);
                        // FIXME: will remove out once tdm_output_commit thru e_output,e_plane
                        e_comp_hwc_mode_nocomp(ep->ec);
                     }
@@ -510,6 +511,7 @@ _e_comp_hwc_cancel(E_Output * eout)
         if (ep->ec) e_client_redirected_set(ep->ec, 1);
         ep->prepare_ec = NULL;
         ep->ec = NULL;
+        if(e_plane_is_primary(ep)) e_plane_fb_set(ep, EINA_TRUE);
         // FIXME: will remove out once tdm_output_commit thru e_output,e_plane
         e_comp_hwc_mode_nocomp(NULL);
      }
index d25f154af2df05bafe67b18017e896f5800c5ce8..f64cc64f2be9a6418a1e38d5bc922752ac23af68 100644 (file)
@@ -1303,7 +1303,6 @@ e_info_server_cb_effect_control(const Eldbus_Service_Interface *iface EINA_UNUSE
    return reply;
 }
 
-static int override = 0;
 static Eldbus_Message *
 e_info_server_cb_hwc(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
index 661a9d2ae784ce041075580ea27df1aa71f2540a..b8c780c34b73519cc8d82d2e4e1e55383f62a691 100644 (file)
@@ -26,14 +26,19 @@ e_output_new(Ecore_Drm_Output *output)
    eout->info.name = ecore_drm_output_name_get(output);
    printf("E_OUTPUT: .... out %s\n", eout->info.name);
 
-   eout->plane_count = 1; // TODO: get proper value using libtdm
+    // TODO: get proper value using libtdm
+   eout->plane_count = 1;
    printf("COMP TDM: planes %i\n", eout->plane_count);
    for (i = 0; i < eout->plane_count; i++)
      {
         printf("COMP TDM: added plane %i\n", i);
         Eina_Bool pri = EINA_FALSE;
+        E_Plane *ep = NULL;
+        // TODO: primary layer condition (0 is temp condition)
         if (i == 0) pri = EINA_TRUE;
-        e_plane_new(eout, i, pri);
+        ep = e_plane_new(eout, i, pri);
+        // TODO: fb target condition (0 is temp condition)
+        if (i == 0) e_plane_fb_set(ep, EINA_TRUE);
      }
 
    eout->output = output;
index 931151263611ba7e1e01312ea78bb44948caa082..b7ccab22e9290c47402ae4bfcaa8d03ff8f06f5a 100644 (file)
@@ -206,3 +206,20 @@ e_plane_geom_get(E_Plane *plane,
    if (h) *y = plane->geometry.h;
 }
 
+E_API Eina_Bool
+e_plane_is_fb(E_Plane *plane)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
+   if (plane->is_FB) return EINA_TRUE;
+   return EINA_FALSE;
+}
+
+E_API Eina_Bool
+e_plane_fb_set(E_Plane *plane,
+                       Eina_Bool set)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
+
+   plane->is_FB = set;
+   return EINA_TRUE;
+}
index dca3bccf66f9aae0a11098c2ce17ad28fc1fc768..e93b300dfddd4f841834676f3974d1540fefa1e1 100644 (file)
@@ -40,6 +40,7 @@ struct _E_Plane
    E_Output           *eout;
 
    Eina_Bool           is_primary;
+   Eina_Bool           is_FB; // fb target
 };
 
 EINTERN int              e_plane_init(void);
@@ -57,6 +58,8 @@ E_API Eina_Bool          e_plane_is_primary(E_Plane *plane);
 E_API Eina_Bool          e_plane_is_cursor(E_Plane *plane);
 E_API E_Plane_Color      e_plane_color_val_get(E_Plane *plane);
 E_API void               e_plane_geom_get(E_Plane *plane, int *x, int *y, int *w, int *h);
+E_API Eina_Bool          e_plane_is_fb(E_Plane *plane);
+E_API Eina_Bool          e_plane_fb_set(E_Plane *plane, Eina_Bool set);
 
 #endif
 #endif