hwcomposer: keep secure content in an overlay when below skip layer
Secure content can not be displayed unless in an overlay. Since
getLayerStats marks all layers under the skip layer for framebuffer
composition, when there is a skip layer on top of protected content,
the protected content disappears since surfaceflinger doesn't draw
protected layers.
Acked-by: Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org>
Change-Id: I59dd5dffad08dbf578baa459f5f4c726b6674c83
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 33446b9..04bf864 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -93,6 +93,10 @@
return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO));
}
+// Returns true if the buffer is secure
+static inline bool isSecureBuffer(const private_handle_t* hnd) {
+ return (hnd && (private_handle_t::PRIV_FLAGS_SECURE_BUFFER & hnd->flags));
+}
//Return true if buffer is marked locked
static inline bool isBufferLocked(const private_handle_t* hnd) {
return (hnd && (private_handle_t::PRIV_FLAGS_HWC_LOCK & hnd->flags));