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

Commit 63f53194 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Steve Kondik
Browse files

surfaceflinger: Update support for hwc < 1.0

Add android::HWCLayerVersion0 implementations of the new methods

Change-Id: Ic199c9b4262049b74632a57ad2b2cdf462a05b43
parent 3015f0e9
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1020,13 +1020,21 @@ public:
        // not supported on VERSION_03
        return -1;
    }
    virtual sp<Fence> getAndResetReleaseFence() {
        // not supported on VERSION_03
        return Fence::NO_FENCE;
    }
    virtual void setPlaneAlpha(uint8_t alpha) {
        if (alpha < 0xFF) {
            getLayer()->flags |= HWC_SKIP_LAYER;
        }
    }
    virtual void setAcquireFenceFd(int fenceFd) {
        if (fenceFd != -1) {
            ALOGE("HWC 0.x can't handle acquire fences");
            close(fenceFd);
        }
    }

    virtual void setDefaultState() {
        getLayer()->compositionType = HWC_FRAMEBUFFER;
        getLayer()->hints = 0;