SoftwareRenderer: Workaround for avoiding drawing outside the buffer.