skip runtime registration on iOS

These encoders and decoders are not built and linked
in Google3 iOS builds.  We just need to hack a bit to
get DM to build there... we never run it.

Change-Id: I6cdfbb6df3c4fe30096b2715cad004bccec0bcaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214002
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
Mike Klein 2019-05-15 12:49:07 -05:00 committed by Skia Commit-Bot
parent 8ae07c319d
commit 017126fe1d

View File

@ -1392,6 +1392,9 @@ int main(int argc, char** argv) {
#endif #endif
CommandLineFlags::Parse(argc, argv); CommandLineFlags::Parse(argc, argv);
// TODO(mtklein): remove after fixing weird iOS configuration in Google3.
#if !defined(SK_BUILD_FOR_IOS)
SkCodec::Register( SkIcoCodec::IsIco , SkIcoCodec::MakeFromStream); SkCodec::Register( SkIcoCodec::IsIco , SkIcoCodec::MakeFromStream);
SkCodec::Register(SkJpegCodec::IsJpeg, SkJpegCodec::MakeFromStream); SkCodec::Register(SkJpegCodec::IsJpeg, SkJpegCodec::MakeFromStream);
SkCodec::Register( SkPngCodec::IsPng , SkPngCodec::MakeFromStream); SkCodec::Register( SkPngCodec::IsPng , SkPngCodec::MakeFromStream);
@ -1401,6 +1404,7 @@ int main(int argc, char** argv) {
SkRegisterEncoder(SkEncodedImageFormat::kPNG , SkPngEncoder::Encode); SkRegisterEncoder(SkEncodedImageFormat::kPNG , SkPngEncoder::Encode);
SkRegisterEncoder(SkEncodedImageFormat::kWEBP, SkWebpEncoder::Encode); SkRegisterEncoder(SkEncodedImageFormat::kWEBP, SkWebpEncoder::Encode);
#endif
initializeEventTracingForTools(); initializeEventTracingForTools();
#if !defined(SK_BUILD_FOR_GOOGLE3) && defined(SK_BUILD_FOR_IOS) #if !defined(SK_BUILD_FOR_GOOGLE3) && defined(SK_BUILD_FOR_IOS)