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

Commit 9ce8a5a0 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7137523 from 55e57de6 to sc-release

Change-Id: Ic50b81fa1c448ede21935a67f9ec000d3f8ed1a0
parents d4046d87 55e57de6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -101,4 +101,11 @@ interface IPackageManagerNative {
     * This does nothing if this observer was not already registered.
     */
    void unregisterPackageChangeObserver(in IPackageChangeObserver observer);

    /**
     * Returns true if the package has the SHA 256 version of the signing certificate.
     * @see PackageManager#hasSigningCertificate(String, byte[], int), where type
     * has been set to {@link PackageManager#CERT_INPUT_SHA256}.
     */
    boolean hasSha256SigningCertificate(in @utf8InCpp String packageName, in byte[] certificate);
}
+6 −0
Original line number Diff line number Diff line
@@ -167,6 +167,9 @@ status_t layer_state_t::write(Parcel& output) const
        SAFE_PARCEL(output.writeInt32, region.right);
        SAFE_PARCEL(output.writeInt32, region.bottom);
    }

    SAFE_PARCEL(output.write, stretchEffect);

    return NO_ERROR;
}

@@ -290,6 +293,9 @@ status_t layer_state_t::read(const Parcel& input)
        SAFE_PARCEL(input.readInt32, &region.bottom);
        blurRegions.push_back(region);
    }

    SAFE_PARCEL(input.read, stretchEffect);

    return NO_ERROR;
}

+17 −0
Original line number Diff line number Diff line
@@ -1569,6 +1569,23 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setApply
    return *this;
}

SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setStretchEffect(
        const sp<SurfaceControl>& sc, float left, float top, float right, float bottom, float vecX,
        float vecY, float maxAmount) {
    layer_state_t* s = getLayerState(sc);
    if (!s) {
        mStatus = BAD_INDEX;
        return *this;
    }

    s->what |= layer_state_t::eStretchChanged;
    s->stretchEffect = StretchEffect{.area = {left, top, right, bottom},
                                     .vectorX = vecX,
                                     .vectorY = vecY,
                                     .maxAmount = maxAmount};
    return *this;
}

// ---------------------------------------------------------------------------

DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) {
+5 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
#include <ui/Rect.h>
#include <ui/Region.h>
#include <ui/Rotation.h>
#include <ui/StretchEffect.h>
#include <ui/Transform.h>
#include <utils/Errors.h>

@@ -135,6 +136,7 @@ struct layer_state_t {
        eFrameTimelineInfoChanged = 0x800'00000000,
        eBlurRegionsChanged = 0x1000'00000000,
        eAutoRefreshChanged = 0x2000'00000000,
        eStretchChanged = 0x4000'00000000,
    };

    layer_state_t();
@@ -244,6 +246,9 @@ struct layer_state_t {
    // can and not wait for a frame to become available. This is only relevant
    // in shared buffer mode.
    bool autoRefresh;

    // Stretch effect to be applied to this layer
    StretchEffect stretchEffect;
};

struct ComposerState {
+4 −0
Original line number Diff line number Diff line
@@ -550,6 +550,10 @@ public:
        // transactions from blocking each other.
        Transaction& setApplyToken(const sp<IBinder>& token);

        Transaction& setStretchEffect(const sp<SurfaceControl>& sc, float left, float top,
                                      float right, float bottom, float vecX, float vecY,
                                      float maxAmount);

        status_t setDisplaySurface(const sp<IBinder>& token,
                const sp<IGraphicBufferProducer>& bufferProducer);

Loading