Skip to content

Engine Xavier

Taiizor edited this page Jun 5, 2026 · 3 revisions

Engine: Xavier

Xavier (Sucrose.Live.Xavier, assembly Sucrose.Live.Xavier.exe) is one of Sucrose's three GIF rendering engines. It animates GIFs through the bundled Sucrose.XamlAnimatedGif library, using its AnimationBehavior attached behavior on a WPF Image. Unlike Vexana, Xavier can stream GIFs from remote URLs because it is configured with an HTTP client and a client user-agent. Xavier renders only the Gif type and, like Vexana, is pure managed WPF with no Chromium or libmpv dependency.

Audience: developers and advanced users. For the user-facing GIF wallpaper guide, see Type-Gif.

Contents

At a glance

Property Value
Project Sucrose.Live.Xavier
Assembly Sucrose.Live.Xavier.exe
Underlying tech Sucrose.XamlAnimatedGif (XAML attached behavior)
Preprocessor symbols ENGINE, LIVE_XAVIER
Engine enum member EngineType.XavierLive
Allowed for type Gif
Default for (none — MpvPlayer is the default Gif engine)
Native dependency None (pure managed WPF)
Remote GIF over HTTP Yes
Interactive No
Audio / system data No

Technology

Xavier renders GIFs with Sucrose.XamlAnimatedGif, a bundled XamlAnimatedGif library. The animation is driven by the attached behavior SXAGAB = Sucrose.XamlAnimatedGif.AnimationBehavior applied to a WPF Image. Because XamlAnimatedGif can load a GIF from a URI using a supplied HttpClient, Xavier is able to display remote GIFs as well as local files.

"Xavier" is a branded internal codename; it denotes the XamlAnimatedGif-based engine and is not a third-party product name. Like Vexana, it is pure-WPF — no Chromium and no libmpv.

Supported wallpaper types

Type Supported
Gif Yes
Url No
Web No
Video No
YouTube No
Application No

Xavier's window switch handles only the Gif case; any other type routed to it falls through to default → Close().

Runtime requirements

Xavier has no extra native runtime beyond Sucrose's privately bundled .NET 10 runtime (Sucrose.Runtime). There is no WebView2 runtime, no Visual C++ Redistributable, and no libmpv DLL. It targets .NET 10.0-windows (WPF + WinForms interop) and builds for x86, x64, and ARM64.

See System-Requirements and Runtime-Dependencies.

How it renders

Xavier follows the shared engine App.xaml.cs skeleton:

  1. Exception handlers (Thread, FirstChance, Unhandled, UnobservedTask, Dispatcher) route to Sucrose.Shared.Watchdog.
  2. OnStartup: single-instance mutex check (SMMRM.Live), Security.Apply(), optional theme cycling, then Checker() / Configure().
  3. Configure(): reads LibraryLocation / LibrarySelected, loads SucroseInfo.json (SSTHI.ReadJson), verifies Info.AppVersion <= app version, resolves Source, then switches on Info.Type and shows the Gif window.
  4. The Backgroundog flags PipeRequired, AudioRequired, SignalRequired, PausePerformance, TransmissionRequired start off and stay off (Xavier renders no Web data).
  5. Starts Awakening.Start() (Stay Awake), Crashing.Start(), and Cycyling.Start().

Setup and playback control

Xavier's GIF view (View/Gif.xaml.cs) configures the XamlAnimatedGif behavior:

Call Effect
SetSourceUri Sets the GIF source (local path or URL).
SetRepeatBehavior(Forever) Loops the GIF indefinitely.
SetCacheFramesInMemory(false) Disables in-memory frame caching.
SetAutoStart(true) Begins playback automatically.
SetClientUserAgent(SMMG.UserAgent) Sends Sucrose's user-agent for remote GIF requests.
SetHttpClient(SSDMI.Client) Supplies the shared HttpClient, enabling GIF loading from URLs.

Playback control (Helper/Gif.cs):

Operation Behavior
SetMemory(false) Keeps frame caching off.
SetLoop Toggles looping.
Pause / Resume Pauses or resumes the animation.
Stretch Applies the shared StretchType (default UniformToFill).

Hardware acceleration and Stay Awake

  • HardwareAcceleration: Not applicable. WPF handles compositing; there are no GPU flags to toggle for Xavier.
  • Stay Awake: Applies via the shared Helper/Awakening.cs 30-second SetThreadExecutionState loop (ON → ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED; OFF → ES_CONTINUOUS).

Interactivity and data APIs

Xavier is a non-interactive renderer. It does not reference RawInput.Sharp, so it forwards no input to content, and it does not support the audio-reactive or system-status JavaScript APIs (those require the Web type on a browser engine — see Engine-WebView / Engine-CefSharp, Create-Audio-API, Create-System-API).

Xavier vs. Vexana

Both are pure-WPF GIF engines with no native runtime. The practical differences:

Xavier Vexana
Decoder Sucrose.XamlAnimatedGif AnimationBehavior In-house frame parser (Helper/Parse.cs) + manual timer
Frame caching Off (SetCacheFramesInMemory(false)) n/a (own ticker)
Remote GIF over HTTP Yes (HTTP client + user-agent) No
Interactivity / data APIs No No

Choose Xavier when you need to stream a GIF from a URL; choose Vexana for the simplest local frame-player path. For richest control and as the type default, use MpvPlayer.

Strengths and limitations

Strengths

  • No native runtime to install — pure managed WPF.
  • Can stream GIFs directly from remote URLs.
  • Lightweight; frame caching disabled keeps memory use modest.

Limitations

  • Gif type only.
  • Not interactive; forwards no input.
  • No audio reactivity or system-status data injection.

See also

Home

Getting Started

Wallpaper Types

Using Sucrose

Settings Reference

Creating Wallpapers

Engine Reference

Automation & Command Line

Architecture & Internals

Data, Files & Diagnostics

Building & Contributing

Help & Support

Clone this wiki locally