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

Commit 28bc5a5b authored by Ethan Chen's avatar Ethan Chen
Browse files

Revert "SurfaceFlinger: Skip composition when rotation is not completed"

This reverts commit a59ff8f9.
Commit seems to cause screen updates to be skipped, especially when
rotating to play video.
parent a4dff0e9
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -194,19 +194,6 @@ status_t Layer::setBuffers( uint32_t w, uint32_t h,
    return NO_ERROR;
}

#ifdef QCOM_HARDWARE
bool Layer::isRotated() const {

    const Layer::State& front(drawingState());

    if( (front.w == front.requested_w) &&
        (front.h == front.requested_h) ) {
        return true;
    }
    return false;
}
#endif

void Layer::setGeometry(hwc_layer_t* hwcl)
{
    LayerBaseClient::setGeometry(hwcl);
+0 −3
Original line number Diff line number Diff line
@@ -77,9 +77,6 @@ public:
    virtual void onRemoved();
    virtual sp<Layer> getLayer() const { return const_cast<Layer*>(this); }
    virtual void setName(const String8& name);
#ifdef QCOM_HARDWARE
    virtual bool isRotated() const;
#endif

    // LayerBaseClient interface
    virtual wp<IBinder> getSurfaceTextureBinder() const;
+0 −6
Original line number Diff line number Diff line
@@ -363,12 +363,6 @@ bool LayerBase::isOverlay() const {
    return mInOverlay;
}

#ifdef QCOM_HARDWARE
bool LayerBase::isRotated() const {
    return true;
}
#endif

void LayerBase::setFiltering(bool filtering)
{
    mFiltering = filtering;
+0 −3
Original line number Diff line number Diff line
@@ -117,9 +117,6 @@ public:
    virtual void setPerFrameData(hwc_layer_t* hwcl);
            void setOverlay(bool inOverlay);
            bool isOverlay() const;
#ifdef QCOM_HARDWARE
    virtual bool isRotated() const;
#endif


    /**
+0 −22
Original line number Diff line number Diff line
@@ -451,13 +451,6 @@ bool SurfaceFlinger::threadLoop()
        handleWorkList();
    }

#ifdef QCOM_HARDWARE
    if (isRotationCompleted() == false) {
        LOGD("Rotation is not finished. Skip the composition");
        return true;
    }
#endif

    const DisplayHardware& hw(graphicPlane(0).displayHardware());
    if (LIKELY(hw.canDraw())) {
        // repaint the framebuffer (if needed)
@@ -856,21 +849,6 @@ void SurfaceFlinger::unlockPageFlip(const LayerVector& currentLayers)
    }
}

#ifdef QCOM_HARDWARE
bool SurfaceFlinger::isRotationCompleted()
{
    const Vector< sp<LayerBase> >& currentLayers(mVisibleLayersSortedByZ);
    const size_t count = currentLayers.size();

    for (size_t i=0 ; i<count ; i++) {
        if (currentLayers[i]->isRotated() == false) {
            return false;
        }
    }
    return true;
}
#endif

void SurfaceFlinger::handleWorkList()
{
    mHwWorkListDirty = false;
Loading