Skip to content

api: support engine options in run() - #17

Merged
hermet merged 1 commit into
mainfrom
hermet/enhance
Sep 30, 2026
Merged

hermet merged 1 commit into
mainfrom
hermet/enhance

Conversation

@hermet

@hermet hermet commented Sep 30, 2026

Copy link
Copy Markdown
Member

Add an EngineOption parameter defaulting to EngineOption::Default. Pass the option to canvas creation for each rendering engine and CPU fallback.

Add Doxygen references for API symbols and the engine option default.

  • This may introduce the ABI break

@hermet
hermet requested a balanced review from Copilot September 30, 2026 02:56
@hermet hermet self-assigned this Sep 30, 2026
@hermet hermet added API Update APIs documentation Improvements / Additions to documentation labels Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Non-WebGPU builds fail to compile, and the unchanged shared-library version exposes an ABI break.

Review effort: Balanced
Findings: 2 High severity

Open (2)
What changed in this PR

Adds configurable ThorVG engine options to toolkit application execution and canvas creation.

Changes:

  • Adds EngineOption to run().
  • Passes options to all rendering backends and CPU fallback.
  • Improves API documentation references.
File Description
inc/​thorvg_toolkit.h Extends and documents the public API.
src/​tvgToolkit.cpp Propagates engine options to windows.
src/​tvgWindow.h Updates backend constructor declarations.
src/​tvgWindow.cpp Passes options into canvas factories.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread inc/thorvg_toolkit.h Outdated
Comment thread src/tvgWindow.h
Add an EngineOption parameter defaulting to EngineOption::Default.
Pass the option to canvas creation for each rendering engine and
CPU fallback.

Add Doxygen references for API symbols and the engine option default.

* This may introduce the ABI break
@hermet
hermet merged commit f5dfa27 into main Sep 30, 2026
5 checks passed
@hermet
hermet deleted the hermet/enhance branch September 30, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Update APIs documentation Improvements / Additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants