Bug 360596 - Fastest possible line drawing algorithm changed
Summary: Fastest possible line drawing algorithm changed
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 535868
  Show dependency tree
 
Reported: 2011-10-11 18:03 EDT by Marco Maccaferri CLA
Modified: 2021-01-13 00:45 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Maccaferri CLA 2011-10-11 18:03:05 EDT
Build Identifier: I20110915-1308

The line rendering, after calling GC.setLineWidth(0) to use the fastest possible line drawing algorithm, changed in SWT 3.8M2, the line is now thicker than before, as if the line width was set to 1. Looks like the fastest algorithm is ignored.

The "squiggle" underline in the text editor has the same effect: thin in Eclipse 3.7.1, thick in Eclipse 3.8M2.


Reproducible: Always
Comment 1 Felipe Heidrich CLA 2011-10-12 10:49:39 EDT
Arun, can you try this out ?
Comment 2 Silenio Quarti CLA 2011-10-12 11:47:29 EDT
This is probably happening because cairo graphics is always on when the gtk version is greater than 2.18.
Comment 3 Marco Maccaferri CLA 2011-10-24 11:11:50 EDT
I don't understand, should it be considered a new feature ? The issue is on the same OS version (Fedora 14) so something changed from SWT 3.7.1 to 3.8M2. Calling GC.setAdvanced true or false doesn't seems to have any effect (never used it before so maybe it is just me), are there other settings to change to have the lines display as before ?
Comment 4 Marco Maccaferri CLA 2011-11-02 14:22:32 EDT
Found the workaround: set the system property org.eclipse.swt.internal.gtk.useCairo=false, this disables cairo and makes all drawings look correct (or at least same as release 3.7.1).

Still don't understand what setAdvanced should do, with false it should disable cairo but if cairo is enabled it won't disable it, it just sets some parameters (lines 2955-2967, GC.java). Looks like a bug to me but I don't fully understand what these calls means so I'm not sure.
Comment 5 Felipe Heidrich CLA 2011-11-02 14:59:22 EDT
I don't believe disabling cairo is the right answer.
GTK (and SWT) are moving to world where cairo is always enabled. As a matter of fact, in GTK 3 everything is draw using cairo.

We should fix the real cause of the problem, lineWidth==0.
Comment 6 Eclipse Genie CLA 2021-01-13 00:45:23 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.