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

Commit 007e64ac authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "fix a crasher in dumpsys"

parents c4438066 2db6f0a4
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -986,19 +986,25 @@ void SurfaceTexture::dump(String8& result, const char* prefix,

    for (int i=0 ; i<mBufferCount ; i++) {
        const BufferSlot& slot(mSlots[i]);
        const sp<GraphicBuffer>& buf(slot.mGraphicBuffer);
        snprintf(buffer, SIZE,
                "%s%s[%02d] "
                "%p [%4ux%4u:%4u,%3X] "
                "state=%-8s, crop=[%d,%d,%d,%d], "
                "transform=0x%02x, timestamp=%lld\n",
                "transform=0x%02x, timestamp=%lld",
                prefix, (i==mCurrentTexture)?">":" ", i,
                buf->handle, buf->width, buf->height, buf->stride, buf->format,
                stateName(slot.mBufferState),
                slot.mCrop.left, slot.mCrop.top, slot.mCrop.right, slot.mCrop.bottom,
                slot.mTransform, slot.mTimestamp
        );
        result.append(buffer);

        const sp<GraphicBuffer>& buf(slot.mGraphicBuffer);
        if (buf != NULL) {
            snprintf(buffer, SIZE,
                    ", %p [%4ux%4u:%4u,%3X]",
                    buf->handle, buf->width, buf->height, buf->stride, buf->format);
            result.append(buffer);
        }
        result.append("\n");
    }
}