Skip to content

feat(thorvg): update ThorVG to version 1.0.1#701

Merged
suda-morris merged 1 commit intoespressif:masterfrom
suda-morris:feat/thorvg_v1_0_1
Mar 16, 2026
Merged

feat(thorvg): update ThorVG to version 1.0.1#701
suda-morris merged 1 commit intoespressif:masterfrom
suda-morris:feat/thorvg_v1_0_1

Conversation

@suda-morris
Copy link
Collaborator

Summary

  • Upgrade espressif/thorvg wrapper component from ThorVG 0.15.16 to 1.0.1.
  • Update ThorVG git submodule to upstream v1.0.1 (6648d791972169d9cd22168f5bd11089bbec56c9).
  • Adapt ESP-IDF wrapper/build integration and thorvg_lottie example for ThorVG 1.0 API and runtime behavior.

What Changed

  • Version & metadata sync
    • Bumped component version in thorvg/idf_component.yml to 1.0.1.
    • Updated thorvg/sbom_thorvg.yml version/hash to match upstream v1.0.1.
  • Kconfig / loader options (breaking)
    • Removed THORVG_TVG_LOADER_SUPPORT from thorvg/Kconfig.
    • Removed tvg loader handling in thorvg/CMakeLists.txt to match ThorVG 1.x loader options.
  • Wrapper build system updates
    • Adjusted static library byproduct path for ThorVG 1.x (libthorvg-1.a).
    • Kept warning handling in wrapper side (no submodule source patching), including targeted suppression for header-related -Wignored-qualifiers.
    • Cleaned legacy Meson cross flags and retained only currently needed suppressions in thorvg/cross_file.txt.in.
  • Example migration to ThorVG 1.0 API
    • Updated C API usage in thorvg_example_main.c:
      • tvg_engine_init(0) / tvg_engine_term()
      • tvg_swcanvas_create(TVG_ENGINE_OPTION_DEFAULT)
      • tvg_canvas_add(...)
      • tvg_canvas_draw(canvas, false)
      • ThorVG handle type usage aligned with 1.x.
    • Added pthread dependency in example component CMake.
  • Runtime stability fix for ThorVG 1.x threading path
    • Moved rendering loop to a pthread-created render thread to avoid pthread_self assert seen when calling ThorVG from app_main.
    • Reworked frame-flush synchronization from task notification to a binary semaphore shared via render context.
    • Removed global wait-task state and used callback user_ctx context passing.

Breaking Changes

  • THORVG_TVG_LOADER_SUPPORT is removed (intentional for major-version upgrade).
  • ThorVG 1.x API adjustments required for existing example/user code.

@suda-morris suda-morris requested a review from Copilot March 11, 2026 09:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades the ThorVG wrapper/component and example to ThorVG v1.0.1, aligning build integration and the Lottie example with the ThorVG 1.x C API and runtime behavior.

Changes:

  • Updated ThorVG submodule + component/SBOM metadata to v1.0.1.
  • Adjusted wrapper build system (loader options, static lib byproduct path, warning handling).
  • Migrated thorvg_lottie example to ThorVG 1.x API and moved rendering into a pthread with semaphore-based flush synchronization.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
thorvg/thorvg Updates ThorVG git submodule commit to v1.0.1 revision.
thorvg/sbom_thorvg.yml Synces SBOM version/hash with the updated submodule.
thorvg/idf_component.yml Bumps component version and updates documentation link.
thorvg/examples/thorvg_lottie/sdkconfig.defaults.esp32s3 Updates ESP32-S3 example defaults (CPU freq / WDT-related settings changed).
thorvg/examples/thorvg_lottie/sdkconfig.defaults Adjusts example sdkconfig defaults (removes main task stack override).
thorvg/examples/thorvg_lottie/main/thorvg_example_main.c Migrates example to ThorVG 1.x API and adds pthread render loop + semaphore sync.
thorvg/examples/thorvg_lottie/main/CMakeLists.txt Adds pthread dependency for the example.
thorvg/cross_file.txt.in Updates Meson cross compile flags (removes some suppressions).
thorvg/Kconfig Removes TVG loader Kconfig option consistent with ThorVG 1.x loader handling.
thorvg/CMakeLists.txt Updates library path/byproduct and refactors loader options; adds warning suppression.
Comments suppressed due to low confidence (1)

thorvg/examples/thorvg_lottie/main/thorvg_example_main.c:1

  • The semaphore wait ordering allows a new esp_lcd_panel_draw_bitmap() to be started without first ensuring the previous transfer is complete in a couple of cases: (1) the initial 'background black' flush is issued without any semaphore gate, and (2) the last frame's draw_bitmap() isn't waited on before cleanup/return. This can overlap transfers across play_lottie() calls and/or reuse buffers while a transfer is still in progress. Consider gating every draw_bitmap() by taking the semaphore immediately before starting a transfer (and making the semaphore initially available), and also waiting once after the final draw_bitmap() before returning.
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@suda-morris suda-morris requested a review from mahavirj March 11, 2026 10:48
@suda-morris suda-morris merged commit 90d9238 into espressif:master Mar 16, 2026
88 of 89 checks passed
@suda-morris suda-morris deleted the feat/thorvg_v1_0_1 branch March 16, 2026 04:24
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.

2 participants