e_plane: set type of plane 97/96497/3
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 8 Nov 2016 04:35:12 +0000 (13:35 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 17 Nov 2016 00:31:16 +0000 (16:31 -0800)
E_PLANE_TYPE_CURSOR: plane can set only ec of cursor.
E_PLANE_TYPE_VIDEO: plane can set only ec of video and ec must have
specific buffer that plane support.
E_PLANE_TYPE_GRAPHIC: plane can set ec that have graphic buffer.
if ec of cursor or video has graphic buffer, ec can be set to plane.

Change-Id: I94853a16b2e2a09f7a216c0843d92444d45e8be6

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

index 2cd8794e949ce9429dd3f6f3ccea588502237cdb..48ce2ecc465efd041b474579dd3ca391442028b9 100644 (file)
@@ -250,8 +250,6 @@ _hwc_set(E_Output *eout)
      {
         Eina_Bool set = EINA_FALSE;
 
-        //if (e_plane_type_get(ep) != E_PLANE_TYPE_OVERLAY) continue;
-
         if (e_plane_is_fb_target(ep))
           {
              if (ep->prepare_ec)
index 2a2266a64747c6da1a720faa6695274e1b7c5603..eb6e8a11dd4885a29defc2ecf540b6efe7a2727b 100644 (file)
@@ -568,9 +568,6 @@ e_plane_new(E_Output *output, int index)
    if (layer_capabilities & TDM_LAYER_CAPABILITY_RESEVED_MEMORY)
        plane->reserved_memory = EINA_TRUE;
 
-   /* ????? */
-   plane->type = E_PLANE_TYPE_INVALID;
-
    tdm_layer_get_zpos(tlayer, &zpos);
    plane->zpos = zpos;
    plane->output = output;
@@ -596,6 +593,15 @@ e_plane_new(E_Output *output, int index)
         plane->renderer = renderer;
      }
 
+   if (layer_capabilities & TDM_LAYER_CAPABILITY_VIDEO)
+      plane->type = E_PLANE_TYPE_VIDEO;
+   else if (layer_capabilities & TDM_LAYER_CAPABILITY_CURSOR)
+      plane->type = E_PLANE_TYPE_CURSOR;
+   else if (layer_capabilities & TDM_LAYER_CAPABILITY_GRAPHIC)
+      plane->type = E_PLANE_TYPE_GRAPHIC;
+   else
+      plane->type = E_PLANE_TYPE_INVALID;
+
    INF("E_PLANE: (%d) plane:%p name:%s zpos:%d capa:%s %s",
        index, plane, plane->name, plane->zpos,plane->is_primary?"primary":"", plane->reserved_memory?"reserved_memory":"");
 
@@ -972,12 +978,8 @@ e_plane_type_set(E_Plane *plane, E_Plane_Type type)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
 
-   if ((type == E_PLANE_TYPE_VIDEO) ||
-       (type == E_PLANE_TYPE_CURSOR))
-     {
-        if (plane->ec || plane->prepare_ec) return EINA_FALSE;
-     }
    plane->type = type;
+
    return EINA_TRUE;
 }
 
index 0363839b64e51465d6e89b2b2dac64b838432030..0e74fe0476a7d13a973ecdd567ead0993f196825 100644 (file)
@@ -4,7 +4,7 @@ typedef enum _E_Plane_Type
 {
    E_PLANE_TYPE_INVALID,
    E_PLANE_TYPE_VIDEO,
-   E_PLANE_TYPE_OVERLAY,
+   E_PLANE_TYPE_GRAPHIC,
    E_PLANE_TYPE_CURSOR
 } E_Plane_Type;