LibreWPF.ProGPU 0.1.0-preview.11

This is a prerelease version of LibreWPF.ProGPU.
dotnet add package LibreWPF.ProGPU --version 0.1.0-preview.11
                    
NuGet\Install-Package LibreWPF.ProGPU -Version 0.1.0-preview.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibreWPF.ProGPU" Version="0.1.0-preview.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LibreWPF.ProGPU" Version="0.1.0-preview.11" />
                    
Directory.Packages.props
<PackageReference Include="LibreWPF.ProGPU" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LibreWPF.ProGPU --version 0.1.0-preview.11
                    
#r "nuget: LibreWPF.ProGPU, 0.1.0-preview.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LibreWPF.ProGPU@0.1.0-preview.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LibreWPF.ProGPU&version=0.1.0-preview.11&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=LibreWPF.ProGPU&version=0.1.0-preview.11&prerelease
                    
Install as a Cake Tool

LibreWPF.ProGPU

This package is the LibreWPF cross-platform rendering port lane for WPF. The assembly and source project remain ProGPU.Wpf; the public NuGet package ID is LibreWPF.ProGPU.

It intentionally does not modify the existing PresentationCore DUCE/MIL path yet. Instead, it provides:

  • ProGpuWpfCompositionTarget, a ProGPU-backed composition target that renders a retained ProGPU.Scene.DrawingVisual.
  • ProGpuWpfDrawingFrame, a per-frame drawing scope that clears and sizes the retained root once, then creates multiple WPF-shaped DrawingContext wrappers over the same ProGPU command buffer for provider-style render-open integration, with owner/count diagnostics for redirected render-open activity.
  • WpfRenderDataSinkProviderBridge, a typed registration bridge that installs an active frame's drawing-context factory into WPF's portable render-data sink provider.
  • ProGpuWpfWindowHost, a Silk.NET window host that owns the WebGPU surface and invokes WPF-shaped drawing callbacks.
  • WpfPortableWindowActivation, a transition activation adapter that binds WPF-shaped top-level windows to host-owned PortablePresentationSource instances, keeps the window itself as the root visual, derives Silk.NET host options from typed portable window state, mirrors WPF Closing cancellation back into the Silk.NET close request, forwards Silk.NET focus-derived activation/deactivation through typed activation-service callbacks, routes normalized Silk.NET input through the portable activation service, and registers typed PresentationFramework callbacks so non-Windows Window.Show, Hide, WindowState, and Application.Run can reach the ProGPU/Silk.NET host through WPF lifetime code.
  • IWpfCompositionCommandSink, a backend-neutral drawing command seam for redirecting managed WPF drawing away from DUCE/MIL records. The ProGPU sink records primitive draws, shim bitmap image draws including source-rectangle texture draws, path-compatible geometry and clip operations, glyph runs, shim formatted text, and transformed opacity-mask scopes directly into native ProGPU commands. WPF arc segments stay native ProGPU arcs through affine transforms that ProGPU can represent as transformed ellipse axes, including shear and reflected sweep-direction flips, and valid stroked arcs render through ProGPU's fixed-quad ArcSdf shader path after removing the older segmented ArcStrip fallback. The ProGPU PresentationCore shim now submits Geometry.Transform as a native DrawPath command transform instead of baking path points in managed shim code, so WPF API arcs reach the same native path-atlas and arc-SDF shader logic. Dash-array normalization/state comes from ProGPU.Vector.DashPattern, and dashed rounded-rectangle corners and ellipse outlines use ProGPU-owned primitive arc paths instead of bridge-local polyline approximations.
  • WpfCompositionDrawingContext, a source-level adapter for managed drawing code that can call IWpfCompositionCommandSink directly instead of producing RenderData byte records, while preserving generated no-op draw guards, generated push/pop scope balance, replaying WPF-shaped drawing resources through the transition drawing resolver, forwarding generated animated overloads through their base values, lowering supported context-bound legacy bitmap effects to native ProGPU retained effect scopes, and reporting unsupported source operations, partial drawing-resource replay, or animation state.
  • IWpfGeneratedRenderDataDrawingContext and WpfRenderDataInstructionRedirectionCatalog, the current generator-redirection contract and metadata gate for keeping the source-level adapter aligned with WPF's RenderDataInstruction definitions.
  • WpfMilRenderDataDecoder, a byte-level decoder for the primitive generated WPF RenderData records that can feed a command sink.
  • WpfResourceResolver, a one-based dependent-resource resolver that adapts local media resources, source-built portable DTOs, and ProGPU-native resource wrappers without generic reflection/property probing.
  • IWpfImageSourceAdapter/WpfBitmapSourceImageAdapter, an opt-in boundary for uploading source-built WPF bitmap sources into ProGPU textures through IPortableBitmapSourcePixelsSource or IProGpuTextureSource. The bridge no longer reflects bitmap CopyPixels(...), dimensions, format, or palette state; source stride/byte-length validation, indexed-palette validation, compact PBgra32 row packing, BGRA texture upload validation, and managed conversion to Pbgra32 for common 32-bit, 24-bit, packed grayscale, indexed palette, 16-bit grayscale/BGR, 48/64-bit integer RGB/RGBA, non-profiled scRGB float, and non-profiled CMYK formats stay in ProGPU.Backend through PixelDataBuffer, Pbgra32PixelBuffer, and GpuTexture.WritePbgra32SubRect(...).
  • IWpfDrawingResourceResolver/WpfDrawingReplay, a typed drawing replay path for MilDrawDrawing records that reference source-built WPF drawing DTOs, including supported native retained DrawingGroup effect scopes, supported DrawingGroup.BitmapScalingMode sampling state, supported DrawingGroup.EdgeMode=Aliased vector edge state, supported DrawingGroup.TextRenderingMode=Aliased/Grayscale/ClearType text antialiasing state, bounded ImageBrush, DrawingBrush, and VisualBrush geometry fills with relative or absolute viewport/viewbox units, AlignmentX=Left/Center/Right, AlignmentY=Top/Center/Bottom, Stretch=None/Fill/Uniform/UniformToFill, adaptable affine absolute and relative brush transforms, and bounded tile/flip-mode replay.
  • WpfRenderDataBridge, a typed bridge that copies IPortableRenderDataSource snapshots and replays the active bytes plus dependent resources through the decoder.
  • WpfVisualContentBridge, a typed bridge that reads IPortableDrawingContentSource visual content and replays portable RenderData content through the same decoder.
  • WpfVisualTreeRenderer, a typed portable retained-visual renderer that traverses IPortableVisualChildrenSource, applies compatible transform/offset/native primitive and geometry draw/native clip/opacity/opacity-mask state, supported BitmapScalingMode=NearestNeighbor/LowQuality/Linear/HighQuality/Fant image sampling, supported EdgeMode=Aliased vector edge state, supported TextRenderingMode=Aliased/Grayscale/ClearType text antialiasing state, portable geometry and Viewport3D scene DTOs, glyph-run local font URI and bold/italic style-simulation replay, and render-data-inferred visual opacity-mask bounds, and reports unsupported visual state.
  • IWpfViewport3DCommandSink/WpfViewport3DSceneBridge, a typed portable scene path that compiles source-built WPF IPortableViewport3DSceneSource camera, light, mesh, material, and transform DTOs into ProGPU's Mesh3D extension payload.
  • WpfViewport3DTextureCache, a composition-target-owned cache for Viewport3D color/MSAA/depth textures.
  • WpfVisualInvalidationTracker, a transition tracker for portable invalidation, typed visual/content/render-data graph snapshots, property-change notifications, and collection-change notifications.
  • IWpfRenderScheduler, CoalescingWpfRenderScheduler, and DispatcherWpfRenderScheduler, render-request boundaries for coalescing WPF-style invalidations and scheduling render-priority callbacks through the local dispatcher/timer services before work is mapped onto a platform loop. ProGpuWpfWindowHost also snapshots ProGpuWpfFrameState from pixel size plus native scene/retained/flat change-version counters and retained-branch targetability diagnostics, records LastPresentedFrameState, and skips unchanged Silk.NET frame callbacks when no explicit draw callbacks or pending render requests require work.
  • IWpfPlatformServices, the initial Win32 abstraction boundary for clipboard, cursor, dispatcher, drag/drop, dialogs, input, launcher, message boxes, timers, window events, and monitor services. The default host uses a cross-platform launcher backed by ProcessStartInfo.UseShellExecute, process-backed text clipboard commands per OS, process-backed message box commands per OS, process-backed file open/save/folder picker commands per OS, normalized Silk.NET keyboard/text/mouse/wheel input, normalized Silk.NET standard cursors, native Win32/Cocoa/X11 drag-move initiation behind WPF Window.DragMove(), a queued owner-thread dispatcher, a dispatcher/timer-backed render scheduler with guarded Silk.NET render wakeups, Silk.NET file-drop payload events, normalized Silk.NET activation/file-drop events, a Silk.NET monitor service with DPI scale derivation, and a portable thread-pool timer service.
  • A dependency on the ProGPU PresentationCore shim so early porting work can exercise System.Windows.Media.DrawingContext-style APIs on macOS/Linux/Windows.

