You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m not sure how much of a performance cost this process will incur, but it seems that we can use the SKColorType.Bgra8888 pixel format here.
My question is why should use SKColorType.Rgba8888 in GlRenderTarget.BeginRenderingSessionCore?
And I know why use DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM here, because as the document says:
We recommend that you use DXGI_FORMAT_B8G8R8A8_UNORM as the pixel format for better performance. This is particularly helpful for software render targets. BGRA format targets perform better than RGBA formats.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
As the code shows, Avalonia use
DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM(know as BGRA 32) when the SwapChain created:Avalonia/src/Windows/Avalonia.Win32/DirectX/DxgiRenderTarget.cs
Lines 49 to 57 in 1ee1509
But then Avalonia render with SKColorType.Rgba8888 in
GlRenderTarget.BeginRenderingSessionCore:Avalonia/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs
Line 80 in 1ee1509
I’m not sure how much of a performance cost this process will incur, but it seems that we can use the SKColorType.Bgra8888 pixel format here.
My question is why should use SKColorType.Rgba8888 in
GlRenderTarget.BeginRenderingSessionCore?And I know why use
DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORMhere, because as the document says:Beta Was this translation helpful? Give feedback.
All reactions