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

Commit 4a0260dd authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7579381 from 9c0fda56 to sc-d1-release

Change-Id: I7c14e33872d8c33c10bd99373bfe2687649e4c17
parents b857d580 9c0fda56
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@ static const TracingCategory k_categories[] = {
    { "aidl",       "AIDL calls",               ATRACE_TAG_AIDL, { } },
    { "nnapi",      "NNAPI",                    ATRACE_TAG_NNAPI, { } },
    { "rro",        "Runtime Resource Overlay", ATRACE_TAG_RRO, { } },
    { "sysprop",    "System Property",          ATRACE_TAG_SYSPROP, { } },
    { k_coreServiceCategory, "Core services", 0, { } },
    { k_pdxServiceCategory, "PDX services", 0, { } },
    { "sched",      "CPU Scheduling",   0, {
+5 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ message SurfaceChange {
        BackgroundBlurRadiusChange  background_blur_radius  = 20;
        ShadowRadiusChange          shadow_radius           = 21;
        BlurRegionsChange           blur_regions            = 22;
        TrustedOverlayChange        trusted_overlay         = 23;
    }
}

@@ -192,6 +193,10 @@ message ShadowRadiusChange {
    required float radius = 1;
}

message TrustedOverlayChange {
    required float is_trusted_overlay = 1;
}

message BlurRegionsChange {
    repeated BlurRegionChange blur_regions = 1;
}
+7 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ layer_state_t::layer_state_t()
        fixedTransformHint(ui::Transform::ROT_INVALID),
        frameNumber(0),
        autoRefresh(false),
        isTrustedOverlay(false),
        bufferCrop(Rect::INVALID_RECT),
        destinationFrame(Rect::INVALID_RECT),
        releaseBufferListener(nullptr) {
@@ -170,6 +171,7 @@ status_t layer_state_t::write(Parcel& output) const
    SAFE_PARCEL(output.write, stretchEffect);
    SAFE_PARCEL(output.write, bufferCrop);
    SAFE_PARCEL(output.write, destinationFrame);
    SAFE_PARCEL(output.writeBool, isTrustedOverlay);

    return NO_ERROR;
}
@@ -300,6 +302,7 @@ status_t layer_state_t::read(const Parcel& input)
    SAFE_PARCEL(input.read, stretchEffect);
    SAFE_PARCEL(input.read, bufferCrop);
    SAFE_PARCEL(input.read, destinationFrame);
    SAFE_PARCEL(input.readBool, &isTrustedOverlay);

    return NO_ERROR;
}
@@ -532,6 +535,10 @@ void layer_state_t::merge(const layer_state_t& other) {
        what |= eAutoRefreshChanged;
        autoRefresh = other.autoRefresh;
    }
    if (other.what & eTrustedOverlayChanged) {
        what |= eTrustedOverlayChanged;
        isTrustedOverlay = other.isTrustedOverlay;
    }
    if (other.what & eReleaseBufferListenerChanged) {
        if (releaseBufferListener) {
            ALOGW("Overriding releaseBufferListener");
+13 −0
Original line number Diff line number Diff line
@@ -1656,6 +1656,19 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setAutoR
    return *this;
}

SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setTrustedOverlay(
        const sp<SurfaceControl>& sc, bool isTrustedOverlay) {
    layer_state_t* s = getLayerState(sc);
    if (!s) {
        mStatus = BAD_INDEX;
        return *this;
    }

    s->what |= layer_state_t::eTrustedOverlayChanged;
    s->isTrustedOverlay = isTrustedOverlay;
    return *this;
}

SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setApplyToken(
        const sp<IBinder>& applyToken) {
    mApplyToken = applyToken;
+5 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ struct layer_state_t {
        eBlurRegionsChanged = 0x800'00000000,
        eAutoRefreshChanged = 0x1000'00000000,
        eStretchChanged = 0x2000'00000000,
        eTrustedOverlayChanged = 0x4000'00000000,
    };

    layer_state_t();
@@ -225,6 +226,10 @@ struct layer_state_t {
    // in shared buffer mode.
    bool autoRefresh;

    // An inherited state that indicates that this surface control and its children
    // should be trusted for input occlusion detection purposes
    bool isTrustedOverlay;

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

Loading