| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Define a factory class for creating BMP decoder instances
based on RustyBMP feature flag, so if it is enabled it uses
SkBmpRustDecoder, otherwise it keeps using BMPImageDecoder.As expected, this change is increasing binary size as we are starting to link the image crate used for Rust BMP decoder. The increase is in line with what we saw in our evaluation during ATL review (it was ~20kB so actual number is even a bit lower)
https://chromium-review.googlesource.com/c/chromium/src/+/7215854
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM with some questions/comments below.
Define a factory class for creating BMP decoder instances
based on RustyBMP feature flag, so if it is enabled it uses
SkBmpRustDecoder, otherwise it keeps using BMPImageDecoder.As expected, this change is increasing binary size as we are starting to link the image crate used for Rust BMP decoder. The increase is in line with what we saw in our evaluation during ATL review (it was ~20kB so actual number is even a bit lower)
https://chromium-review.googlesource.com/c/chromium/src/+/7215854
Ack - nice!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM after addressing the feedback related to component build
COMPONENT_EXPORT(BMP_FEATURES) BASE_DECLARE_FEATURE(kRustyBmpFeature);Thank you for trying to resolve this - you are really close, but I think that you want to reuse the scaffolding that already exists for this component. Here you probably want to:
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
COMPONENT_EXPORT(BMP_FEATURES) BASE_DECLARE_FEATURE(kRustyBmpFeature);Thank you for trying to resolve this - you are really close, but I think that you want to reuse the scaffolding that already exists for this component. Here you probably want to:
- `#include "third_party/blink/renderer/platform/platform_export.h"`
- Use `PLATFORM_EXPORT` instead of `COMPONENT_EXPORT(...)`
- Remove `defines = [ "IS_BMP_FEATURES_IMPL" ]` from `third_party/blink/renderer/platform/image-decoders/BUILD.gn`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
COMPONENT_EXPORT(BMP_FEATURES) BASE_DECLARE_FEATURE(kRustyBmpFeature);Sergio Gonzalez MartinThank you for trying to resolve this - you are really close, but I think that you want to reuse the scaffolding that already exists for this component. Here you probably want to:
- `#include "third_party/blink/renderer/platform/platform_export.h"`
- Use `PLATFORM_EXPORT` instead of `COMPONENT_EXPORT(...)`
- Remove `defines = [ "IS_BMP_FEATURES_IMPL" ]` from `third_party/blink/renderer/platform/image-decoders/BUILD.gn`
Done
It seems that with PLATFORM_EXPORT we don't get it exported for windows debug getting thus a build failure due to linking error:
```
[49/4174] LINK blink_platform_unittests.exe blink_platform_unittests.exe.pdb
..\..\third_party\llvm-build\Release+Asserts\bin\lld-link.exe /OUT:./blink_platform_unittests.exe /nologo -libpath:../../third_party/llvm-build/Release+Asserts/lib/clang/22/lib/windows /winsysroot:../../third_party/depot_tools/win_toolchain/vs_files/e4305f407e /MACHINE:X86 /PDB:./blink_platform_unittests.exe.pdb @./blink_platform_unittests.exe.rsp
lld-link: error: undefined symbol: struct base::Feature const blink::kRustyBmpFeature
>>> referenced by obj/third_party/blink/renderer/platform/image-decoders/unit_tests/bmp_image_decoder_test.obj:(public: __thiscall blink::`anonymous namespace'::BMPImageDecoderTest::BMPImageDecoderTest(void))
>>> referenced by obj/third_party/blink/renderer/platform/image-decoders/unit_tests/bmp_image_decoder_test.obj:(public: __thiscall blink::`anonymous namespace'::BMPImageDecoderTest::BMPImageDecoderTest(void))
```
I think the issue is that both image_decoders component and it's unit tests are built with config `//third_party/blink/renderer/platform:blink_platform_implementation` which causes dll import is not defined in unit test.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |