-
Notifications
You must be signed in to change notification settings - Fork 690
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
feat: introduce SkiaVisual, SKCanvasElement and GLCanvasElement to allow externally adding sophisticated graphics #16621
base: master
Are you sure you want to change the base?
feat: introduce SkiaVisual, SKCanvasElement and GLCanvasElement to allow externally adding sophisticated graphics #16621
Conversation
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16621/index.html |
1 similar comment
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16621/index.html |
|
||
if (_gl.CheckFramebufferStatus(GLEnum.Framebuffer) != GLEnum.FramebufferComplete) | ||
{ | ||
throw new InvalidOperationException("Offscreen framebuffer is not complete"); |
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.
If a user gets this message, what can be done? If possible, let's make the message actionable.
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.
If the user gets this message, then we couldn't construct the offscreen framebuffer and the user should report this as a bug. I don't think there's anything that can be done externally.
return; | ||
} | ||
|
||
using var _ = new GLStateDisposable(_gl!); |
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.
What if _gl
is null?
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.
_gl cannot be be null if the element is IsLoaded
, since we attempt to create a GL object there and throw if we couldn't. I would like this to be more explicit, but I'm not sure if there's something simple to enforce this beside adding a comment.
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16621/index.html |
2b58d63
to
b0c4862
Compare
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16621/index.html |
…when continuously invalidating render
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16621/index.html |
@@ -97,6 +97,10 @@ | |||
</ProjectReference> | |||
</ItemGroup> | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="Silk.NET.OpenGL" Version="2.16.0" /> |
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.
This shouldn't be needed here. I see the usages are only in the Uno.UI.Runtime.Skia and Uno.UI.Runtime.Skia.Wpf packages
@@ -35,4 +35,8 @@ | |||
<ProjectReference Include="..\Uno.UWP\Uno.Skia.csproj" TreatAsPackageReference="false" PrivateAssets="all" /> | |||
</ItemGroup> | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="Silk.NET.OpenGL" Version="2.16.0" /> |
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.
You'll need to add this to nuspec. But I'm not sure if it's a good idea to have this dependency. @jeromelaban thoughts?
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.
We already have that dependency in platform specific targets for Linux and WPF. We should also be able to have that dependency running Angle on macOS, afaik.
GitHub Issue (If applicable): closes ##15166 closes #9405 closes #11034 closes https://github.com/unoplatform/private/issues/349
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):