Shipping the png
crate in Chromium
#562
anforowicz
started this conversation in
General
Replies: 2 comments 5 replies
-
I'm reporting a Chrome bug #391914245 which will cause our site to not be able to decode this apng. |
Beta Was this translation helpful? Give feedback.
5 replies
-
I just wanted to drop a quick note that we've expanded the field trials to 50% of M135/Beta. I've edited the top-level post accordingly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I really appreciate all the work that has been put into the
png
crate (andfdeflate
crate as well as the Rust toolchain and other Rust crates). As a way of saying "thank you", let me share the status (and excitement) of what is going on with shipping thepng
crate in Chromium.History of edits of this post:
We started Chrome Canary experiments in the 2nd half of December 2024, Chrome Dev experiments in the 2nd half of February 2025, and Chrome Beta experiments in the middle of March 2023. If all goes well, then I hope to go to Stable in April and then try shipping in M135.
Below are some additional details in the form of questions and answers. Let me know if you have any other questions.
Q: What Chrome versions participate in the experiments?
Depending on the experiment results on earlier channels, we plan to expand to M135 Stable during Q2 2025. For a tentative Chromium release schedule please see https://chromiumdash.appspot.com/schedule.
Q: How can I tell which experiment group I am in?
To find out which experiment group you are in, go to chrome://version and search for “977e3a5f” in the list of “Active Variations”:
Note that getting assigned to one of the experiment groups may depend on getting a new field trials “seed” and therefore may require rebooting a browser. Also note that your local ChromeVariations enterprise policy may limit which field trials you may participate in.
Q: Can I switch to a different experiment group?
You can't pick which experiment group you will be assigned to. Experiment group assignment happens randomly, and is “sticky” / “permanent” for the given Chrome client.
If you want to force Rust
png
on or off (e.g. to triage if the field trial may be responsible for a bug), then navigate to chrome://flags/#rusty-png and force the flag to be enabled or disabled. Note that this will exclude you from the A/B comparisons (i.e. you will be assigned to “ForcedOn_…” or “ForcedOff_…” group, rather than to the control or the experiment group).Q: What versions of the libraries are covered?
libpng
/zlib
-based decoders and encoders that normally ship in Chromiumblink::PNGImageDecoder
SkPngDecoder
(used mostly through//ui/gfx/codec/png_codec.h
API)SkPngEncoder
(used mostly through//ui/gfx/codec/png_codec.h
API)png
crateSkPngRustDecoder
andSkPngRustEncoder
png
version: 0.17.16;fdeflate
version: 0.3.7; see also Chromium’sCargo.lock
. Chromium carries local patches that corresponds to Add support for parsingeXIf
chunk. #568 and Treat most auxiliary chunk errors as benign. #569Q: Can you share performance results from the field trials?
Yes, I plan to share aggregate performance numbers. OTOH, I want to wait until we have results from the Stable channel, because:
Preliminary M135/Canary+Dev data shows decoding runtime improvement on Desktop, and a regression on Mobile/ARM. Encoding performance results are similarily mixed, but in the other direction. These 2 aspects should get a bit better in M136 thanks to http://review.skia.org/962878, https://crrev.com/c/6333255, and https://crrev.com/c/6354419.
Disclaimer: Let me also note various factors that may impact the performance results (and therefore explain if/why Chromium numbers may not match other measurements):
zlib
that uses SIMD for better performance (and therefore other results comparing acrosslibpng
and Rust PNG may not necessarily carry over to this A/B experiment in Chromium)libpng
orpng
crate are not used bySkPngDecoder
norSkPngRustDecoder
, because (unlikeblink::PNGImageDecoder
) Skia applies alpha premultiplication and color space transformations to <=256 pixels of the palette, rather than to N pixels of the image.Beta Was this translation helpful? Give feedback.
All reactions