High GPU usage when using WindowChrome, MediaElement and InkCanvas on Intel Iris Xe
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
When I create a WPF full screen demo using WindowChrome 、MediaElement and InkCanvas,the GPU usage will surge to 60%.


I tested different computers. This problem occurs when the computer graphics card driver is Intel Iris Xe , but is normal on UHD.
And I listed the GPU usage under different configurations:

I can't reproduce the same issue from the system native app, so I'm not sure if this is an Intel issue or a WPF issue.
And I tried to get window's touch events to draw Geometry, and the GPU usage was not as exaggerated as InkCanvas, about 30%~40%.
My demo is as follows:
```cs
```
```cs
private void LoadingElement_OnMediaEnded(object sender, RoutedEventArgs e)
{
((MediaElement)sender).Position = ((MediaElement)sender).Position.Add(TimeSpan.FromMilliseconds(1));
}
```
### Reproduction Steps
1. Prepare a computer with Intel Iris Xe graphics (I tried it on two computers and it can be reproduced on both computers.),version of the graphics card driver is 31.0.101.5084.
2. Create an empty WPF application, .net 6.0 or .net framework 4.7.2. I am using .net framework 472, and it is the same when using .net 6.0.
3. Add MediaElement and Inkcanvas in xaml, and set WindowChrome.
4. Run the application, write on Inkcanvs.
5. Observe GPU usage in task manager.
### Expected behavior
The GPU usage is normal.
### Actual behavior
The GPU usage is very high.
### Regression?
_No response_
### Known Workarounds
Set the WPF app to use software rendering.
```cs
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
```
### Impact
_No response_
### Configuration
_No response_
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.