Repository navigation
feat(share): integrate native Rust rendering runtime - #679
Open
YinCheng0106 wants to merge 3 commits into
Open
YinCheng0106 wants to merge 3 commits into
YinCheng0106 wants to merge 3 commits into
Conversation
New(zh-Hant): 加入地震報告橫式分享圖的原生渲染基礎 New(en-US): Add native rendering support for landscape earthquake report images Platform: all
|
🔍 OpenCodeReview found 6 issue(s) in this PR.
📄
|
Codecov Report❌ Patch coverage is ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4 tasks done
Platform: all Fix(zh-Hant): 區分分享圖卡原生函式庫缺失與不相容,並拒絕空白的原生輸出緩衝區 Fix(en-US): Distinguish missing and incompatible native share-card libraries and reject empty native output buffers
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這個 PR 做了什麼
ReportPicture服務。在建立 renderer 前檢查 ABI 1.2 與 v2/16:9 能力。將原始 UTF-8 交給 Rust 驗證和渲染,回傳 Dart 持有的 PNG 或結構化錯誤。dispose()等待已接受的請求完成後釋放 handle。DynamicLibrary.process()查找。Android APK 封裝 arm64-v8a 與 x86_64 的libeq_report_pic.so,沿用 DPIP 的 ABI 篩選。相關 issue
b135d02bd1ba5103cd3d116a951b1b63a710a312。main獨立建置。#674 是直式分享卡的相關工作。怎麼驗
tool/run.sh通過端到端、缺庫回傳unavailable和一般 DPIP 啟動。未簽署的裝置 Release 及模擬器 Debug 封裝各保留九個匯出。RunnerTests 421 項通過。unsupportedAbi。原生探針確認 3 個 PNG 緩衝區與 2 個 renderer 都已釋放。Debug/Release APK 的兩種 ABI 均通過九個符號、ELF 對齊及zipalign -P 16檢查。一般 DPIP Release 已啟動。0x11F,成功解碼為 1920×1080。相同輸入的 PNG 共 195,390 bytes,SHA-256 為d1a2080c35193928026c05e8aef2eb6fe4ce28c24a9a8bf0fd4b2b0f3c4cae5d。驗證連續請求、無效 JSON/版本、失敗後重試、釋放後解碼與重新開啟。tool/check.sh通過。Flutter 分析無問題,3,837 項測試通過、11 項跳過。 Android lint 通過。Android JVM 測試以 2 GiB 的本機測試 heap 重跑,620 項通過。已知限制
審查後補驗
修正具名動態庫開啟後缺少原生符號時的分類。缺少 ABI 回
unsupportedAbi;載入失敗,以及 iOS process 沒有連結選用 renderer 時回unavailable。原生回傳成功但未提供有效 PNG 緩衝區時會回結構化錯誤。tool/dev/test_report_picture.sh通過 18 項。涵蓋 ABI 與能力旗標、符號、Dart 持有 PNG 的副本、複製失敗時以原指標及長度釋放、佇列復原與 dispose。ABI 替身由 C 編譯,可在選用的 QA 工作執行。一般 Flutter CI 維持原有建置方式。同一固定離線 fixture 在 iOS 27.2 arm64 模擬器及 Android API 37、16 KiB arm64 模擬器均通過。ABI 1.2、能力
0x11f、九個符號。淺色與深色皆解碼為 1920×1080,同主題兩端 PNG 逐位元組一致。SHA-256 分別為d1a2080c35193928026c05e8aef2eb6fe4ce28c24a9a8bf0fd4b2b0f3c4cae5d與9a87342fc68a1dfc854634a817d5096a2b7bed2c82f65a078f91316dcf3d2153。開發專用入口會記錄 fixture SHA、ABI、能力、尺寸、兩種主題的輸出路徑。操作步驟見 Native report-image renderer。維持既有 Rust 來源與 NDK 版本。兩平台使用的既有產物和字型均通過 SHA-256 清單驗證。
本機
tool/check.sh通過,Flutter 全套 3,840 項通過、18 項跳過,其中 7 項 ABI 替身須另跑。iOS RunnerTests 421 項、Android Instrumented 6 項通過。iOS 以未連結 Rust 的建置重跑,確認open=unavailable。檢查清單
tool/check/commits.sh origin/main..HEAD通過。