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

Commit 49b67afb authored by Prabhanjan Kandula's avatar Prabhanjan Kandula Committed by Arne Coucheron
Browse files

sf1 : Avoid resetting skip flag for dim layer

Dim layer can still have skip flag set on it to
indicate about any non-2D rotation that HWC can
not handle so do not override skip flag.

Change-Id: I2f7a979295cac9a9427bbe0f2cb388518ebe5fc7
parent 9e80d134
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1061,7 +1061,6 @@ public:
        }
    }
    virtual void setDim(uint32_t color) {
        setSkip(false);
        getLayer()->flags |= 0x80000000;
#ifdef QTI_BSP
        // Set RGBA color on HWC Dim layer
@@ -1142,7 +1141,7 @@ public:
    virtual void setBuffer(const sp<GraphicBuffer>& buffer) {
        if (buffer == 0 || buffer->handle == 0) {
            getLayer()->compositionType = HWC_FRAMEBUFFER;
            getLayer()->flags |= HWC_SKIP_LAYER;
            getLayer()->flags |=  (getLayer()->flags & 0x80000000) ? 0 : HWC_SKIP_LAYER;
            getLayer()->handle = 0;
        } else {
            if (getLayer()->compositionType == HWC_SIDEBAND) {
+1 −1
Original line number Diff line number Diff line
@@ -75,13 +75,13 @@ void LayerDim::setPerFrameData(const sp<const DisplayDevice>& hw,
        HWComposer::HWCLayerInterface& layer) {
  HWComposer& hwc = mFlinger->getHwComposer();

  Layer::setPerFrameData(hw, layer);
  if (hwc.hasDimComposition()) {
    // SF Client can set RGBA color on Dim layer. Solid Black is default.
    uint32_t color = getDrawingState().color;
    uint32_t rgba_color = !color ? 0x000000FF : color;
    layer.setDim(rgba_color);
  }
  Layer::setPerFrameData(hw, layer);
}
#endif