-
Notifications
You must be signed in to change notification settings - Fork 0
Hardware Buffer対応 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
5aa8489
b22a1bf
a7cf17e
532ff8a
ef78ba8
824ed9c
dbee1dd
63e4f0b
bb619ee
2ee82f1
93a8b38
c712826
4974385
a7fe677
3227f53
b9e7361
efc42b3
34540e0
4ce90c6
07b949f
ac65468
a4ede21
c38b965
970bd6b
37d6b9e
2cddfd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,4 +44,4 @@ include_directories(${CPU_FEATURES_DIR}) | |
| add_library(cpufeatures STATIC "${CPU_FEATURES_DIR}/cpu-features.c") | ||
|
|
||
| target_link_options(avif_android PRIVATE "-Wl,-z,max-page-size=16384") | ||
| target_link_libraries(avif_android jnigraphics avif log cpufeatures) | ||
| target_link_libraries(avif_android jnigraphics nativewindow avif log cpufeatures) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
古い Android バージョンとの後方互換性を維持するために、 |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HardwareBufferクラスは Android API 26 (Android 8.0) で導入されました。AvifDecoderのメソッドシグネチャ(decodeToHardwareBuffer、nextFrameHardwareBufferなど)にHardwareBufferを含めると、Android API < 26 のデバイスでクラスの検証(verification)に失敗し、VerifyErrorまたはNoClassDefFoundErrorが発生します。これにより、古いデバイスでは通常のBitmapデコード機能を含め、AvifDecoderクラス自体のロードが完全に不可能になります。この問題を回避するために、すべての
HardwareBuffer関連のメソッドを、API >= 29 でのみロードされる別のヘルパークラス(例:AvifHardwareDecoderまたは遅延ロードされるインナークラス)に移動することを推奨します。これにより、古いデバイスでもAvifDecoderを安全にロードして使用できるようになります。