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 - Extra Pixel From SDL_RenderCopy When Drawing Lines Before SDL_RenderCopy
Summary: Extra Pixel From SDL_RenderCopy When Drawing Lines Before SDL_RenderCopy
Status: RESOLVED DUPLICATE of bug 4825
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.10
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.12
Depends on:
Blocks:
 
Reported: 2020-02-11 02:46 UTC by Eric Scrivner
Modified: 2020-02-17 21:39 UTC (History)
0 users

See Also:


Attachments
Example image showing the single white pixel produced at the bottom right corner of the copied texture. (10.23 KB, image/png)
2020-02-11 02:46 UTC, Eric Scrivner
Details
Source file that reliably reproduces the issue. (5.37 KB, text/x-csrc)
2020-02-11 02:47 UTC, Eric Scrivner
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***