Skip to content
  • Ankit Nautiyal's avatar
    libweston: Add support to set content-protection for a weston_surface · 4b6e73d6
    Ankit Nautiyal authored
    
    
    The protection requested for a given surface, must reach through the
    weston_surface::pending_state, in the commit-cycle for the
    weston_surface, so that it gets updated in the next commit.
    
    As some protection is requested for a given weston_surface, it means
    protection must be set for each of the outputs which show the surface.
    
    While setting the protection of a weston_output, care must be taken
    so as to avoid, degrading the protection of another surfaces, enjoying
    the protection. For this purpose, all the weston_surfaces that are
    shown on a weston_output are checked for their desired protection.
    The highest of all such desired protections must be set for the
    weston_output to avoid degrading of existing protected surfaces.
    A surface requesting protection for a lower content-type can still be
    provided protection for a higher type but the converse cannot be
    allowed.
    
    This patch adds support to set content-protection for a suface, which
    inturn sets the content-protection for each of the outputs on which
    it is shown, provided, none of the existing surface's protection
    request is downgraded.
    
    Signed-off-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
    4b6e73d6