WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
225952
[GTK][WebInspector] Value of 'imageSmoothingQuality' is 'medium' for platforms not using CG
https://bugs.webkit.org/show_bug.cgi?id=225952
Summary
[GTK][WebInspector] Value of 'imageSmoothingQuality' is 'medium' for platform...
Diego Pino
Reported
2021-05-18 18:41:36 PDT
[GTK][WebInspector] Value of 'imageSmoothingQuality' is 'medium' for platforms not using CG
Attachments
Patch
(52.06 KB, patch)
2021-05-18 18:42 PDT
,
Diego Pino
no flags
Details
Formatted Diff
Diff
Patch
(4.34 KB, patch)
2021-05-20 00:20 PDT
,
Diego Pino
no flags
Details
Formatted Diff
Diff
Patch
(4.39 KB, patch)
2021-05-20 01:51 PDT
,
Diego Pino
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Diego Pino
Comment 1
2021-05-18 18:42:52 PDT
Created
attachment 429015
[details]
Patch
Diego Pino
Comment 2
2021-05-18 18:51:14 PDT
Right now several tests in 'inspector/canvas' are failing because of a wrong check of the 'imageSmoothingQuality' value. This value is 'low' for CG platforms and 'medium' otherwise [1]. The tests that are failing are the following: inspector/canvas/recording-2d-frameCount.html inspector/canvas/recording-2d-full.html inspector/canvas/recording-2d-memoryLimit.html inspector/canvas/recording-2d-saves.html inspector/canvas/recording-html-2d.html The patch sets the default value accordingly and emits new specific baselines for GTK platform. Maybe emitting new baselines can be saved if the check of 'imageSmoothingQuality' value is done in a different way. [1]
https://webkit-search.igalia.com/webkit/source/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp#86
Sam Weinig
Comment 3
2021-05-19 08:14:24 PDT
Perhaps we should instead update non-CG platforms to use low as well, as that is what the spec says it should be these days:
https://html.spec.whatwg.org/multipage/canvas.html#canvasimagesmoothing
Diego Pino
Comment 4
2021-05-20 00:20:53 PDT
Created
attachment 429142
[details]
Patch
Diego Pino
Comment 5
2021-05-20 01:51:36 PDT
Created
attachment 429148
[details]
Patch
Sam Weinig
Comment 6
2021-05-21 08:38:01 PDT
Comment on
attachment 429148
[details]
Patch Thanks!
EWS
Comment 7
2021-05-21 16:04:25 PDT
Committed
r277896
(
238031@main
): <
https://commits.webkit.org/238031@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 429148
[details]
.
Radar WebKit Bug Importer
Comment 8
2021-05-21 16:05:22 PDT
<
rdar://problem/78333302
>
Tim Horton
Comment 9
2021-05-23 00:01:22 PDT
FWIW this broke fast/canvas/canvas-imageSmoothingEnabled.html fast/canvas/canvas-imageSmoothingQuality.html on gtk
Tim Horton
Comment 10
2021-05-23 00:01:49 PDT
Also why the [WebInspector] prefix? This is a wide-ranging change :)
Tim Horton
Comment 11
2021-05-23 12:53:50 PDT
From my debugging before I found this bug yesterday, it kind of seemed like Cairo's "low quality" really means "not at all". Maybe that's why it was medium before?
Diego Pino
Comment 12
2021-06-15 15:55:52 PDT
(In reply to Tim Horton from
comment #9
)
> FWIW this broke > > fast/canvas/canvas-imageSmoothingEnabled.html > fast/canvas/canvas-imageSmoothingQuality.html > > on gtk
Right, fast/canvas/canvas-imageSmoothingEnabled.html has regressed: -PASS left_of_center_pixel.data[0] !== 0 is true -PASS left_of_center_pixel.data[1] !== 0 is true -PASS left_of_center_pixel.data[2] !== 0 is true +FAIL left_of_center_pixel.data[0] !== 0 should be true. Was false. +FAIL left_of_center_pixel.data[1] !== 0 should be true. Was false. +FAIL left_of_center_pixel.data[2] !== 0 should be true. Was false. fast/canvas/canvas-imageSmoothingQuality.html has its own baseline for GTK. The test has now one test that went from FAIL to PASS and viceversa. I think updating the baseline is the right thing to do. --- /home/buildbot/worker/gtk-linux-64-release-tests/build/layout-test-results/fast/canvas/canvas-imageSmoothingQuality-expected.txt +++ /home/buildbot/worker/gtk-linux-64-release-tests/build/layout-test-results/fast/canvas/canvas-imageSmoothingQuality-actual.txt @@ -8,14 +8,14 @@ PASS mediumContext.imageSmoothingQuality is 'medium' PASS highContext.imageSmoothingQuality is 'high' -PASS lowData is not mediumData +FAIL lowData should not be {"0":0,"1":0,"2":0,"3":128}. PASS mediumData is not highData PASS lowData is not highData PASS sampleAlpha(lowData) is >= sampleAlpha(mediumData) PASS sampleAlpha(mediumData) is >= sampleAlpha(highData) -FAIL defaultContext.imageSmoothingQuality should be low. Was medium. +PASS defaultContext.imageSmoothingQuality is 'low' PASS highContext.imageSmoothingEnabled = false; highContext.imageSmoothingQuality is 'high' PASS highContext.imageSmoothingQuality = 'medium'; highContext.imageSmoothingQuality is 'medium'
Diego Pino
Comment 13
2021-06-15 16:05:04 PDT
(In reply to Tim Horton from
comment #10
)
> Also why the [WebInspector] prefix? This is a wide-ranging change :)
The first patch changed LayoutTests/inspector/canvas/recording-2d-saves.html to produce different imageSmoothingQuality values depending on platform. Since it only targeted a WebInspector test adding the WebInspector label made sense. Then, in the review process it was pointed out imageSmoothingQuality default value should be Low as defined by specification, but the original WebInspector label remained.
Diego Pino
Comment 14
2021-06-15 16:16:43 PDT
(In reply to Tim Horton from
comment #11
)
> From my debugging before I found this bug yesterday, it kind of seemed like > Cairo's "low quality" really means "not at all". Maybe that's why it was > medium before?
I will file a new bug to keep track of the tests that have regressed after this change: fast/canvas/canvas-imageSmoothingEnabled.html fast/canvas/canvas-imageSmoothingQuality.html From my POV, and without looking into this issue yet, it makes sense to me to keep imageSmoothingQuality default value as 'Low' and try to solve this issue at Cairo level.
Diego Pino
Comment 15
2021-06-28 02:05:08 PDT
***
Bug 223301
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug