[Webkit-unassigned] [Bug 205444] [GTK][WPE] Wrong visualization of Conic gradients in high resolution displays
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 19 09:34:55 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=205444
Carlos Alberto Lopez Perez <clopez at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clopez at igalia.com
--- Comment #2 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
Comment on attachment 386092
--> https://bugs.webkit.org/attachment.cgi?id=386092
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=386092&action=review
> Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:86
> + const double pixelWidth = 0.1;
I find confusing this variable name. Its the width of a pixel 0.1??
maybe pixelSeparationWidth is a better name?
Also I think its worth adding a comment about why this is needed (because at high resolution a white line appears)
> Source/WebCore/platform/graphics/cairo/GradientCairo.cpp:99
> + cxOffset = 0 * pixelWidth;
> + cyOffset = -1 * pixelWidth;
> } else if (from.offset >= 0.25 && from.offset < 0.50) {
> - cxOffset = 0;
> - cyOffset = 0;
> + cxOffset = 0 * pixelWidth;
> + cyOffset = 0 * pixelWidth;
> } else if (from.offset >= 0.50 && from.offset < 0.75) {
> - cxOffset = -1;
> - cyOffset = 0;
> + cxOffset = -1 * pixelWidth;
> + cyOffset = 0 * pixelWidth;
> } else if (from.offset >= 0.75 && from.offset < 1) {
> - cxOffset = -1;
> - cyOffset = -1;
> + cxOffset = -1 * pixelWidth;
> + cyOffset = -1 * pixelWidth;
> } else {
Instead of doing this, perhaps it will be clear to do the multiplication below only once?
cx = cx + cxOffset * pixelWidth;
cy = cy + cyOffset * pixelWidth;;
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191219/cbfa8e90/attachment-0001.htm>
More information about the webkit-unassigned
mailing list