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

Commit 17c94649 authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "Remove undefined behavior in getDisplayDecorationSupport"

parents 4fb0b2a4 0f365abe
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -2715,12 +2715,16 @@ std::optional<DisplayDecorationSupport> SurfaceComposerClient::getDisplayDecorat
            ComposerServiceAIDL::getComposerService()->getDisplayDecorationSupport(displayToken,
                                                                                   &gsupport);
    std::optional<DisplayDecorationSupport> support;
    if (status.isOk() && gsupport.has_value()) {
        support->format = static_cast<aidl::android::hardware::graphics::common::PixelFormat>(
                gsupport->format);
        support->alphaInterpretation =
    // TODO (b/241277093): Remove `false && ` once b/241278870 is fixed.
    if (false && status.isOk() && gsupport.has_value()) {
        support.emplace(DisplayDecorationSupport{
          .format =
                static_cast<aidl::android::hardware::graphics::common::PixelFormat>(
                gsupport->format),
          .alphaInterpretation =
                static_cast<aidl::android::hardware::graphics::common::AlphaInterpretation>(
                        gsupport->alphaInterpretation);
                        gsupport->alphaInterpretation)
        });
    }
    return support;
}