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

Commit 585cfbb1 authored by Prabhanjan Kandula's avatar Prabhanjan Kandula Committed by Manish Kumar
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

Conflicts:

	services/surfaceflinger/Layer.cpp
(cherry picked from commit f4c511eadf2450f1764617245205ffb940b710f8)
(cherry picked from commit 98d7ecf2a82fe6c2a82285b64ea9a8d8da443e9a)
(cherry picked from commit 2dcc6c014c7593d4d18667299718832a339905e3)
parent c7852e74
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -490,11 +490,22 @@ 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());

    RenderEngine& engine(mFlinger->getRenderEngine());

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