From c602abdbae16e8a8b76d45f9d7057403a301e01f Mon Sep 17 00:00:00 2001 From: K Lubick Date: Wed, 27 Mar 2024 17:15:35 -0400 Subject: [PATCH] Fix skunicode BUILD.gn rules (#51708) As a result of https://skia-review.googlesource.com/c/skia/+/831801, the way SkUnicode needs to be compiled has slightly changed. This also rolls Skia to pick up those changes. https://skia.googlesource.com/skia.git/+log/5ed91aaa4cff..b6160ffc0b96 2024-03-27 [kjlubick@google.com](mailto:kjlubick@google.com) Break up Bidi based on ICU or ICU subset into classes to avoid #define 2024-03-27 [double1kai@gmail.com](mailto:double1kai@gmail.com) Add vector support for LoongArch in SkBitmapProcState_opts.h ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat --------- Co-authored-by: skia-flutter-autoroll --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 14 +++++++++++--- skia/modules/skunicode/BUILD.gn | 11 +++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/DEPS b/DEPS index 716be502132ae..9749cfc65353e 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ vars = { 'flutter_git': 'https://flutter.googlesource.com', 'skia_git': 'https://skia.googlesource.com', 'llvm_git': 'https://llvm.googlesource.com', - 'skia_revision': '5ed91aaa4cff2cf9f1c366fe6420933cfad47fb0', + 'skia_revision': 'b6160ffc0b96908e27e6526a00313155fd76bc69', # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3b29dbd7f7796..95ee697941b2c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 89d0f5cefe0ab8bb5115fed60092705a +Signature: e6c0797d1b9015dde7fab6ef78a27c0e ==================================================================================================== LIBRARY: etc1 @@ -8618,7 +8618,6 @@ ORIGIN: ../../../flutter/third_party/skia/modules/skshaper/src/SkShaper_skunicod ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_icu4x.cpp + ../../../flutter/third_party/skia/LICENSE -ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/codec/SkExif.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/codec/SkJpegMultiPicture.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/codec/SkJpegMultiPicture.h + ../../../flutter/third_party/skia/LICENSE @@ -8667,7 +8666,6 @@ FILE: ../../../flutter/third_party/skia/modules/skshaper/src/SkShaper_skunicode. FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.cpp FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_hardcoded.h FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_icu4x.cpp -FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h FILE: ../../../flutter/third_party/skia/src/codec/SkExif.cpp FILE: ../../../flutter/third_party/skia/src/codec/SkJpegMultiPicture.cpp FILE: ../../../flutter/third_party/skia/src/codec/SkJpegMultiPicture.h @@ -8811,6 +8809,7 @@ ORIGIN: ../../../flutter/third_party/skia/modules/bentleyottmann/src/Myers.cpp + ORIGIN: ../../../flutter/third_party/skia/modules/bentleyottmann/src/Point.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/modules/bentleyottmann/src/Segment.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/modules/bentleyottmann/src/SweepLine.cpp + ../../../flutter/third_party/skia/LICENSE +ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/base/SkBezierCurves.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/base/SkCubics.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/base/SkCubics.h + ../../../flutter/third_party/skia/LICENSE @@ -9102,6 +9101,7 @@ FILE: ../../../flutter/third_party/skia/modules/bentleyottmann/src/Myers.cpp FILE: ../../../flutter/third_party/skia/modules/bentleyottmann/src/Point.cpp FILE: ../../../flutter/third_party/skia/modules/bentleyottmann/src/Segment.cpp FILE: ../../../flutter/third_party/skia/modules/bentleyottmann/src/SweepLine.cpp +FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkUnicode_icu_bidi.h FILE: ../../../flutter/third_party/skia/src/base/SkBezierCurves.h FILE: ../../../flutter/third_party/skia/src/base/SkCubics.cpp FILE: ../../../flutter/third_party/skia/src/base/SkCubics.h @@ -9521,6 +9521,10 @@ ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_cl ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_icu.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_icu4x.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_libgrapheme.h + ../../../flutter/third_party/skia/LICENSE +ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_full.cpp + ../../../flutter/third_party/skia/LICENSE +ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_full.h + ../../../flutter/third_party/skia/LICENSE +ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_subset.cpp + ../../../flutter/third_party/skia/LICENSE +ORIGIN: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_subset.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/core/SkKnownRuntimeEffects.cpp + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/core/SkKnownRuntimeEffects.h + ../../../flutter/third_party/skia/LICENSE ORIGIN: ../../../flutter/third_party/skia/src/gpu/SwizzlePriv.h + ../../../flutter/third_party/skia/LICENSE @@ -9550,6 +9554,10 @@ FILE: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_clie FILE: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_icu.h FILE: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_icu4x.h FILE: ../../../flutter/third_party/skia/modules/skunicode/include/SkUnicode_libgrapheme.h +FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_full.cpp +FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_full.h +FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_subset.cpp +FILE: ../../../flutter/third_party/skia/modules/skunicode/src/SkBidiFactory_icu_subset.h FILE: ../../../flutter/third_party/skia/src/core/SkKnownRuntimeEffects.cpp FILE: ../../../flutter/third_party/skia/src/core/SkKnownRuntimeEffects.h FILE: ../../../flutter/third_party/skia/src/gpu/SwizzlePriv.h diff --git a/skia/modules/skunicode/BUILD.gn b/skia/modules/skunicode/BUILD.gn index bb4b7680ea2fa..8cb8013f1971f 100644 --- a/skia/modules/skunicode/BUILD.gn +++ b/skia/modules/skunicode/BUILD.gn @@ -40,6 +40,7 @@ if (skia_use_icu || skia_use_client_icu || skia_use_libgrapheme) { if (skia_use_icu) { sources += skia_unicode_icu_sources + sources += skia_unicode_bidi_full_sources defines += [ "SK_UNICODE_ICU_IMPLEMENTATION" ] # only available for Android at the moment @@ -52,20 +53,18 @@ if (skia_use_icu || skia_use_client_icu || skia_use_libgrapheme) { } configs += [ "$_skia_root/third_party/icu/config:no_cxx" ] } + if (skia_use_client_icu || skia_use_libgrapheme) { + sources += skia_unicode_bidi_subset_sources + deps += [ skia_icu_bidi_third_party_dir ] + } if (skia_use_client_icu) { sources += skia_unicode_client_icu_sources defines += [ "SK_UNICODE_CLIENT_IMPLEMENTATION" ] - if (!skia_use_icu) { - deps += [ skia_icu_bidi_third_party_dir ] - } } if (skia_use_libgrapheme) { sources += skia_unicode_libgrapheme_sources defines += [ "SK_UNICODE_LIBGRAPHEME_IMPLEMENTATION" ] deps += [ skia_libgrapheme_third_party_dir ] - if (!skia_use_icu) { - deps += [ skia_icu_bidi_third_party_dir ] - } } } } else {