| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
media::GpuVideoAcceleratorFactories::SupportedDrop media:: on this new function -- it should be dropped in the whole file if you want to do that while you're here.
for (const auto& supported : *supported_decoder_configs_) {```
return std::ranges::any_of(supported_config, [&](const auto& c) {
return supported.Matches(c);
}) ? kTrue : kFalse
```
If you want.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
media::GpuVideoAcceleratorFactories::SupportedDrop media:: on this new function -- it should be dropped in the whole file if you want to do that while you're here.
Should dropping media:: from the file be done in this CL or a different one?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
media::GpuVideoAcceleratorFactories::SupportedAmbareesh BalajiDrop media:: on this new function -- it should be dropped in the whole file if you want to do that while you're here.
Should dropping media:: from the file be done in this CL or a different one?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Ambareesh BalajiDrop media:: on this new function -- it should be dropped in the whole file if you want to do that while you're here.
Dale CurtisShould dropping media:: from the file be done in this CL or a different one?
Either is fine.
Done
for (const auto& supported : *supported_decoder_configs_) {```
return std::ranges::any_of(supported_config, [&](const auto& c) {
return supported.Matches(c);
}) ? kTrue : kFalse
```If you want.
| 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 |
GpuVideoAcceleratorFactories::Supported IsDecoderConfigSupported(TINY NIT: This could be a `std::optional<bool>` instead, if ever this was reused in a context that didn't care about the `GpuVideoAcceleratorFactories::Supported` type. Since there is one use, I won't hold up the review for this.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
GpuVideoAcceleratorFactories::Supported IsDecoderConfigSupported(TINY NIT: This could be a `std::optional<bool>` instead, if ever this was reused in a context that didn't care about the `GpuVideoAcceleratorFactories::Supported` type. Since there is one use, I won't hold up the review for this.
There's some debate on if `std::optional<bool>` is an improvement in readability over an enum. E.g., https://abseil.io/tips/141 -- so definitely something to do in a followup to see if replacing this enum is reasonable.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
GpuVideoAcceleratorFactories::Supported IsDecoderConfigSupported(Dale CurtisTINY NIT: This could be a `std::optional<bool>` instead, if ever this was reused in a context that didn't care about the `GpuVideoAcceleratorFactories::Supported` type. Since there is one use, I won't hold up the review for this.
There's some debate on if `std::optional<bool>` is an improvement in readability over an enum. E.g., https://abseil.io/tips/141 -- so definitely something to do in a followup to see if replacing this enum is reasonable.
BTW there is already a TODO to have this turned into a non-optional `bool` in the parent class of `MojoGpuVideoAcceleratorFactories`: https://source.chromium.org/chromium/chromium/src/+/main:media/video/gpu_video_accelerator_factories.h;l=107
I think in a separate CL this can be turned into a `bool` after all the call sites preemptively check for the case that results in `kUnknown`.
| 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. |
Is this good to submit now?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Dale CurtisIs this good to submit now?
Yup!
| 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. |
Optimize IsDecoderConfigSupported for frequent calls
Currently, each call to IsDecoderConfigSupported copies
|supported_decoder_configs_| from MojoCodecFactory, hence move the check
inside to avoid copies.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |