Skip to content

Conversation

@renovate
Copy link

@renovate renovate bot commented Mar 27, 2023

This PR contains the following updates:

Package Update Change
libpag major v1.0.0 -> v4.5.2

Release Notes

Tencent/libpag (libpag)

v4.5.2

Compare Source

主要修改内容
(1) 版本新增

  • Web 平台:新增支持多线程版本

(2) 接口变更

  • Android 和 iOS 平台: PAGLayer 新增设置和读取 alpha 的接口

(3) 性能优化
tgfx 升级至 2.1.1 版本,基础图形渲染(如 Rect)的性能相比之前提升 10 倍,文本渲染性能相比之前提升 20 倍

主要优化

  • 切换使用无锁队列,支持无上限队列任务调度
  • 增加文本图集渲染能力,以及 bounds 快速估算能力,提升文本渲染性能
  • 全面采用 SIMD 指令加速,实现更快的数学计算
  • 重构整个渲染链路,提前判断否可合并再创建最终渲染对象,避免大量对象频繁创建销毁的开销
  • 引入内存池优化技术,全链路的海量临时对象全部集中分配内存,减少堆内存分配的开销
  • 增加对 4K 等超大图片的自动降级缓存,减少内存占用

(4)包体优化

  • Web 平台:删除 ASYNCIFY 编译参数,包体相比之前减少 25%, 移除 Web Worker版本,使用原生的 pthread 多线程版本替代

(5)功能完善和稳定性提升

  • Web 平台:重构帧渲染逻辑实现异步处理视频解码
  • Web 平台:修复禁用 RTTI 后 PAGLayer 类型不正确的问题
  • Web 平台:修复 replaceImage 等接口调用报错的问题
  • Web 平台:修复 readPixels 返回为空的问题
  • 修复当所有图片图层都可编辑时 File::editableImages 为 nullptr 导致的缩放模式不正确的问题

Main modifications:
(1) Version Additions

  • Web Platform: Added support for a multi-threaded version.

(2) Interface Changes

  • Android and iOS Platforms: Added interfaces to set and read alpha values for PAGLayer.

(3) Performance Optimization
Upgraded tgfx to version 2.1.1, achieving significant performance improvements: 10x faster for basic graphics rendering (e.g., Rect) and 20x faster for text rendering.

Key Optimizations:

  • Switched to a lock-free queue, enabling unlimited task scheduling.
  • Added text atlas rendering and fast bounds estimation capabilities to improve text rendering performance.
  • Fully adopted SIMD instructions for faster mathematical computations.
  • Refactored the entire rendering pipeline to determine mergeability early, avoiding frequent creation and destruction of rendering objects.
  • Introduced memory pool optimization to centralize memory allocation for temporary objects, reducing heap memory overhead.
  • Automatic downgrade caching for ultra-large images (e.g., 4K) was added to reduce memory usage.

(4) Package Size Optimization

  • Web Platform: Removed ASYNCIFY compilation parameter, reducing package size by 25%. Replaced the Web Worker version with a native pthread multi-threaded version.

(5) Feature Improvements and Stability Enhancements

  • Web Platform: Refactored frame rendering logic to handle video decoding asynchronously.
  • Web Platform: Fixed incorrect PAGLayer type issue when RTTI is disabled.
  • Web Platform: Fixed errors when calling replaceImage and other interfaces.
  • Web Platform: Fixed the issue where readPixels returned empty results.
  • Fixed the incorrect scaling mode issue caused by File::editableImages being nullptr when all image layers are editable.

v4.4.35

Compare Source

主要修改内容:
(1) ffmpeg 升级至 7.0.2 版本,修复安全漏洞
(2) 支持 JPG 图片的 CMYK 色彩空间,并修复崩溃问题。
(3) 当图片未缩放时,使用 Nearest 纹理过滤选项避免出现渲染模糊。

Main modifications:
(1) Upgraded ffmpeg to version 7.0.2 to address security vulnerabilities
(2) Support CMYK color space for JPG images and fix the crash issues.
(3) Use Nearest as the texture filtering mode to avoid rendering blur when the image is not scaled.

v4.4.31

Compare Source

主要修改内容:
(1) 将文本背景的默认边距系数从 0.2f 增加到 0.4f。
(2) 修复微信小程序中在同一个canvas上多次加载pag文件导致canvas尺寸异常增大的问题

Main modifications:
(1) Increase the default margin factor for text backgrounds from 0.2f to 0.4f.
(2) Fixes an issue in WeChat Mini Programs where loading PAG files multiple times on the same canvas causes the canvas size to increase unexpectedly.

v4.4.29

Compare Source

主要修改内容:
(1)将鸿蒙平台中软件解码的最大送帧数量修改为 maxReorderSize + 1,修复解码异常。
(2)解码 PAG 文件时检查迭代过程中的异常,以防止内存溢出。
(3)修复在苹果平台上添加换行后部分文本无法显示的问题。
(4)修复 videoEnable 为 false 时运行 BMP 预合成素材 crash问题。

Main modifications:
(1)Modify the maximum number of software decoding frames to maxReorderSize + 1 on the HarmonyOS platform to fix decoding exceptions.
(2)Check for exceptions during iteration when decoding PAG files to prevent memory overflow.
(3)Fix the issue of partial text not displaying after adding line breaks on Apple platforms.
(4)Fix the issue of disabling videoEnable causes errors when running BMP precompositions.

v4.4.26

Compare Source

主要修改内容:
(1)修复鸿蒙平台解码释放异常问题,临时将最大送帧数量增加到 16.

Main modifications:
(1)Fix the HarmonyOS decoding error and temporarily increase the frame wait limit to 16.

v4.4.25

Compare Source

主要修改内容:
(1)鸿蒙平台 PAGViewController、PAGImageViewController、PAGPlayer、PAGSurface 增加 release,支持外部释放内存占用;
(2)修复鸿蒙平台内存泄漏,包含硬解、ArkTS 层对象释放;
(3)macOS 平台 autorelease 对象增加及时释放逻辑;
(4)修复 AE 中设置的图片伸缩模式没有应用问题;
(5)支持 Android 15 16KB 页面大小

Main modifications:
(1)Added release methods to PAGViewController, PAGImageViewController, PAGPlayer, and PAGSurface on the HarmonyOS platform to support external memory release.
(2)Memory leaks on the HarmonyOS platform were fixed, including hardware decoding and ArkTS object release.
(3)Add timely release logic for autorelease objects on the macOS platform.
(4)Fixed the issue where set image scaling mode in AE was not applied.
(5)Support Android 15 with a 16KB page size.

v4.4.20

Compare Source

主要修改内容:
(1)版本新增

  • 新增支持鸿蒙平台

已知问题:

  • 对于 PAGImageView, 由于鸿蒙系统问题, 直接使用NativeImage的内存进行 lz4 编解码会产生性能问题,从而导致画面卡顿严重,目前暂时使用 bitmap 的内存,相对于其他平台性能会稍差一些;由于鸿蒙版本无法直接设置 NativeImage 在 NativeWindow 中的 Matrix,相对于其它平台,在缓存后,PAGImageView 在鸿蒙系统中目前无法完全脱离 OpenGL 渲染环境
  • 由于鸿蒙系统的软硬解存在设计缺陷,如只支持异步解码方式、解码后数据需要 copy 否则会出现画面错乱,因此在内存占用和性能方面会弱于其它平台, 这会导致含有 BMP 预合成的素材渲染会有一定的性能问题

(2)接口变更

  • iOS 平台移除 PAGDecoder 和 PAGImageView 对于部分方法的入参限制

(3)性能优化

  • 通过延迟 emoji 的图片解码并实现并发解码优化 Emoji 的渲染性能
  • 通过缓存确定尺寸的 Typeface 来提升文本渲染的性能
  • 减少离屏渲染过程提升模糊滤镜的渲染性能
  • 通过缓存纹理减少绘制次数优化画面裁剪的绘制性能
  • 重构渲染流程以最大化开启 glScissor 来减少不必要的像素渲染

(4)稳定性提升

  • iOS 和 macOS 平台多 unicode 编码 emoji 渲染异常问题修复
  • 修复部分 pag 素材播放过程中内存不断增长问题

Main modifications:
(1)New supported platforms

  • Added support for the HarmonyOS platform

Known Issues:

  • For PAGImageView, due to issues with the HarmonyOS system, directly using NativeImage's memory for lz4 encoding/decoding will result in performance problems, causing severe stuttering. Currently, bitmap memory is temporarily used, which may perform slightly less than other platforms. Additionally, due to limitations in the HarmonyOS version, it is currently impossible to directly set the Matrix of NativeImage in NativeWindow. After caching, PAGImageView in the HarmonyOS system cannot completely detach from the OpenGL rendering environment.
  • Due to design flaws in the HarmonyOS system's software and hardware decoding, such as only supporting asynchronous decoding and requiring data copy after decoding to avoid image distortion, the memory usage and performance will be weaker than those of other platforms. This can lead to performance issues when rendering materials with BMP pre-composition.

(2)API Changes

  • Remove input parameter restrictions for certain methods in PAGDecoder and PAGImageView on the iOS platform.

(3)Performance Optimization

  • Improved rendering performance of emojis by implementing concurrent decoding and delayed decoding of emoji images.
  • Enhanced text rendering performance by caching sized typefaces.
  • Increased rendering performance of blur filters by reducing off-screen rendering.
  • Optimized rendering performance of image clipping by caching textures and reducing the number of draw calls.
  • Refactored the rendering pipeline to maximize the use of scissors and reduce unnecessary pixel rendering.

(4)Stability improvement

  • Fixed rendering issues with multiple Unicode-encoded emojis on the iOS and macOS platforms.
  • Resolved memory growth issues during the playback of certain PAG materials.

v4.4.15

Compare Source

主要修改内容:
(1)修复部分 pag 素材播放过程中内存不断增长问题;
(2)修复 iOS 平台 PAGView、PAGImageView 异步加载相同网络文件异常释放问题,增强线程安全性;
(3)修复部分场景 PAGImageView 缓存失败问题;
(4)完善鸿蒙版本,增强稳定性

Main revisions:
(1) Fixed the memory issue continuously increasing during the playback of certain PAG assets.
(2) Fixed the abnormal release issue of PAGView and PAGImageView when asynchronously loading the same network file on the iOS platform, and enhanced thread safety.
(3) Fixed the issue of cache failure for PAGImageView in certain scenarios.
(4) Improved the HarmonyOS version and enhanced stability.

v4.4.8

Compare Source

主要修改内容:
(1)鸿蒙版本完善:增加 PAGImageView,支持网络文件加载,完善鸿蒙硬件、软件解码

已知问题:

  • 对于 PAGImageView, 由于鸿蒙系统问题, 直接使用NativeImage的内存进行 lz4 编解码会产生性能问题,从而导致画面卡顿严重,目前暂时使用 bitmap 的内存,相对于其他平台性能会稍差一些;由于鸿蒙版本无法直接设置 NativeImage 在 NativeWindow 中的 Matrix,相对于其它平台,在缓存后,PAGImageView 在鸿蒙系统中目前无法完全脱离 OpenGL 渲染环境
  • 由于鸿蒙系统的软硬解存在设计缺陷,如只支持异步解码方式、解码后数据需要 copy 否则会出现画面错乱,因此在内存占用和性能方面会弱于其它平台, 这会导致含有 BMP 预合成的素材渲染会有一定的性能问题

(2)iOS 平台移除 PAGDecoder 和 PAGImageView 对于部分方法的入参限制
(3)修改部分 pag 文件渲染异常问题

Main revisions:
(1) Improvements for HarmonyOS version: adding PAGImageView, supporting network file loading, enhancing HarmonyOS hardware and software decoding.

Known issues:

  • For PAGImageView, due to issues with the HarmonyOS system, directly using NativeImage's memory for lz4 encoding/decoding will result in performance problems, causing severe stuttering. Currently, bitmap memory is temporarily used, which may perform slightly less than other platforms. Additionally, due to limitations in the HarmonyOS version, it is currently impossible to directly set the Matrix of NativeImage in NativeWindow. After caching, PAGImageView in the HarmonyOS system cannot completely detach from the OpenGL rendering environment.
  • Due to design flaws in the software and hardware decoding of the HarmonyOS system, such as only supporting asynchronous decoding and requiring data copy after decoding to avoid image distortion, the memory usage and performance will be weaker than other platforms. This can lead to performance issues when rendering materials with BMP pre-composition.

(2) Removing input parameter restrictions for certain methods in PAGDecoder and PAGImageView on the iOS platform.
(3) Fixing rendering anomalies in some pag files.

v4.4.1

Compare Source

主要修改内容:
(1)修复使用 Freetype 渲染矢量 Path 时产生的内存访问越界问题。(#​2224)
(2)修复 strlen() 相关调用产生的堆栈溢出安全问题。(#​2232)
(3)重构渲染流程以最大化开启 glScissor 来减少不必要的像素渲染。 (#​2141)
(4)简化矢量图形缓存机制,使用 TGFX 内置的 Path 缓存替代原先的 Shape 缓存。 (#​2158)
(5)修改 PAGImageView 的一些接口,允许回调函数里的 PAGFile 传入空值。(#​2191)
(6)通过缓存纹理而不是 Surface 来减少绘制次数,从而优化画面裁剪的绘制性能。(#​2206)
(7)全局减少一次不必要的离屏渲染过程实现模糊滤镜的渲染性能提升。(#​2098)
(8)在 Font 类上缓存确定尺寸的 Typeface 来提升文本渲染的性能。 (#​2132)
(9)通过延迟 emoji 的图片解码过程实现并发解码,优化了 Emoji 的渲染性能。(#​176)
(10)新增了对鸿蒙 Next 平台的首个版本适配。 (#​2408)

Main revisions:
(1)Fix the out-of-bounds memory access crash when rendering paths with freetype. (#​2224)
(2)Fix the heap-buffer-overflow issue by adding boundary check for the strlen() call. (#​2232)
(3)Optimize performance by enabling glScissor whenever possible. (#​2141)
(4)Replace tgfx::Shape with the built-in cache mechanism of the Path class. (#​2158)
(5)Modify some interfaces of PAGImageView to allow PAGFile to be nullable. (#​2191)
(6)Optimize clip performance by caching a texture instead of a surface to reduce draw calls. (#​2206)
(7)Optimize the performance of blur filters by skipping one unnecessary offscreen rendering pass. (#​2098)
(8)Improve text rendering performance by caching typeface size in the Font class. (#​2132)
(9)Optimze color emoji drawing performance by deferring glyph image decoding. (#​176)
(10)Add support for the ‘HarmonyOS Next’ platform. (#​2408)

v4.3.71

Compare Source

主要修改内容:
(1)支持 Android 15 16KB 页面大小

Main modifications:
(1)Support Android 15 with a 16KB page size.

v4.3.68

Compare Source

主要修改内容:
(1)修复 iOS 平台 PAGView、PAGImageView 异步加载相同网络文件异常释放问题,增强线程安全性;
(2)修复部分场景 PAGImageView 缓存失败问题;
(3)修复Android 平台图片解码色差和闪退问题

Main modifications:
(1)Fixed the issue of abnormal release on the iOS platform for PAGView and PAGImageView when asynchronously loading the same network file, enhancing thread safety.
(2)Fixed the issue of cache failure in certain scenarios for PAGImageView.
(3)Fixed the issues of color deviation and crashes in image decoding on the Android platform.

v4.3.62

Compare Source

主要修改内容:
(1)修复三星手机使用PAGImageView可能会白屏的问题 (#​2362)

Main revisions:
(1)Fix the issue of blank rendering in PAGImageView on certain Samsung models (such as Galaxy S23 FE). (#​2362)

v4.3.57

Compare Source

主要修改内容:
(1)修复了多个 PAGView 实例加载同一个 pag 文件时内存越界的问题。
(2)修复了 iOS 平台渲染某些 pag 文件时内存泄漏的问题。
(3)修复了 iOS 和 Android 平台上从 PAGImageLayer 获取的 contentDuration 值不一致的问题。
(4)修复了堆缓冲区溢出问题。
(5)修复了由于解码错误或损坏的 pag 文件导致的崩溃。

Main revisions:
(1)Fixed a memory out-of-bounds issue when multiple PAGView instances load the same PAG file.
(2)Fixed a memory leak issue in rendering certain pag files on the iOS platform.
(3)Fixed the inconsistency in contentDuration values obtained from PAGImageLayer on iOS and Android platforms.
(4)Fixed a heap buffer overflow issue.
(5)Fixed crashes caused by decoding errors or corrupted pag files.

v4.3.51

Compare Source

主要修改内容:
(1)修复形状缓存异常问题;
(2)修复 iOS 平台 PAGImageView 中使用 setPathAsync 时渲染失败的问题;
(3)修改 iOS 平台 PAGImageView init 初始化渲染异常问题;
(4)修改 Android 平台带 Mask 的文本渲染 crash 问题

Main revisions:
(1)Fixed the issue with shape cache abnormalities.
(2)Fixed the rendering failure issue in PAGImageView on the iOS platform when using setPathAsync.
(3)Modified the initialization rendering issue in PAGImageView on the iOS platform.
(4)Fixed the crash issue with text rendering with masks on the Android platform.

v4.3.47

Compare Source

主要修改内容:
(1)稳定性提升

  • 修复 GPU 资源异步线程释放可能导致的 crash
  • 修复 App 退出时 TaskGroup::exit() 引起的 ANR

(2)性能优化

  • 延迟所有矢量图形的光栅化过程,最大限度并发执行优化矢量渲染性能

Main revisions:
(1)Stability improvement

  • Fix potential crashes when releasing GPU resources in multiple threads.
  • Fix the ANR caused by TaskGroup::exit() when the app is exiting

(2)Performance optimization

  • Optimize performance by deferring the rasterization of paths and executing them concurrently.

v4.3.45

Compare Source

主要修改内容:
(1)修复 iOS 平台 PAGImageView 部分场景无法显示内容或闪屏的问题
(2)修复 iOS 平台 PAGView 子线程使用可能导致的 crash 问题
(3)修复移动端 PAGView 设置 sync 时可能出现的死锁问题

Main revisions:
(1)Fixed the issue that PAGImageView on the iOS platform could not display content or had screen flickering in some scenarios.
(2)Fixed the potential crash issue when using PAGView on a sub-thread on the iOS platform.
(3)Fixed the potential deadlock issue when setting 'sync' on PAGView on mobile platforms.

v4.3.43

Compare Source

主要修改内容:
(1)新增支持

  • Android 平台增加 x86_64 架构,增加车机系统的架构支持

(2)包体优化

  • 相对于 4.3.33 版本,Web 平台减少 zip 后大小 65 KB(wasm), iOS 减少 zip 后大小 50 KB(arm64)

(3)稳定性提升

  • 修复移动端 PAGView 切换文件播放且循环次数重新设置无法播放问题
  • web 平台 BMP 预合成素材 seek 播放异常修复
  • 修复微信小程序 createCanvas2D 错误

Main revisions:
(1)New capabilities

  • Added x86_64 architecture for the Android platform, which could be used in the vehicle system.

(2)Size optimization

  • In comparison to version 4.3.33, the library's zipped size has been decreased by 65 KB (wasm) on the web platform and 50 KB (arm64) on the iOS platform.

(3)Stability improvement

  • Fixed an issue that PAGView on mobile devices couldn't play when switching files and resetting loop count.
  • Fixed seek playback issue with BMP pre-composited assets on the web platform.
  • Fixed an error with createCanvas2D in the WeChat Mini Program.

v4.3.33

Compare Source

主要修改内容:
(1)AE 特性新增支持

  • 图层样式-描边
  • 图层样式-外发光

(2)能力新增

  • 支持加载网络路径的 pag 文件
  • pag 文件中的 BMP 预合成支持渲染缓存至本地,进一步提升渲染性能
  • pag 文件导出的时候支持设置可编辑图层, 终端支持通过 getEditableIndices 获取到可编辑图层

(3)版本新增

  • 社区版新增发布 macOS 版本,支持通过 cocoapods、Carthage、Swift Package Manager 接入
  • iOS 平台新增支持 Carthage、Swift Package Manager 接入

(4)稳定性提升

  • 升级 WebP 修复漏洞 CVE-2023-4863
  • 修复 iOS 平台 XCFramework 本地直接引用时模拟器报错

Main revisions:

(1) New AE features

  • Layer Style - Stroke
  • Layer Style - Outer Glow

(2) New capabilities

  • Support loading pag file from network paths.
  • BMP compositions in PAG files now has the option to enable disk cache, which further improves rendering performance.
  • Artists now can specify editable layers in PAGExporter directly. The SDK also can get the editable layers by getEditableIndices() API.

(3) New versions

  • The community version adds the macOS version, which supports access through Cocoapods, Carthage, and Swift Package Manager.
  • iOS platform adds support for Carthage and Swift Package Manager.

(4) Stability improvement

  • Upgrade WebP to fix vulnerability CVE-2023-4863.
  • Fix the problem that iOS platform XCFramework reports an error when referencing locally in the simulator.

v4.3.3

Compare Source

主要修改内容:
(1)版本新增

  • 社区版新增发布 macOS 版本,支持通过 cocoapods、Carthage、Swift Package Manager 接入
  • iOS 平台新增支持 Carthage、Swift Package Manager 接入

(2)AE 特性新增支持

  • 图层样式-描边
  • 图层样式-外发光

(3)新增能力

  • 支持加载网络路径的 pag 文件
  • pag 文件中的 BMP 预合成支持渲染缓存至本地,进一步提升渲染性能
  • pag 文件导出的时候支持设置可编辑图层, 终端支持通过 getEditableIndices 获取到可编辑图层

(4)问题修复

  • 修复 iOS 平台 XCFramework 单独引用时模拟器报错

Main revisions:
(1) New versions

  • The Community Edition has newly released a macOS version, which supports access through cocoapods, Carthage, and Swift Package Manager
  • IOS platform adds support for Carthage and Swift Package Manager access

(2) Added support for AE features

  • Layer Style - Stroke
  • Layer Style - Outer Glow

(3)New capabilities

  • Support for loading PAG files from network paths
  • The BMP compositions in the PAG file supports rendering to the local cache, further improving rendering performance
  • The PAG file supports setting editable layers when exporting, and the terminal supports getting editable layers through getEditableIndices

(4) Issue fixes

  • Fix the error reported by the simulator when XCFramework is referenced separately on the iOS platform

v4.2.100

Compare Source

主要修改内容:
(1)Android 平台问题修复

  • 修复多线程操作时 PAGImageView 渲染 crash
  • 修复 PAGImageView 重置资源渲染异常
  • 修复 PAGViewListener 监听多线程 crash
  • 修复 PAGView JNI 方法加载 crash

(2)iOS 平台问题修复

  • 修复 iOS 平台同时集成百度地图 SDK 时 crash 问题
  • 修复 iOS 平台 XCFramework 运行模拟器 crash 问题

(3)macOS 平台

  • 修复 macOS 平台内存泄漏问题

Main revisions:
(1)The fixes of Android platform issues

  • Fix PAGImageView rendering crash during multi-threaded operation
  • Fix PAGImageView reset resource rendering exception
  • Fix PAGViewListener listening multi-thread crash
  • Fix PAGView JNI method loading crash

(2)The fixes of iOS platform issues

  • Fix the crash issues when the iOS platform integrates Baidu Map SDK at the same time
  • Fix the crash issues of XCFramework running simulator on iOS platform

(3) macOS platform

  • Fix memory leak issue on macOS platform

v4.2.88

Compare Source

主要修改内容:
(1)Android 平台问题修复

  • 修复 Android 5 和 Android 6 系统 onAnimationEnd 无法接收回调问题;
  • 修复 Android 平台频繁调用 play 方法渲染异常问题
  • 修复 SDK 混淆问题
  • 修复部分场景 java.util.ConcurrentModificationException crash
  • 完善 PAGImageView 及 PAGView,修复部分场景渲染异常问题
  • 修复 CallObjectMethod crash
  • 增加导出 C++ 层 pag 相关符号,修复 C++ API 无法使用问题

(2)iOS 平台问题修复

  • 修复进入后台 PAGImageView 某些情况下画面不显示的问题

(3)微信小程序

  • 增加对没有Unicode属性转义环境的支持

Main revisions:
(1)The fixes of Android platform issues

  • Fix the issue of onAnimationEnd not being able to receive callbacks in Android 5 and Android 6 systems;
  • Fix the abnormal rendering issue of frequently calling the play method on the Android platform
  • Fix SDK obfuscation issue
  • Fix java.util.ConcurrentModificationException crash in some scenarios
  • Improve PAGImageView and PAGView, fix abnormal rendering issue of some scenarios
  • Fix CallObjectMethod crash
  • Add the export of C++ layer PAG related symbols, and fix the problem that the C++ API cannot be used

(2)The fixes of iOS platform issues

  • Fix the problem that the screen does not display in some cases when entering the background PAGImageView

(3)WeChat mini program

  • Add support for escaping environments without Unicode properties

v4.2.80

Compare Source

主要修改内容:
(1)PAGImageView 中磁盘缓存下沉至 C++ 层
(2)Web 和 QT 平台上新增支持创建离屏 PAGSurface
(3)Web 平台问题修复:

  • 修复 Safari 16.4 以下版本缺少全局变量 OffscreenCanvas 导致的类型检查错误
  • 添加 isInstanceOf 方法来替换 instanceOf,防止 Web 平台未定义的全局类的问题
  • 在内置的 iOS 16.4 AppleWebKit 浏览器中为 OffscreenCanvas 添加回退
  • 修复 WebMask 纹理类型上传错误导致微信闪退
  • 更新 Safari 15 的 ImageBitmap 兼容性检查
  • Fix globalThis compatibility issue for older browsers, e.g. iOS 12.1 Safari
  • 修复 Safari 和 iOS 微信浏览器的用户代理检测

(4)iOS 平台问题修复

  • 修复 PAGImageView 通过路径加载渲染异常
  • 修复 PAGImageView 替换占位图渲染时 crash 问题
  • 修复 PAGImageView 在 iOS 14 之前无法渲染问题
  • 修复 repeatcount 设置为非无限循环播放,播放过程中进入后台后出现的无法再出触发 play 问题
  • 修复 PAGImageView 频繁调用 play 方法导致的卡在某一帧的的问题

(5)Android 平台问题修复

  • 修复 PAGImageView 渲染播放异常问题

Main revisions:
(1)The disk cache in PAGImageView sinks to the C++ layer
(2)Added support for creating off-screen PAGSurface on the Web and QT platforms
(3)The fixes of Web platform issues:

  • Fix the type checking error caused by the missing of global variable OffscreenCanvas in versions below Safari 16.4
  • Add isInstanceOf method to replace instanceOf to prevent problems with undefined global classes on the web platform
  • Add fallback for OffscreenCanvas in built-in iOS 16.4 AppleWebKit browser
  • Fix the error in uploading WebMask texture type that causes WeChat to crash
  • Updated ImageBitmap compatibility check for Safari 15
  • Fix globalThis compatibility issue for older browsers, e.g. iOS 12.1 Safari
  • Fix user agent detection for Safari and iOS WeChat browsers

(4)The fixes of iOS platform issues

  • Fix PAGImageView loading rendering exception through path
  • Fix the crash issue when PAGImageView replaces placeholder image rendering
  • Fix the issue that PAGImageView cannot render before iOS 14
  • Fixed the issue where repeatcount is set to non-infinite loop playback and the play cannot be triggered after entering the background during playback.
  • Fix the issue of PAGImageView getting stuck in a certain frame due to frequent calls to the play method.

(5)The fixes of Android platform issues

  • Fix the abnormal problem of PAGImageView rendering and playback

v4.2.55

Compare Source

主要修改内容:
(1)AE 特性新增支持

  • 3D 图层 (3D Layer)
  • 色相/饱和度(Hue/Saturation)
  • 亮度和对比度(Brightness & Contrast)

(2)接口新增

  • 新增 PAGImageView 类:针对 UI 场景设计的专用播放组件,基于图片解码器+磁盘缓存模式,能够避免 OpenGL 跟 UI 视图桥接的额外开销,大幅降低内存和 CPU 占用
  • 新增 PAGDecoder 类:支持通过 PAGFile 或 组合的 PAGComposition 创建,将 PAG 当做标准图片解码器使用,快捷获取某一帧的渲染内容
  • PAGSurface 类:新增 copyPixelsTo 接口,支持将 PAGSurface 渲染的像素内容拷贝至业务方给定的内存地址

(3)能力新增

  • 占位图替换视频,视频文件可以像普通图片一样一键替换到指定的占位图上,快速实现视频模板能力
  • 导出视频文件,替换占位图或修改文本之后的 PAG 动效可以快速导出成视频文件
  • 音频播放,内置音频播放能力,包含 PAG 素材自带的音频以及用户替换的视频包含的音频轨道
  • 素材加密播放,支持通过桌面 PAGViewer 工具加密后的 PAG 素材进行授权播放

(4)桌面端配套工具

  • macOS 平台导出插件和桌面预览工具全面支持苹果 M1 芯片架构
  • 桌面端预览工具支持素材加密以及批量添加水印的能力

(5)能力优化

  • 文本渲染支持含有多个 unicode 的 emoji 表情 (Android 端需要使用带 harfbuzz 后缀的版本)
  • DisplacementMap 现已支持所有图层类型,不限制用于 BMP 预合成图层
  • PAGView 首帧播放渲染优化,避免出现首帧跳帧的情况
  • 优化存在多个图层交错引用同一个 BMP 预合成情况下的播放卡顿问题

(6)问题修复:

  • iOS 平台前后台切换偶现 crash 修复
  • PAGImageView 反馈问题修复

Main revisions:
(1)New support for AE features

  • 3D Layer
  • Hue/Saturation
  • Brightness & Contrast

(2)New interface added

  • Added PAGImageView class: a dedicated playback component designed for UI scenarios. Based on the image decoder + disk cache mode, it can avoid the additional overhead of bridging OpenGL and UI views, and significantly reduce memory and CPU usage.
  • Added PAGDecoder class: it supports creation through PAGFile or PAGComposition combined, using PAG as a standard image decoder to quickly obtain the rendering content of a certain frame
  • PAGSurface class: added copyPixelsTo interface to support copying the pixel content rendered by PAGSurface to the memory address given by the business party

(3)New capabilities

  • Placeholder image replaces video. The video file can be replaced on the specified placeholder image with one click just like an ordinary image, quickly realizing the video template capability.
  • Export video files. The PAG animation after replacing the placeholder image or modifying the text can be quickly exported into a video file.
  • Audio playback. The built-in audio playback capability includes the audio that comes with the PAG material and the audio track contained in the user-replaced video
  • Encrypted material playback capability. It supports authorized playback of PAG materials encrypted through the desktop PAGViewer tool

(4) Desktop supporting tools

  • macOS platform export plug-in and desktop preview tool fully support Apple M1 chip architecture
  • The desktop preview tool supports material encryption and the ability to add watermarks in batches

(5) Capability optimization

  • Text rendering supports emoji expressions containing multiple unicodes (Android needs to use the version with harfbuzz suffix)
  • DisplacementMap now supports all layer types and is not restricted to BMP composition layers
  • PAGView first frame playback rendering optimization to avoid frame skipping in the first frame
  • Optimize the playback lag problem when multiple layers interleave and reference the same BMP composition.

(6) Problem fix:

  • Fix for occasional crashes when switching between front and back on the iOS platform
  • Fix the PAGImageView feedback issues

v4.2.20

Compare Source

主要修改内容:
(1)修复 Android 平台部分场景 PAGImageView 使用 crash 问题;
(2)修复企业版视频连续导出 crash 问题

Main revisions:
(1)Fix the crash issue when using PAGImageView in some scenarios on the Android platform;
(2)Fix the issue of continuous export crash of the Enterprise Edition videos

v4.2.17

Compare Source

主要修改内容:
(1)版本新增

  • Android 端新增 harfbuzz 版本(带 -harfbuzz 后缀),用于支持多字节 emoji 表情的显示。
  • 新增企业版 SDK(带 -enterprise 后缀),包含音频播放、素材加密,占位图一键替换视频,导出视频文件等高阶功能。

(2)AE 特性:

  • 色相/饱和度(Hue/Saturation)
  • 亮度和对比度(Brightness & Contrast)
  • 3D 图层 (3D Layer)

(3)接口新增:

  • 新增 PAGImageView 类:针对 UI 场景设计的专用播放组件,基于图片解码器+磁盘缓存模式,能够避免 OpenGL 跟 UI 视图桥接的额外开销,大幅降低内存和 CPU 占用。
  • 新增 PAGDecoder 类:支持通过 PAGFile 或 组合的 PAGComposition 创建,将 PAG 当做标准图片解码器使用,快捷获取某一帧的渲染内容。
  • PAGSurface 类:新增 copyPixelsTo 接口,支持将 PAGSurface 渲染的像素内容拷贝至业务方给定的内存地址。

(4)能力优化:

  • 文本渲染支持含有多个 unicode 的 emoji 表情 (Android 侧需要使用 harfbuzz 版本)。
  • DisplacementMap 现已支持所有图层类型,不限制用于 BMP 预合成图层。
  • PAGView 播放首帧渲染优化,避免出现首帧跳帧播放。
  • 优化存在多个图层交错引用同一个 BMP 预合成情况下的播放卡顿问题。

Main revisions:
(1)New version

  • A new harfbuzz version (with -harfbuzz suffix) is added to Android to support the display of multi-byte emoji expressions.
  • A new enterprise version SDK (with -enterprise suffix) is added, including audio playback, material encryption, one-click replacement of video with placeholder image, export of video files and other advanced functions.

(2)AE features:

  • Hue/Saturation
  • Brightness & Contrast
  • 3D Layer

(3) New interface:

  • Added PAGImageView class: a dedicated playback component designed for UI scenes. Based on the image decoder + disk cache mode, it can avoid the additional overhead of bridging OpenGL and UI views, and significantly reduce memory and CPU usage.
  • Added PAGDecoder class: supports creation through PAGFile or PAGComposition combined, using PAG as a standard image decoder to quickly obtain the rendering content of a certain frame.
  • PAGSurface class: Added copyPixelsTo interface to support copying the pixel content rendered by PAGSurface to the memory address given by the business party.

(4) Capability optimization:

  • Text rendering supports emoji expressions containing multiple unicodes (the Android side requires the harfbuzz version).
  • DisplacementMap now supports all layer types and is not restricted to BMP precomposed layers.
  • The rendering of the first frame of PAGView playback is optimized to avoid skipping the first frame of playback.
  • Optimize the playback lag issue when multiple layers interleave reference to the same BMP pre-synthesis.

v4.1.49

Compare Source

主要修改内容:
(1)修复 PAGView makeSnapShot 接口部分 pag 文件获取异常问题;
(2)修复 Android 平台部分机型 ffavc 加载失败情况;
(3)修复 Android 平台部分场景 PAGView addListener crash 问题

Main revisions:
(1)Fix the abnormal issue in obtaining some pag files in the PAGView makeSnapShot interface;
(2)Fix the loading failure of ffavc on some models of the Android platform;
(3)Fix PAGView addListener crash issue in some scenarios on Android platform

v4.1.43

Compare Source

主要修改内容:
(1)Android 平台当 Animator 时长伸缩关闭后,新增调用 PAGView play 方法直接触发 onAnimationEnd 回调
(2)Android 平台 PAGView 中 removeUpdateListener 操作更换位置,避免出现内存泄漏
(3)修复 iOS 平台的内存泄漏问题
(4)iOS 平台 PAGView 中 listener 的相关处理确保线程安全,避免出现 crash
(5)修复 Web 平台 FeatureMask 渲染异常问题
(6)Web 平台 onAnimationStart 触发完善

Main modifications:
(1)On the Android platform, after the Animator duration scaling is closed, the PAGView play method is newly called to directly trigger the onAnimationEnd callback.
(2) The removeUpdateListener operation in PAGView on the Android platform changes the position to avoid memory leaks.
(3) Fix memory leak problem on iOS platform
(4)Related processing of listener in PAGView on iOS platform ensures thread safety and avoids crashes
(5)Fix the abnormal rendering problem of FeatureMask on the Web platform
(6) Web platform onAnimationStart trigger improvement

v4.1.41

Compare Source

主要修改内容:
(1)PAGView 渲染优化,确保首帧渲染,避免出现初始播放跳帧问题;
(2)修复 Android 平台 vivo V1901A 渲染异常问题;
(3)修复 Android 平台内存不足时文件解码失败引起的 crash;
(4)修复 Android 平台内存不足时线程创建 crash 问题

Main revisions:
(1)PAGView rendering optimization ensures the rendering of the first frame and avoids the problem of frame skipping during initial playback;
(2)Fix the abnormal rendering problem of vivo V1901A on Android platform;
(3) Fix the crash caused by file decoding failure when the Android platform has insufficient memory;
(4)Fix the thread creation crash problem when the Android platform has insufficient memory

v4.1.29

Compare Source

4.1 正式版本发布,相对于 PAG 4.0 版本,主要修改内容:
(1)平台支持: 新增支持微信小程序(完整版本)
(2)AE 特性新增支持:

  • 图层样式-渐变叠加、蒙版羽化和不透明度、亮度轨道遮罩/亮度轨道反转遮罩
  • 文本路径选项:路径、反转路径、垂直于路径、强制对齐、首字边距、末字边距

(3)API 更新:

  • PAGText API 层面增加支持 leading 和 tracking 修改;
  • PAGView 增加 makeSnapshot 接口,支持在 PAGView 层面获取单帧渲染数据

(4)性能优化:“图层样式-投影” 使用新的模糊算法,相比之前,性能提升约 30%
(5)制品库变更:

  • iOS 端移除 avmv7 架构支持
  • 从 4.1 版本开始,版本号位数由之前的 4 位修改为 3 位

(6)问题修复

  • 修复文本渲染模糊问题
  • 修复 Android 平台外部字体注册获取失败 crash 问题;
  • 修复 Android 平台 ManagerFragment 获取失败引起的 crash 问题
  • 修复 Android 平台部分特效场景使用 crash 问题
  • 修复内存申请失败引起的 pag 文件解码 crash 问题
  • 修复 Android 平台 glBufferData 使用过程中的 OOM 问题

The official version 4.1 is released. Compared with the PAG 4.0 version, the main revisions are:
(1)Platform support: Added support for WeChat Mini Program (full version)
(2)New support for AE features:

  • Layer Styles - Gradient Overlay, Mask Feather and Opacity, Brightness Track Mask/Brightness Track Reverse Mask
  • Text path options: Path, Reverse Path, Perpendicular to Path, Forced Alignment, First Margin, Last Margin

(3)API update:

  • PAGText API level adds support for leading and tracking modifications;
  • PAGView adds a makeSnapshot interface to support obtaining single-frame rendering data at the PAGView level.

(4)Performance optimization: "Layer Style - Projection" uses a new blur algorithm, which improves performance by about 30% compared to before.
(5) Prebuilt library changes:

  • Remove avmv7 architecture support on iOS
  • Starting from version 4.1, the number of digits in the version number has been changed from the previous 4 digits to 3 digits.

(6) Issue fixes

  • Fix text rendering blur issue
  • Fix the crash issue of failed external font registration and acquisition on Android platform;
  • Fix the crash issue caused by failure to obtain ManagerFragment on Android platform
  • Fix the crash issue when using some special effects scenarios on the Android platform
  • Fix pag file decoding crash caused by memory application failure
  • Fix the OOM issue during the use of glBufferData on the Android platform

v4.1.12

Compare Source

主要修改内容:
(1)修复文本渲染模糊问题;
(2) Web 平台 BMP 预合成分辨率大于 4K 时关闭变速功能;
(3)修复 Android 平台外部字体注册获取失败 crash 问题;
(4)修复 Android 平台内存不足线程创建失败 crash 问题;
(5)修复 Android 平台 ManagerFragment 获取失败引起的 crash 问题

Main revisions:
(1) Fix text rendering blur problem;
(2)Turn off the variable speed function when the Web platform BMP composition resolution is greater than 4K;
(3)Fix the crash issue of failed registration and acquisition of external fonts on the Android platform;
(4)Fix the crash issue of thread creation failure due to insufficient memory on the Android platform;
(5)Fix the crash issue caused by failure to obtain ManagerFragment on Android platform


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 61b7920 to faa0c58 Compare April 12, 2023 14:47
@renovate renovate bot force-pushed the renovate/libpag-4.x branch 2 times, most recently from b1dfefc to c885c1f Compare May 12, 2023 07:11
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from c885c1f to 1f2c3f6 Compare May 30, 2023 05:03
@renovate renovate bot force-pushed the renovate/libpag-4.x branch 2 times, most recently from 03a9dc7 to 72ccf9a Compare July 14, 2023 08:04
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 72ccf9a to 183e2db Compare November 13, 2023 11:14
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 183e2db to ed36b10 Compare December 22, 2023 12:09
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from ed36b10 to 29a895b Compare January 2, 2024 03:42
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 29a895b to a8bc48b Compare January 17, 2024 07:35
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from a8bc48b to a1d6d93 Compare March 25, 2024 04:28
@renovate renovate bot force-pushed the renovate/libpag-4.x branch 2 times, most recently from 296b61a to 950c8f5 Compare May 16, 2024 08:39
@renovate renovate bot force-pushed the renovate/libpag-4.x branch 2 times, most recently from c692368 to 7974942 Compare August 14, 2024 08:49
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 7974942 to 5a8383b Compare September 20, 2024 08:05
@renovate renovate bot force-pushed the renovate/libpag-4.x branch 2 times, most recently from 7eea4da to d802d5c Compare November 14, 2024 09:11
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from d802d5c to 9e0adff Compare December 24, 2024 10:51
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 9e0adff to 08086f7 Compare February 21, 2025 19:48
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 08086f7 to f793748 Compare March 22, 2025 05:25
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from f793748 to c6c42f9 Compare April 30, 2025 06:10
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from c6c42f9 to 6633da7 Compare May 16, 2025 12:34
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from 6633da7 to c332d9e Compare July 18, 2025 10:09
@renovate renovate bot force-pushed the renovate/libpag-4.x branch from c332d9e to 44deec6 Compare September 29, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant