Skip to content

Skia Canvas plugin for hardware-accelerated 2D rendering in SWT#3231

Open
DenisUngemach wants to merge 4 commits intoeclipse-platform:masterfrom
swt-initiative31:skia_canvas
Open

Skia Canvas plugin for hardware-accelerated 2D rendering in SWT#3231
DenisUngemach wants to merge 4 commits intoeclipse-platform:masterfrom
swt-initiative31:skia_canvas

Conversation

@DenisUngemach
Copy link
Copy Markdown
Contributor

Skia Canvas plugin for hardware-accelerated 2D rendering in SWT.
[Experimental Feature]

  • Integrates an SWT’s canvas extension framework, which replaces the
    native backend for canvases with the Skia drawing framework which relies in this implementation on
    OpenGL.

  • adds a new fragment of org.eclipse.swt: bundles/org.eclipse.swt.skia

  • Includes core classes for rendering

  • resource management

  • a factory for SWT integration with the ServiceLoader

  • Implements caching for fonts, images, and text, supports DPI scaling

  • The plugin is modular an minimizes API changes

  • there are some tests in the org.eclipse.swt.skia plugin

  • for more information read the skia.md file in bundles/org.eclipse.swt.skia

  • uses the service loader, if there are bugs at the loading, the skia plugin will be ignored.

  • Since the API was modified the SWT version should be increased (still to do)

  • there seems to be an api tools bug because of sealed classes. This happens only in the github PR checks.

  • The second commit contains only the ignores for the api tools. It can be reverted and then the versioning could be fixed properly.

Integrates an SWT’s canvas extension framework, which replacing the
native backend for canvases with the SWT.SKIA style bit and leveraging
OpenGL.
- Includes core classes for rendering
- resource management
- a factory for SWT integration.
- Implements caching for fonts, images, and text, supports DPI scaling,
and manages Skija resources explicitly.
- The plugin is modular, minimizes API changes, and is OSGi-activatable.
- for more information read the skia.md in bundles/org.eclipse.swt.skia
- for adding the SWT.SKIA field, the version of SWT should be increased
- there seams to be a bug on the api tools for sealed classes. Locally
on my system, there are no api bugs for handle etc. But on github i get
error messages, that handle etc are used. this only happens for sealed
classes.
@DenisUngemach
Copy link
Copy Markdown
Contributor Author

Referring to the issue: #2616

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

Test Results

  186 files  +16    186 suites  +16   26m 25s ⏱️ -58s
4 715 tests +22  4 694 ✅ +22   21 💤 ±0  0 ❌ ±0 
6 764 runs  +88  6 606 ✅ +88  158 💤 ±0  0 ❌ ±0 

Results for commit c44bcc0. ± Comparison against base commit ee1713a.

♻️ This comment has been updated with latest results.

@vogella
Copy link
Copy Markdown
Contributor

vogella commented Apr 14, 2026

I think we need another PR to add the Skia libraries to the buiild. @HeikoKlare can you guide what needs to be done for that?

@DenisUngemach
Copy link
Copy Markdown
Contributor Author

I think we need another PR to add the Skia libraries to the buiild. @HeikoKlare can you guide what needs to be done for that?

In the current change the source jars will also be loaded to the lib folder. On my builds this was only a warning, it seems here it is an error.
I could just remove this handling.

@HeikoKlare
Copy link
Copy Markdown
Contributor

I think we need another PR to add the Skia libraries to the buiild. @HeikoKlare can you guide what needs to be done for that?

From my understanding, we need to add the library to the eclipse-sdk-prereqs target, so they become available in our target platform. Just like we did here for the JSVG library used in the SWT SVG fragment:

I can provide a PR once I find the time to do so. But feel free to just do it inspired by the linked PR even earlier.

Only causes warnings and errors. These are not necessary in the
org.eclipse.swt.skia plugin. Only convenience.
@DenisUngemach
Copy link
Copy Markdown
Contributor Author

DenisUngemach commented Apr 15, 2026

I think we need another PR to add the Skia libraries to the buiild. @HeikoKlare can you guide what needs to be done for that?

From my understanding, we need to add the library to the eclipse-sdk-prereqs target, so they become available in our target platform. Just like we did here for the JSVG library used in the SWT SVG fragment:

I can provide a PR once I find the time to do so. But feel free to just do it inspired by the linked PR even earlier.

Is this right: swt-initiative31/eclipse.platform.releng.aggregator#1

Of course i will open then the PR to the original releng repo, if this should do it.

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.

3 participants