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

Commit 1dd1b879 authored by Alec Mouri's avatar Alec Mouri
Browse files

Remove extra isCurrent calls.

These invocations originated from a fork of GLConsumer which was
accessible by apps.

Bug: 116277151
Test: SurfaceFlinger_test, libsurfaceflinger_unittest, go/wm-smoke
Change-Id: Iaa0846b8caea9b9d8f31886e98da8098599d9a77
parent 39801c08
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -158,12 +158,6 @@ status_t BufferLayerConsumer::updateTexImage(BufferRejecter* rejecter, const Dis
        return NO_INIT;
    }

    // Make sure RenderEngine is current
    if (!mRE.isCurrent()) {
        BLC_LOGE("updateTexImage: RenderEngine is not current");
        return INVALID_OPERATION;
    }

    BufferItem item;

    // Acquire the next buffer.
@@ -524,10 +518,6 @@ std::shared_ptr<FenceTime> BufferLayerConsumer::getCurrentFenceTime() const {
}

status_t BufferLayerConsumer::doFenceWaitLocked() const {
    if (!mRE.isCurrent()) {
        BLC_LOGE("doFenceWait: RenderEngine is not current");
        return INVALID_OPERATION;
    }
    if (mCurrentFence->isValid()) {
        if (mRE.useWaitSync()) {
            base::unique_fd fenceFd(mCurrentFence->dup());
+0 −5
Original line number Diff line number Diff line
@@ -327,11 +327,6 @@ status_t BufferStateLayer::bindTextureImage() {
    const State& s(getDrawingState());
    auto& engine(mFlinger->getRenderEngine());

    if (!engine.isCurrent()) {
        ALOGE("RenderEngine is not current");
        return INVALID_OPERATION;
    }

    engine.checkErrors();

    // TODO(marissaw): once buffers are cached, don't create a new image everytime
+0 −1
Original line number Diff line number Diff line
@@ -474,7 +474,6 @@ struct BaseLayerProperties {
        enqueueBuffer(test, layer);
        Mock::VerifyAndClear(test->mMessageQueue);

        EXPECT_CALL(*test->mRenderEngine, isCurrent()).WillRepeatedly(Return(true));
        EXPECT_CALL(*test->mRenderEngine, useNativeFenceSync()).WillRepeatedly(Return(true));
        bool ignoredRecomputeVisibleRegions;
        layer->latchBuffer(ignoredRecomputeVisibleRegions, 0, Fence::NO_FENCE);