Web-Facing Change PSA: Support ImageSmoothingQuality in PaintCanvas

109 views
Skip to first unread message

Chromestatus

unread,
Jan 6, 2025, 2:01:28 PM (3 days ago) Jan 6
to blin...@chromium.org, fs...@chromium.org, yi...@chromium.org

Contact emails

yi...@chromium.org, fs...@chromium.org

Specification

https://drafts.css-houdini.org/css-paint-api-1/#paintrenderingcontext2d

Summary

Add support for the imageSmoothingQuality attribute on Paint Canvas. It allows a web developer to choose the quality/performance tradeoff when scaling images. There are 3 options in total for imageSmoothingQuality: low, medium and high. Chrome platform status entry for its launch on Canvas 2D: https://chromestatus.com/feature/4717415682277376



Blink component

Blink>CSS

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

Ergonomics

N/A



Activation

N/A



Security

N/A



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

N/A



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

No

Flag name on about://flags

CanvasImageSmoothing

Finch feature name

None

Non-finch justification

The Canvas 2D, Offscreen Canvas and Paint Canvas all share the same implementation for ImageSmoothingQuality property. This features has launched on Canvas 2D and Offscreen canvas for more than 8 years now. So the implementation has been well tested in stable.



Requires code in //chrome?

False

Measurement

N/A

Sample links


https://jsfiddle.net/khru0mzj

Estimated milestones

Shipping on desktop 133
Shipping on Android 133
Shipping on WebView 133


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4666019443113984?gate=6594684464660480

This intent message was generated by Chrome Platform Status.

Noam Rosenthal

unread,
Jan 6, 2025, 3:38:11 PM (3 days ago) Jan 6
to Chromestatus, blin...@chromium.org, fs...@chromium.org, yi...@chromium.org
On Mon, Jan 6, 2025 at 7:01 PM Chromestatus <ad...@cr-status.appspotmail.com> wrote:

Summary

Add support for the imageSmoothingQuality attribute on Paint Canvas. It allows a web developer to choose the quality/performance tradeoff when scaling images. There are 3 options in total for imageSmoothingQuality: low, medium and high. Chrome platform status entry for its launch on Canvas 2D: https://chromestatus.com/feature/4717415682277376


Is this feature fully tested by web-platform-tests?

No

So houdini features don't go through I2S and don't come with web platform tests? Do they go through some other special process and have their own tests somewhere? 

Mike Taylor

unread,
Jan 6, 2025, 4:44:37 PM (3 days ago) Jan 6
to fs...@chromium.org, blin...@chromium.org, yi...@chromium.org, Noam Rosenthal

It seems like perhaps the wrong feature type was selected, this should really be an Intent to Ship. Fernando, do you mind re-sending?

Yi Xu

unread,
Jan 7, 2025, 1:21:15 PM (2 days ago) Jan 7
to Mike Taylor, fs...@chromium.org, blin...@chromium.org, Noam Rosenthal
The ImageSmoothingQuality feature for Canvas 2D was launched in 2015, M54 (Chrome Status Link, original I2S). This feature was supposed to launch on Paint Canvas as well (Spec, precisely, the line "PaintRenderingContext2D includes CanvasImageSmoothing;"). However, we forgot to remove the flag in Paint Canvas when ImageSmoothingQuality was shipped. So this feature has been well used and tested in Canvas Rendering Context 2D in the past 9 years. That's why we set it as a "Web-Facing Change PSA".

For tests: yes, Houtini features currently don't have to have web platform tests. 

Yi Xu

Chris Harrelson

unread,
Jan 7, 2025, 1:27:52 PM (2 days ago) Jan 7
to Yi Xu, Mike Taylor, fs...@chromium.org, blin...@chromium.org, Noam Rosenthal
Hi Yi,

On Tue, Jan 7, 2025 at 10:21 AM Yi Xu <yi...@chromium.org> wrote:
The ImageSmoothingQuality feature for Canvas 2D was launched in 2015, M54 (Chrome Status Link, original I2S). This feature was supposed to launch on Paint Canvas as well (Spec, precisely, the line "PaintRenderingContext2D includes CanvasImageSmoothing;"). However, we forgot to remove the flag in Paint Canvas when ImageSmoothingQuality was shipped. So this feature has been well used and tested in Canvas Rendering Context 2D in the past 9 years. That's why we set it as a "Web-Facing Change PSA".

For tests: yes, Houtini features currently don't have to have web platform tests. 

Why would that be? All such features follow the regular Blink intent-to-ship process, which requires a spec and WPT tests, even if other browser vendors don't have a positive stance on the feature (in those cases the WPT tests can be marked .tentative).
 

Yi Xu

On Mon, Jan 6, 2025 at 4:44 PM Mike Taylor <mike...@chromium.org> wrote:

On 1/6/25 3:37 PM, Noam Rosenthal wrote:

On Mon, Jan 6, 2025 at 7:01 PM Chromestatus <ad...@cr-status.appspotmail.com> wrote:

Summary

Add support for the imageSmoothingQuality attribute on Paint Canvas. It allows a web developer to choose the quality/performance tradeoff when scaling images. There are 3 options in total for imageSmoothingQuality: low, medium and high. Chrome platform status entry for its launch on Canvas 2D: https://chromestatus.com/feature/4717415682277376


Is this feature fully tested by web-platform-tests?

No

So houdini features don't go through I2S and don't come with web platform tests? Do they go through some other special process and have their own tests somewhere?

It seems like perhaps the wrong feature type was selected, this should really be an Intent to Ship. Fernando, do you mind re-sending?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAC3hXJf%2BqmD7oikZC4qM7d4HXguzXg0pR0OocAgG65ueey295g%40mail.gmail.com.

Yi Xu

unread,
Jan 8, 2025, 7:32:15 PM (yesterday) Jan 8
to Chris Harrelson, Mike Taylor, fs...@chromium.org, blin...@chromium.org, Noam Rosenthal
We have some tests that implicitly test for it, example: https://github.com/web-platform-tests/wpt/blob/master/css/css-paint-api/paint2d-image.https.html. I added a few more tests on PaintCanvas to ensure that it always returns the same results as Canvas 2D in this cl.

Yi Xu

Reply all
Reply to author
Forward
0 new messages