public VulkanGpuSession(GRContext grContext, GRBackendRenderTarget backendRenderTarget, SKSurface surface, VulkanSurfaceRenderingSession vulkanSession) { GrContext = grContext; _backendRenderTarget = backendRenderTarget; SkSurface = surface; _vulkanSession = vulkanSession; SurfaceOrigin = GRSurfaceOrigin.TopLeft; }
public VulkanSurfaceRenderingSession BeginDraw(float scaling) { if (Image == null) { RecreateImage(); } _commandBuffer?.WaitForFence(); _commandBuffer = null; var session = new VulkanSurfaceRenderingSession(Display, Device, this, scaling); Image.TransitionLayout(ImageLayout.ColorAttachmentOptimal, AccessFlags.AccessNoneKhr); return(session); }