hi there. I am just setting up a new Project. I gonna have 2D Grafics, Text and Videos in one Projeciton.
What is the best combination of tools?
using MediaFoundation Video Player, which forces me to use a stride Renderer? Adding 2D stuff and text with Skia and merge all with a skiaRenderer to Stride? Am I loosing performance comgining both Render Enginges?
Or would you do most 2D stuff with stride and import text as a skiaTexture?
Or would the gstreamer be a solution to stay in Skia only? Never used it so far.
would be grateful to hears your recommodation or experiences
There’re still plans to bring the Skia version of the VideoPlayer back (there’s a discussion about that on github). Since we switched the rendering backend of Skia to ANGLE, we should be able to reinterpret the Direct3D surface provided by MediaFoundation as a Skia image. This functionality could probably be also made available as a node and uploaded here as a contribution should in not make it into the .4 release. So at least the performance penalties from Texture to SkImage would be gone.
Using Skia and Stride side by side you’ll still need to consider the subtle differences in alpha blending as was pointed out in other threads already. I think switching the Stride engine to Gamma color space would be the best choice then to have the same results in both worlds, but if you’re also rendering 3D content the looks of it will be different / need tweaking. We’re still not happy with that situation, but that’s how it currently is.
I’ve recently asked in the skia forums about this issue and got an answer yesterday. the skia developers have added a new color type 3 weeks ago that should work with our setup. however, we have to wait until SkiaSharp adds this or we have to make PR and push for it.
That probably doesn’t exist in SkiaSharp yet, but when it does, I think the correct SkSurface configuration to get linear blending would be to use that color type, and a linear color space (eg, SkColorSpace::MakeSRGBLinear).