The long-term migration path is to move managed WPF visual/resource code onto these contracts, update the WPF render-data generator so generated draw methods can target the sink path, then retire MIL command serialization behind a ProGPU command sink.

The WPF source tree now has the first in-assembly hook for that migration: IRenderDataDrawingContextSink, a sink-aware RenderDataDrawingContext constructor/lifetime path, renderdata.cs generator output that branches to the sink before MIL serialization, and the checked-in generated RenderDataDrawingContext.cs updated to use that branch while preserving the existing default RenderData path. DrawingContextRenderDataSink forwards the sink surface to WPF's managed DrawingContext, while RenderDataDrawingContextSinkProvider.PushDrawingContextFactory(...) and VisualDrawingContext.Create route DrawingVisual.RenderOpen() and UIElement.RenderOpen() through a nested scoped drawing-context factory so a ProGPU composition target can opt into the sink path while active and restore the previous route afterward. WpfRenderDataSinkProviderBridge is the ProGPU-side activation adapter for that hook once WPF PresentationCore and ProGPU shim type identity are unified. The ProGPU submodule assemblies are now strong-name signed, so the remaining blocker is type identity/friend assembly shape rather than unsigned ProGPU dependencies.

ProGpuWpfWindowHost.WpfRootVisual can be set to a WPF-shaped visual object for transition replay. Each frame, the host begins a ProGpuWpfDrawingFrame, scopes WpfRenderDataSinkProviderBridge registration over that frame, replays the visual through WpfVisualTreeRenderer into the retained WPF ProGPU scene layer, stores counts in LastVisualReplayResult, invokes the source-level WpfDraw callback with a WpfCompositionDrawingContext, then invokes the existing lower-level Draw and Render callbacks on the flat drawing layer above the retained WPF content. Direct ProGpuWpfCompositionTarget.ReplayVisualSubtree(..., pixelWidth, pixelHeight, ...) uses the same frame-scoped provider registration path for composition-target-only callers while preserving the flat replay path. ProGpuWpfFrameEventArgs.DrawingFrame exposes the active frame to callbacks. LastSourceDrawingResult stores applied/unsupported counts for the source-level callback. The default replay resolver adapts common solid brushes, linear and radial gradients with large stop tables, bounded mapping/spread/invertible affine brush-coordinate transforms/color-interpolation methods, radial gradients with separate X/Y radii and gradient origins, pens, matrix/translate/scale/rotate/skew/transform-group affine transforms, line/rectangle/ellipse/group/path/combined geometry including mixed geometry groups with nested combined operations, bounded ImageBrush, DrawingBrush, and VisualBrush geometry fills with relative or absolute viewport/viewbox units, AlignmentX=Left/Center/Right, AlignmentY=Top/Center/Bottom, Stretch=None/Fill/Uniform/UniformToFill, adaptable affine absolute and relative brush transforms, and bounded tile/flip-mode replay, simple glyph runs with local GlyphTypeface.FontUri font-file replay and bold/italic style-simulation flags when available, drawing-group opacity masks with finite or inferred child-content bounds plus supported nearest/low-quality/linear/high-quality/fant bitmap sampling state, aliased edge-mode state, and aliased/grayscale text-rendering-mode state, visual opacity masks with exposed or render-data-inferred finite bounds, supported visual BlurEffect/DropShadowEffect, registered WPF ShaderEffect, and context-bound emulatable legacy BitmapEffect scopes through retained ProGPU visuals, supported nearest/low-quality/linear/high-quality/fant visual bitmap image sampling state, supported visual aliased edge-mode state, supported visual aliased/grayscale text-rendering-mode state, portable Viewport3D mesh/model scene content, and, through the host's default WpfBitmapSourceImageAdapter, source-built WPF bitmap sources that publish IPortableBitmapSourcePixelsSource pixels for Pbgra32, Bgra32, Bgr32, Bgr101010, Bgr24, Rgb24, BlackWhite, Gray2, Gray4, Gray8, Gray16, Bgr555, Bgr565, Rgb48, Rgba64, Prgba64, Gray32Float, Rgb128Float, Rgba128Float, Prgba128Float, Cmyk32, and indexed formats. ProGpuWpfCompositionTarget.WpfInvalidationTracker observes portable invalidation, property-change, collection-change, and typed visual/content/render-data graph changes, dirtying mapped retained native branches when every dirty source is targetable and falling back to the retained WPF root when any dirty source is unmapped or shares a native branch with clean source owners. ProGpuWpfWindowHost.WpfRenderScheduler coalesces render requests from root changes, resize, target load, source invalidation, and typed source-change polling; the host observes scheduler wakeups and issues a guarded dispatcher-thread Silk.NET DoRender() wakeup when a native window is available, then skips unchanged frames when no explicit Draw/WpfDraw/Render callback is registered, no scheduler request is pending, and the last presented frame-state snapshot still matches. Replace WpfImageSourceAdapter, set it to null, or provide a custom resolver for richer resources.

