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

Commit 08d1051c authored by Peiyong Lin's avatar Peiyong Lin
Browse files

[SurfaceComposerClient] Add API to query protected content support.

To facilitate display color service to know the capability of protected content
in GPU composition, add an API to allow SurfaceControl to query back from composer.

BUG: 117436546
Test: Build. flash and boot. Verify by checking returned value.

Change-Id: Ic99783c21a3bd130e90b5b71823d7761c22e4715
parent def831d5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1118,6 +1118,12 @@ status_t SurfaceComposerClient::getCompositionPreference(
                                       wideColorGamutDataspace, wideColorGamutPixelFormat);
}

bool SurfaceComposerClient::getProtectedContentSupport() {
    bool supported = false;
    ComposerService::getComposerService()->getProtectedContentSupport(&supported);
    return supported;
}

status_t SurfaceComposerClient::clearAnimationFrameStats() {
    return ComposerService::getComposerService()->clearAnimationFrameStats();
}
+6 −0
Original line number Diff line number Diff line
@@ -145,6 +145,12 @@ public:
                                             ui::Dataspace* wideColorGamutDataspace,
                                             ui::PixelFormat* wideColorGamutPixelFormat);

    /*
     * Gets whether SurfaceFlinger can support protected content in GPU composition.
     * Requires the ACCESS_SURFACE_FLINGER permission.
     */
    static bool getProtectedContentSupport();

    /**
     * Called from SurfaceControl d'tor to 'destroy' the surface (or rather, reparent it
     * to null), but without needing an sp<SurfaceControl> to avoid infinite ressurection.