Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6b60781 authored by Prabhanjan Kandula's avatar Prabhanjan Kandula Committed by Steve Kondik
Browse files

surfaceflinger: Allow gpu to render widevine level3

Allow gpu to render widevine level3 but keep
blocking screen shots.

CRs-fixed: 428647,424769,421767

Change-Id: I914232a062acbb7b17901dbf2b414973230e59d9
parent 9ee427e9
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -504,9 +504,20 @@ void Layer::onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const
        // is probably going to have something visibly wrong.
    }

    bool canAllowGPU = false;
#ifdef QCOM_BSP
    if(isProtected()) {
        char property[PROPERTY_VALUE_MAX];
        if ((property_get("persist.gralloc.cp.level3", property, NULL) > 0) &&
                (atoi(property) == 1)) {
            canAllowGPU = true;
        }
    }
#endif

    bool blackOutLayer = isProtected() || (isSecure() && !hw->isSecure());

    if (!blackOutLayer) {
    if (!blackOutLayer || (canAllowGPU)) {
        // TODO: we could be more subtle with isFixedSize()
        const bool useFiltering = getFiltering() || needsFiltering(hw) || isFixedSize();