-
Notifications
You must be signed in to change notification settings - Fork 118
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
Fix a native crash on makeGL
#869
Conversation
8a29d8e
to
7a4b50a
Compare
It is a regression after #811 After that PR, OpenGL functions are linked in runtime via function `loadOpenGLLibrary`. We didn't call it in `makeGL` functions. Now we call. Adding also `isLoaded` to avoid loading it multiple times Fixes https://youtrack.jetbrains.com/issue/COMPOSE-642/Fix-Skiko-API-regression-for-creating-OpenGL-context
7a4b50a
to
29d7328
Compare
fbFormat | ||
) | ||
) | ||
loadOpenGLLibrary() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we ever create BackendRenderTarget
before initialising context? From a first look this one seems redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems it isn't needed indeed. But not because we init context. Because we can create it without context and even without OpenGL. Checked it just now.
This change affected CfW (k/js) running in Safari :) https://kotlinlang.slack.com/archives/C01F2HV7868/p1708540690334899?thread_ts=1708527218.429189&cid=C01F2HV7868 |
By request from user in DM who uses LWJGL+Skiko on macOS. Let Skia throw an error if it isn't supported, not Skiko. Skiko works well without it, as it doesn't use any OpenGL inside Skiko classes (particularly SkiaLayer). The original error was added in #869, the main purpose of which was to fix a Windows issue, macOs was added just by an assumption that it is no longer can work ## Testing Existing tests works (SkiaLayerTest, DirectContextTest)
It is a regression after #811
After that PR, OpenGL functions are linked in runtime via function
loadOpenGLLibrary
. We didn't call it inmakeGL
functions. Now we call.makeGL
isLoaded
to avoid loading it multiple timesFixes JetBrains/compose-multiplatform#3972