Revert "Revert "[SurfaceFlinger] Add GPU protected content support.""
This reverts commit 78fb96f3f8b40cba6b9e2cb2b0c332a45798b522.
Reason for revert: Revert the revert with Fix.
BUG: 35315015
Test: Test with a hacked patch.
Test: Watch Youtube movie, verifed by force GPU composition.
Change-Id: Ic738b5f873dbff322473d4f999074dc35c8813c7
diff --git a/services/surfaceflinger/BufferLayer.h b/services/surfaceflinger/BufferLayer.h
index 55d68f6..98ae286 100644
--- a/services/surfaceflinger/BufferLayer.h
+++ b/services/surfaceflinger/BufferLayer.h
@@ -71,6 +71,10 @@
// isVisible - true if this layer is visible, false otherwise
bool isVisible() const override EXCLUDES(mStateMutex);
+ // isProtected - true if the layer may contain protected content in the
+ // GRALLOC_USAGE_PROTECTED sense.
+ bool isProtected() const override;
+
// isFixedSize - true if content has a fixed size
bool isFixedSize() const override;
@@ -155,13 +159,6 @@
virtual void setHwcLayerBuffer(DisplayId displayId) EXCLUDES(mStateMutex) = 0;
- // -----------------------------------------------------------------------
-
-public:
- // isProtected - true if the layer may contain protected content in the
- // GRALLOC_USAGE_PROTECTED sense.
- bool isProtected() const;
-
protected:
// Loads the corresponding system property once per process
static bool latchUnsignaledBuffers();