ProGPU's submodule branch now also has a native visual WpfShaderEffect path: retained visuals can render their source offscreen, bind that source as the typed WPF implicit-input sampler register, and execute WGSL/WebGPU through the same native sampler-bank extension used by direct DrawWpfShaderEffect(...). The ProGPU WGSL helper wpf_sample_source(uv) follows that typed source register, so native replacements do not need managed register-specific workaround code for the implicit input. WpfShaderEffectRegistry lets hosts register native WGSL replacements by effect type, pixel-shader URI, or pixel-shader bytecode hash; typed WPF float constants, implicit input sampler index, image-backed ImageBrush sampler registers, compositor-rendered finite DrawingBrush/VisualBrush sampler registers, sampling mode, and padding are copied into the ProGPU descriptor. This is a native shader bridge, not a managed pixel-loop fallback. The native pipeline now gates all-16-register effects with active masks on captured WebGPU device limits, keeping the mask bound on capable devices and failing closed on minimum-limit devices. The same ProGPU branch keeps WPF shader effects, image effects, texture masks, and blend scopes on backend-owned alpha semantics: straight WPF shader/effect sources keep straight RGB and scale alpha/coverage once, while premultiplied sources scale RGB and alpha together. It also maps Skia gradient tile modes onto ProGPU spread modes and lowers Skia dash path effects into native ProGPU dashed line/Bezier/arc strokes rather than forcing WPF-side span workarounds. Generated/source PushEffect and supported DrawingGroup effect state now map supported context-bound legacy bitmap effects through native retained effect scopes. Remaining effect work is non-emulatable legacy bitmap effects, non-context BitmapEffectInput, advanced/unbounded brush shader samplers or other non-image sampler texture inputs, and Direct3D pixel-shader bytecode translation/import for existing WPF HLSL effects.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on LibreWPF.ProGPU:

Package Downloads
LibreWinForms.WindowsFormsIntegration

LibreWinForms portable WindowsFormsIntegration host surface for LibreWPF and ProGPU-backed WinForms content.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.11 0 7/13/2026
0.1.0-preview.10 48 7/12/2026
0.1.0-preview.8 40 7/11/2026
0.1.0-preview.7 49 7/11/2026
0.1.0-preview.1 62 7/7/2026

Aligns LibreWPF with ProGPU preview.11, completes portable Icon.Save/resource compatibility, and expands reflection-free LibreWinForms and SharpDevelop integration.