Skip to content
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

Force Canvas source for Text rendering (accelerated Canvas bug in Cairo) #376

Open
wouterlucas opened this issue Sep 10, 2024 · 0 comments
Assignees

Comments

@wouterlucas
Copy link
Contributor

Lightning 2 has a forceTxCanvasSource setting to deal with Canvas Text rendering out in blocks on WPEWebKit devices. We will need a similar solution in L3.

Apparently there is a Cairo bug with text, which most WPEWebKit installs rely on to draw Canvas. If the Canvas text is larger then a certain threshold the text will be rendered as blocks. For example:
image

This is due to a bug in Cairo, newer WPEWebKit's will not have this issue if they switch to the Skia backend. There is a workaround being suggested to raise the threshold from 1/4th to 1/2th of the view port when to accelerate Canvas, per WPEWebkit Issue:
WebPlatformForEmbedded/WPEWebKit#1399

We'll need a similar stopgap solution in Lightning 3 as this might take a bit to roll out everywhere.

Original issue in L2:
rdkcentral/Lightning#363

Introduction of forceTxCanvasSource in L2:
rdkcentral/Lightning#364
rdkcentral/Lightning#393

Current implementation:
https://github.com/lightning-js/renderer/blob/main/src/core/text-rendering/renderers/CanvasTextRenderer.ts#L358

@Drulokia Drulokia self-assigned this Sep 23, 2024
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

When branches are created from issues, their pull requests are automatically linked.

2 participants