diff options
author | 2023-12-05 21:18:45 +0000 | |
---|---|---|
committer | 2023-12-05 21:18:45 +0000 | |
commit | d6a6f38c2449d059e9ba2f90668b95145f6237b8 (patch) | |
tree | c3c7b897976b171ecf0267816656328812adbeeb /services/surfaceflinger/LayerFE.cpp | |
parent | 0face5563dc7a2f0ba152dc312da824bf405ea25 (diff) | |
parent | 18fa7c60ccd9697973308fce60482e67dee58d98 (diff) |
Merge "Add isProtected flag to Output" into main
Diffstat (limited to 'services/surfaceflinger/LayerFE.cpp')
-rw-r--r-- | services/surfaceflinger/LayerFE.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/services/surfaceflinger/LayerFE.cpp b/services/surfaceflinger/LayerFE.cpp index f25619a6c0..2dbcb841ac 100644 --- a/services/surfaceflinger/LayerFE.cpp +++ b/services/surfaceflinger/LayerFE.cpp @@ -208,9 +208,15 @@ void LayerFE::prepareBufferStateClientComposition( // activeBuffer, then we need to return LayerSettings. return; } - const bool blackOutLayer = - (mSnapshot->hasProtectedContent && !targetSettings.supportsProtectedContent) || - ((mSnapshot->isSecure || mSnapshot->hasProtectedContent) && !targetSettings.isSecure); + bool blackOutLayer; + if (FlagManager::getInstance().display_protected()) { + blackOutLayer = (mSnapshot->hasProtectedContent && !targetSettings.isProtected) || + (mSnapshot->isSecure && !targetSettings.isSecure); + } else { + blackOutLayer = (mSnapshot->hasProtectedContent && !targetSettings.isProtected) || + ((mSnapshot->isSecure || mSnapshot->hasProtectedContent) && + !targetSettings.isSecure); + } const bool bufferCanBeUsedAsHwTexture = mSnapshot->externalTexture->getUsage() & GraphicBuffer::USAGE_HW_TEXTURE; if (blackOutLayer || !bufferCanBeUsedAsHwTexture) { |