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

Fixes for Chrome v38 #456

Merged
merged 14 commits into from
Nov 27, 2024
Merged

Fixes for Chrome v38 #456

merged 14 commits into from
Nov 27, 2024

Conversation

wouterlucas
Copy link
Contributor

@wouterlucas wouterlucas commented Nov 25, 2024

Fixes for handling base64 src strings on Chrome v38, rework Image texture fallback & detection.

This PR includes:

  • Using a 1x1 PNG pixel to determine which createImageBitmap signature is supported on the browser
  • Fallback the image worker and main thread ImageTexture handling according to the detected signature
  • Support for base64 src on Chrome v38
  • Support for createImageBitmap(blob) without a config object for Chrome v50 (linked to fix: compatibility with chrome 51 #454)
  • Support for ES5 legacy output of the examples directory (will be published on https://lightning-js.github.io/renderer/ automatically)
  • Upgrade vite and vitest to 2.x devDependencies, pin to TS 5.6.x for now (as 5.7.x has issues with other dependencies)
  • Upgrade Playwright 1.39 to 1.49 for automated tests
  • Refactor Visual Regression test pixel matching and snapshot handling by using pixelmatch and pngjs over a homebrew detection + upng (which is stale).
  • SDF font initialization waits for image support detection before uploading the SDF texture atlas.
  • Added documentation on the fallback process and references to chrome versions in BROWSERS.md

@wouterlucas wouterlucas marked this pull request as ready for review November 25, 2024 22:27
@wouterlucas wouterlucas requested review from elsassph and jfboeve and removed request for elsassph November 25, 2024 22:27
@wouterlucas
Copy link
Contributor Author

Using a 1x1 binary png pixel to detect if which createImageBitmap to handle chrome v50/51, small detour with eslint and dependencies to upgrade to newer vite legacy for es5 examples.

wouterlucas and others added 8 commits November 26, 2024 14:29
This fixes an issue where the SDF Font images are being uploaded while the createImageBitmap probing was still ongoing. As a result the image texture uses the lowest available createImageBitmap signature without options. Causing the alpha channel to be ignored which in turn results into jarred text rendering with SDF due to alignment issues.
fix code blocks
@wouterlucas wouterlucas added this pull request to the merge queue Nov 27, 2024
Merged via the queue into main with commit 2b3a866 Nov 27, 2024
2 checks passed
@wouterlucas wouterlucas deleted the fix/chromev38 branch November 28, 2024 10:43
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.

4 participants