Bug 75720

Summary: Zero length, zero width lines drawn inconsistently as nothing or one pixel depending on backend.
Product: xorg Reporter: Michal Srb <michalsrb>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: keithp
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Minimal test case. none

Description Michal Srb 2014-03-03 15:46:17 UTC
When a zero-width (default GC) line is drawn with the same starting and ending point using PolySegment the results differ based on current backend.

When the fbGCOps functions are used, like in Xephyr, nothing is drawn.
For example with EXA and nouveau or UXA and intel, 1 pixel is drawn.

Shouldn't it be consistent?

This has real-life impact; libgdk_pixbuf is (bit stupidly) rendering masks using lines and it expects one pixel to be drawn in this case. If it isn't drawn it leads to missing title bars in icewm. (https://bugzilla.novell.com/show_bug.cgi?id=856931)
Comment 1 Adam Jackson 2014-04-10 14:59:02 UTC
(In reply to comment #0)
> When a zero-width (default GC) line is drawn with the same starting and
> ending point using PolySegment the results differ based on current backend.
> 
> When the fbGCOps functions are used, like in Xephyr, nothing is drawn.
> For example with EXA and nouveau or UXA and intel, 1 pixel is drawn.
> 
> Shouldn't it be consistent?

I believe it should, yeah.  Is there an xts test that triggers this?
Comment 2 Michal Srb 2014-04-28 13:03:57 UTC
Created attachment 98127 [details]
Minimal test case.

(In reply to comment #1)
> I believe it should, yeah.  Is there an xts test that triggers this?

Sorry, I am not so familiar with xts. It looks like some of the lines drawn in Xlib9/XDrawLine could reproduce this, but I don't know for sure.

I attach minimal program that can be used for reproducing. It shows window that is either whole white (e.g. in Xephyr) or has one black pixel in top left corner (e.g. with EXA/nouveau and many others).
Comment 3 Stefan Dirsch 2014-12-17 13:28:47 UTC
Probably duplicate of https://bugs.freedesktop.org/show_bug.cgi?id=54168.
Comment 4 Stefan Dirsch 2018-07-17 09:59:18 UTC
(In reply to Stefan Dirsch from comment #3)
> Probably duplicate of https://bugs.freedesktop.org/show_bug.cgi?id=54168.

Let's assume so. Otherwise, Michal, please reopen!

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

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.