From 21145beae7141e1286c9318eaba79d3c791de2c7 Mon Sep 17 00:00:00 2001 From: Baldev Sahu Date: Tue, 24 Nov 2015 15:44:13 +0530 Subject: [PATCH] SurfaceFlinger: Add support for MDP3 This change is porting of below commits related to MDP3 In MDP3 we are using the widevine level3 for secure content display. And this should applicable only for primary display not for screen shot or screen recording - CRs-Fixed: 595469 - Change-Id: I99be2d81287ab746d5c4a2375c3106c59e61a8fc Change-Id: Ie7ac95e1c03eb7ad6f71098ecf09a1e25e69760f --- services/surfaceflinger/Layer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 1ee7242c4..2549863c6 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -666,8 +666,8 @@ void Layer::onDraw(const sp& hw, const Region& clip, bool blackOutLayer = isProtected() || (isSecure() && !hw->isSecure()); RenderEngine& engine(mFlinger->getRenderEngine()); - - if (!blackOutLayer || canAllowGPUForProtected()) { + if (!blackOutLayer || + ((hw->getDisplayType() == HWC_DISPLAY_PRIMARY) && canAllowGPUForProtected())) { // TODO: we could be more subtle with isFixedSize() const bool useFiltering = getFiltering() || needsFiltering(hw) || isFixedSize();