We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4972

Summary: Extra Pixel From SDL_RenderCopy When Drawing Lines Before SDL_RenderCopy
Product: SDL Reporter: Eric Scrivner <eric.t.scrivner>
Component: renderAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 Keywords: target-2.0.12
Version: 2.0.10   
Hardware: x86_64   
OS: Linux   
Attachments: Example image showing the single white pixel produced at the bottom right corner of the copied texture.
Source file that reliably reproduces the issue.

Description Eric Scrivner 2020-02-11 02:46:40 UTC
Created attachment 4201 [details]
Example image showing the single white pixel produced at the bottom right corner of the copied texture.

When using SDL_RenderDrawLine to draw a set of lines before using SDL_RenderCopy to copy a texture a single white pixel artifact is produced at the bottom-right corner just outside the bounds of copied texture.

Changing the drawing order, so the calls to SDL_RenderDrawLine happen after the SDL_RenderCopy of the texture fixes the issue.

See the attached image. Example program will also be attached in a subsequent comment.
Comment 1 Eric Scrivner 2020-02-11 02:47:48 UTC
Created attachment 4202 [details]
Source file that reliably reproduces the issue.
Comment 2 Ryan C. Gordon 2020-02-12 20:16:37 UTC
This is (probably) not related to our line drawing issues in Bug #2711, but I'm making a note here in case it turns out to be related.

--ryan.
Comment 3 Ryan C. Gordon 2020-02-17 21:39:18 UTC
Turns out we already fixed this for Bug #4825. It was a buffer overflow in 2.0.10 that Sylvain fixed here:

https://hg.libsdl.org/SDL/rev/3276502021a5

I've now confirmed that this specific patch fixes this specific bug.

--ryan.

*** This bug has been marked as a duplicate of bug 4825 ***