Skip to content

[Problem/Bug]: WebView2CompositionControl does not render content when DisableHWAcceleration is set to 1 in WPF #5281

Closed

Description

@dipsgin

What happened?

When the Windows registry key HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\DisableHWAcceleration is set to 1, the WebView2CompositionControl in WPF fails to render any web content. The control remains blank or black despite the WebView2 browser process loading the page successfully.

Is this expected behavior or a bug?

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

1.0.3296.44

SDK Version

1.0.3296.44

Framework

WPF

Operating System

Windows 11

OS Version

No response

Repro steps

  1. Set the registry key:
    HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\DisableHWAcceleration = 1
  2. Run a WPF application hosting a WebView2CompositionControl instance.
  3. Load any web page into the control.
  4. Observe that the control does not render the page content (blank/black window).

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Activity

  1. added
    bug
    on Jun 19, 2025
  2. Lakshmisha-KS commented on Sep 15, 2025

    @Lakshmisha-KS

    Thanks for reporting this!

    This behavior is expected (by design) when using WebView2CompositionControl in a WPF app with hardware acceleration disabled via: HKCU\Software\Microsoft\Avalon.Graphics\DisableHWAcceleration = 1

    Why it happens

    • That registry key forces WPF into software rendering (no D3D / no DirectComposition).
    • WebView2CompositionControl depends on a D3D11 + DirectComposition bridge to present content inside WPF. When HW acceleration is off, that bridge can’t be created → the control stays blank/black.
    • Edge browser doesn’t repro because it hosts its own composition tree outside WPF’s rendering pipeline.

    Is this a bug?
    No—currently it’s a limitation of WebView2CompositionControl under WPF when HW acceleration is disabled. There’s no software fallback path for the composition host.

    What you can do

    • Use the HWND-based WebView2 control on WPF when HW acceleration must be off. It renders to a child window and doesn’t depend on WPF’s D3D device.
    • Avoid disabling HW acceleration if you plan to use WebView2CompositionControl. If you did so for GPU/driver issues, consider updating drivers or using WARP at the app level instead of globally disabling WPF HW accel.
    • Fallback at runtime: detect WPF’s rendering tier and choose the control type accordingly.

    cc Navdeep Singh (@Navdeep-ss) to validate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions