Screen capture protected content for animations
Allow capturing protected (DRM) content for animations since the content
will only be rendered back into a protected context. The three
animations are ScreenRotation, SurfaceFreezer, and ColorFade.
For each case, use the setAllowProtected when capturing the content.
ScreenRotation and SurfaceFreezer render the content back on screen
using a SurfaceControl. The Layer automatically gets marked as secure
in SurfaceFlinger since the GraphicBuffer queued is marked as protected.
For ColorFade, the content is rendered with a GL context so we need to
recreate the context with the protected value set.
Test: ColorFade, ScreenRotation, FreeForm with DRM and not DRM content
Fixes: 146180867
Change-Id: I1255d3dd439bcf7b8e4cc4d4a2ce1083b70cb9f1
7 files changed