[SurfaceFlinger] Add support to capture protected contents.

Previously capture screen always use an unprotected buffer, which forces
layers with protected contents to be black. This patch enables to
capture with a protected buffer when there's no unprotected access to
the contents.

Bug: b/146180867
Test: N/A
Change-Id: I03a2c4f8d093f390abf7afb90aa3f7ea82f27ce4
5 files changed