e_client: added support for 'wm.policy.win.rot.render.nopending' aux hint. 72/113972/2
authorGwanglim Lee <gl77.lee@samsung.com>
Thu, 9 Feb 2017 11:22:33 +0000 (20:22 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 9 Feb 2017 11:24:31 +0000 (03:24 -0800)
The display server doesn't block application rendering if the client window
has a 'wm.policy.win.rot.render.nopending' aux hint during rotation.

Each module can check wheter this aux hint is set by using
ec->e.state.rot.nopending_render member.

Change-Id: Ib1db526d5ef60b5c9c9d29211be5c5b271a04c17

src/bin/e_client.h
src/bin/e_policy_wl.c

index e440c36..b4ae68e 100644 (file)
@@ -618,6 +618,8 @@ struct E_Client
             int           preferred_rot;  // app specified rotation
             int          *available_rots; // app specified available rotations
             unsigned int  count;          // number of elements of available rotations
+            unsigned int  nopending_render : 1; // app wants to show rendering jobs before sending rotation_done
+                                                // it is set by 'wm.policy.win.rot.render.nopending' aux hint
          } rot;
 #endif
       } state;
index 91c42a5..d71cc4f 100644 (file)
@@ -217,6 +217,7 @@ enum _E_Policy_Hint_Type
    E_POLICY_HINT_MSG_USE = 7,
    E_COMP_HINT_ALWAYS_SELECTIVE = 8,
    E_POLICY_HINT_DEPENDENT_ROTATION = 9,
+   E_POLICY_HINT_ROT_RENDER_NOPENDING = 10,
 };
 
 static const char *hint_names[] =
@@ -231,6 +232,7 @@ static const char *hint_names[] =
    "wm.policy.win.msg.use",
    "wm.comp.win.always.selective.mode",
    "wm.policy.win.rot.dependent",
+   "wm.policy.win.rot.render.nopending",
 };
 
 static void                _e_policy_wl_surf_del(E_Policy_Wl_Surface *psurf);
@@ -2313,6 +2315,19 @@ _e_policy_wl_aux_hint_apply(E_Client *ec)
              else if (!strcmp(hint->val, "1"))
                ec->e.state.rot.type = E_CLIENT_ROTATION_TYPE_DEPENDENT;
           }
+        else if (!strcmp(hint->hint, hint_names[E_POLICY_HINT_ROT_RENDER_NOPENDING]))
+          {
+             if ((hint->deleted) || (!strcmp(hint->val, "0")))
+               {
+                  ELOGF("ROTATION", "nopending render:0", ec->pixmap, ec);
+                  ec->e.state.rot.nopending_render = 0;
+               }
+             else if (!strcmp(hint->val, "1"))
+               {
+                  ELOGF("ROTATION", "nopending render:1", ec->pixmap, ec);
+                  ec->e.state.rot.nopending_render = 1;
+               }
+          }
 
         if (send)
           _e_policy_wl_allowed_aux_hint_send(ec, hint->id);