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

Commit 9af30706 authored by Melody Hsu's avatar Melody Hsu
Browse files

[legacy sf flag] - skipReportingTransformHint

Removing legacy frontend SF flag, skipReportingTransformHint
and its associated methods no longer used.

Bug: b/330785038
Test: presubmit
Change-Id: Ie7acd1d5ec362657e392115558a37d6d953dacf4
parent 5494c190
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -1549,10 +1549,6 @@ uint32_t Layer::getEffectiveUsage(uint32_t usage) const {
    return usage;
}

void Layer::skipReportingTransformHint() {
    mSkipReportingTransformHint = true;
}

void Layer::updateTransformHint(ui::Transform::RotationFlags transformHint) {
    if (mFlinger->mDebugDisableTransformHint || transformHint & ui::Transform::ROT_INVALID) {
        transformHint = ui::Transform::ROT_0;
@@ -2976,13 +2972,7 @@ void Layer::onSurfaceFrameCreated(

void Layer::releasePendingBuffer(nsecs_t dequeueReadyTime) {
    for (const auto& handle : mDrawingState.callbackHandles) {
        if (mFlinger->mLayerLifecycleManagerEnabled) {
        handle->transformHint = mTransformHint;
        } else {
            handle->transformHint = mSkipReportingTransformHint
                    ? std::nullopt
                    : std::make_optional<uint32_t>(mTransformHintLegacy);
        }
        handle->dequeueReadyTime = dequeueReadyTime;
        handle->currentMaxAcquiredBufferCount =
                mFlinger->getMaxAcquiredBufferCountForCurrentRefreshRate(mOwnerUid);
@@ -4326,7 +4316,6 @@ void Layer::setTransformHintLegacy(ui::Transform::RotationFlags displayTransform
    if (mTransformHintLegacy == ui::Transform::ROT_INVALID) {
        mTransformHintLegacy = displayTransformHint;
    }
    mSkipReportingTransformHint = false;
}

const std::shared_ptr<renderengine::ExternalTexture>& Layer::getExternalTexture() const {
+0 −2
Original line number Diff line number Diff line
@@ -698,7 +698,6 @@ public:
     * Sets display transform hint on BufferLayerConsumer.
     */
    void updateTransformHint(ui::Transform::RotationFlags);
    void skipReportingTransformHint();
    inline const State& getDrawingState() const { return mDrawingState; }
    inline State& getDrawingState() { return mDrawingState; }

@@ -1259,7 +1258,6 @@ private:
    // Transform hint provided to the producer. This must be accessed holding
    // the mStateLock.
    ui::Transform::RotationFlags mTransformHintLegacy = ui::Transform::ROT_0;
    bool mSkipReportingTransformHint = true;
    std::optional<ui::Transform::RotationFlags> mTransformHint = std::nullopt;

    ReleaseCallbackId mPreviousReleaseCallbackId = ReleaseCallbackId::INVALID_ID;
+1 −13
Original line number Diff line number Diff line
@@ -4020,19 +4020,7 @@ void SurfaceFlinger::commitTransactionsLocked(uint32_t transactionFlags) {
                }
            }

            if (!hintDisplay) {
                // NOTE: TEMPORARY FIX ONLY. Real fix should cause layers to
                // redraw after transform hint changes. See bug 8508397.
                // could be null when this layer is using a layerStack
                // that is not visible on any display. Also can occur at
                // screen off/on times.
                // U Update: Don't provide stale hints to the clients. For
                // special cases where we want the app to draw its
                // first frame before the display is available, we rely
                // on WMS and DMS to provide the right information
                // so the client can calculate the hint.
                layer->skipReportingTransformHint();
            } else {
            if (hintDisplay) {
                layer->updateTransformHint(hintDisplay->getTransformHint());
            }
        });