Helmut JanuschkaI would also highly recommend breaking this into a couple CLs.
Like -- you can land a CL that just adds the flags and various enum values for JXL, while not actually adding the codec right now, cause that stuff is mostly mechanical.
Then a second CL could add the codec decoder itself (which would need more scrutiny). And also, if there is any build breakage, the revert would be less painful.
thanks, did it now, feel free to tell me if the split you had in mind was different!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
#if BUILDFLAG(ENABLE_JXL_DECODER) && BUILDFLAG(ENABLE_AV1_DECODER)
return "image/jxl,image/avif,image/webp,image/apng,image/svg+xml,image/*,*/"
"*;q=0.8";
#elif BUILDFLAG(ENABLE_JXL_DECODER)
return "image/jxl,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8";What if the feature is disabled? We should probably not include jxl, no? That does mean we need runtime checks here in addition to the build-time checks, unfortunately, but think they're needed. We probably also need unit test - admittedly, not very exciting ones. Fine to just hard code these strings there as well.
| Code-Review | +1 |
histogram_name = "Renderer4.ImageDecodeTaskDurationUs.Jxl";bots are all green now, please let me know if you want me to address anything!
histogram_name = "Renderer4.ImageDecodeTaskDurationUs.Jxl";Done
#if BUILDFLAG(ENABLE_JXL_DECODER) && BUILDFLAG(ENABLE_AV1_DECODER)
return "image/jxl,image/avif,image/webp,image/apng,image/svg+xml,image/*,*/"
"*;q=0.8";
#elif BUILDFLAG(ENABLE_JXL_DECODER)
return "image/jxl,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8";What if the feature is disabled? We should probably not include jxl, no? That does mean we need runtime checks here in addition to the build-time checks, unfortunately, but think they're needed. We probably also need unit test - admittedly, not very exciting ones. Fine to just hard code these strings there as well.
Done. Added runtime checks for `features::kJXLImageFormat` in both `ImageAcceptHeader()` and `FrameAcceptHeaderValue()`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Still LGTM
../../web_tests/images/resources/5_frames_numbered.jxlShould keep the list sorted. You can use `build/ios/update_bundle_filelist.py` to update this file.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Should keep the list sorted. You can use `build/ios/update_bundle_filelist.py` to update this file.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Isn't `chrome-metrics-team+submitter@` just a bot? Maybe you should add `chromium-metrics-reviews@` instead to review the histogram part.
There is a bug that bots are showing up in "Suggest Owners": crbug.com/344912772
From analysis/uma/chrome-metrics.gwsq:
Histograms should by default be reviewed by the owners of the subdirectories. The chromium-met...@google.com gwsq should be used when there are no individual owners, or for escalation to the Metrics team.
If you are interested in becoming a metrics reviewer, please review the instructions at https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#Becoming-a-Metrics-Reviewer
Reviewer source(s):
mpea...@chromium.org is from context(analysis/uma/chrome-metrics.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[metrics reviewer]
kJXL = 8,Please don't reuse the existing (deprecated) enum value. We have some users running older versions of Chrome that are still reporting the existing value. Please add a new value (9) for the non-removed implementation of JXL.
Please don't reuse the existing (deprecated) enum value. We have some users running older versions of Chrome that are still reporting the existing value. Please add a new value (9) for the non-removed implementation of JXL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Wire up JXL decoder.
Integrates JXLImageDecoder and enables the feature:
- MIME type registration (image/jxl) in net/ and blink/
- Accept header updates for image requests
- cc::ImageType::kJXL enum value
- chrome://flags UI for enable-jxl-image-format
- Signature sniffing for JXL magic bytes
- Metrics reporting
Gated behind enable_jxl_decoder build flag (enabled by default).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
return "image/jxl";Should this also be gated behind the feature flag?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
return "image/jxl";Should this also be gated behind the feature flag?
"name": "enable-keyboard-rewriter-fix",Helmut: The addition of enable-keyboard-rewriter-fix seems like a merge error. Please double check.
{"image/jxl", "jxl"},Nit: Move this line after the "image/jpeg" line, in alphabetical order?
if (type == "jxl") {Should this be guarded by the feature flag?
} else if (type == "jxl") {Should this be guarded by the feature flag?
@w...@google.com - thanks, follow up https://chromium-review.googlesource.com/c/chromium/src/+/7458407 hopefully the last follow up 😐
"name": "enable-keyboard-rewriter-fix",Helmut: The addition of enable-keyboard-rewriter-fix seems like a merge error. Please double check.
😐 sorry, done
{"image/jxl", "jxl"},Nit: Move this line after the "image/jpeg" line, in alphabetical order?
Done
if (type == "jxl") {Should this be guarded by the feature flag?
yes
} else if (type == "jxl") {Should this be guarded by the feature flag?
use_counter->CountWebDXFeature(WebDXFeature::kJpegxl);Helmut: Just curious: what's the difference between `CountUse()` and `CountWebDXFeature()`? The comments for these two methods are exactly the same:
```
class UseCounter : public GarbageCollectedMixin {
public:
...
// Counts a use of the given feature. Repeated calls are ignored.
virtual void CountUse(mojom::WebFeature feature) = 0;
...
// Counts a use of the given feature. Repeated calls are ignored.
virtual void CountWebDXFeature(WebDXFeature feature) = 0;
};
```
Is `CountWebDXFeature()` preferred in new code?
use_counter->CountWebDXFeature(WebDXFeature::kJpegxl);Helmut: Just curious: what's the difference between `CountUse()` and `CountWebDXFeature()`? The comments for these two methods are exactly the same:
```
class UseCounter : public GarbageCollectedMixin {
public:
...// Counts a use of the given feature. Repeated calls are ignored.
virtual void CountUse(mojom::WebFeature feature) = 0;...// Counts a use of the given feature. Repeated calls are ignored.
virtual void CountWebDXFeature(WebDXFeature feature) = 0;
};
```Is `CountWebDXFeature()` preferred in new code?
hope i am right, still new here, it was suggested during a earlier feedback round, to go with DX 😊
`CountUse()` internal metrics recorded to `Blink.UseCounter.Features` histogram. These are Chromium-specific and not shared externally.
`CountWebDXFeature()` Cross-vendor metrics aligned with the https://github.com/web-platform-dx/web-features repository. this can be seen here: https://webstatus.dev/features/jpegxl
use_counter->CountWebDXFeature(WebDXFeature::kJpegxl);Helmut JanuschkaHelmut: Just curious: what's the difference between `CountUse()` and `CountWebDXFeature()`? The comments for these two methods are exactly the same:
```
class UseCounter : public GarbageCollectedMixin {
public:
...// Counts a use of the given feature. Repeated calls are ignored.
virtual void CountUse(mojom::WebFeature feature) = 0;...// Counts a use of the given feature. Repeated calls are ignored.
virtual void CountWebDXFeature(WebDXFeature feature) = 0;
};
```Is `CountWebDXFeature()` preferred in new code?
hope i am right, still new here, it was suggested during a earlier feedback round, to go with DX 😊
`CountUse()` internal metrics recorded to `Blink.UseCounter.Features` histogram. These are Chromium-specific and not shared externally.
`CountWebDXFeature()` Cross-vendor metrics aligned with the https://github.com/web-platform-dx/web-features repository. this can be seen here: https://webstatus.dev/features/jpegxl
Just to add: both are shared externally, in https://chromestatus.com/metrics/feature/popularity and https://chromestatus.com/metrics/webfeature/popularity respectively.
http://crrev.com/c/5560554 mapped some existing use counters into WebDXFeature counters.