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

Commit 025b309a authored by Ravi K Yenduri's avatar Ravi K Yenduri
Browse files

Capture failure of copybit->stretch()

parent 17a8f690
Loading
Loading
Loading
Loading
+35 −29
Original line number Diff line number Diff line
@@ -493,10 +493,15 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const
                copybit->set_parameter(copybit, COPYBIT_DITHER, COPYBIT_DISABLE);
                err = copybit->stretch(copybit,
                        &tmp.img, &src.img, &tmp.crop, &src.crop, &tmp_it);
                if (err != NO_ERROR) {
                    LOGE("copybit failed (%s)", strerror(err));
                } else {
                    src = tmp;
                }
            }
        }

        if (err == NO_ERROR) {
            const DisplayHardware& hw(mLayer.graphicPlane(0).displayHardware());
            copybit_image_t dst;
            hw.getDisplaySurface(&dst);
@@ -527,6 +532,7 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const
                LOGE("copybit failed (%s)", strerror(err));
            }
        }
    }

    if (!can_use_copybit || err) {
        if (UNLIKELY(mTextureName == -1LU)) {