Verified
Status Update
Comments
lu...@google.com <lu...@google.com> #2
When working on Flutter-side changes, my initial plan was to replicate the Chromium-side changes (applying them to flutter/Skia/BUILD.gn
's optional("png_decode")
target:
- Add
public += skia_codec_public
- Add
sources += skia_codec_shared
- Add
sources += skia_codec_png
This failed with errors like:
ld.lld: error: duplicate symbol: SkCodecs::Register(SkCodecs::Decoder)
>>> defined at SkCodec.cpp:135 (out/host_debug_unopt/../../flutter/third_party/skia/src/codec/SkCodec.cpp:135)
>>> obj/flutter/third_party/skia/src/codec/skia.SkCodec.o:(SkCodecs::Register(SkCodecs::Decoder))
>>> defined at SkCodec.cpp:135 (out/host_debug_unopt/../../flutter/third_party/skia/src/codec/SkCodec.cpp:135)
>>> obj/flutter/third_party/skia/src/codec/png_decode.SkCodec.o:(.text+0x90)
So, I dropped the sources += skia_codec_shared
part - this fixed the linking error above.
And I also decided to drop public += skia_codec_public
, because 1) it doesn't seem necessary (OTOH I am not sure how to do equivalent of gn check
in Flutter) and 2) it covers more than just PNG-related public headers.
lu...@google.com <lu...@google.com> #3
lu...@google.com <lu...@google.com> #4
Well, I would mark this bug as fixed if I could. But I guess I don't have full access to issues.skia.org. Maybe I should just use crbug.com for this project...
Description
SkPngCodec.cpp
(already existing, Chromium and Flutter know about this file) andSkPngCodecBase.cpp
(new, need to teach Chromium, Flutter, and other clients about this file).The plan to do that is as follows:
gn/codec.gni
to exposeskia_codec_png
listThe above will unblock addinghttp://review.skia.org/893460
SkPngCodecBase.cpp
in