libweston: Add support to set content-protection for a weston_surface
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: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
This commit is contained in:
@@ -1439,6 +1439,9 @@ struct weston_surface_state {
|
||||
|
||||
/* zwp_surface_synchronization_v1.get_release */
|
||||
struct weston_buffer_release_reference buffer_release_ref;
|
||||
|
||||
/* weston_protected_surface.set_type */
|
||||
enum weston_hdcp_protection desired_protection;
|
||||
};
|
||||
|
||||
struct weston_surface_activation_data {
|
||||
@@ -1568,6 +1571,8 @@ struct weston_surface {
|
||||
struct wl_resource *synchronization_resource;
|
||||
int acquire_fence_fd;
|
||||
struct weston_buffer_release_reference buffer_release_ref;
|
||||
|
||||
enum weston_hdcp_protection desired_protection;
|
||||
};
|
||||
|
||||
struct weston_subsurface {
|
||||
|
||||
Reference in New Issue
Block a user