Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Windows, MAUI] SkiaSharp 3.0-Preview4.1 causes an image to be drawn in a wrong size for some first frames on some high DPI screens (works on 3.0-preview3.1) #2960

Closed
1 task done
TommiGustafsson-HMP opened this issue Jul 29, 2024 · 2 comments
Labels

Comments

@TommiGustafsson-HMP
Copy link

TommiGustafsson-HMP commented Jul 29, 2024

Description

On the Windows platform, using .NET MAUI 9.0 Preview 6, SkiaSharp 3.0-preview4.1 has introduced a regression from preview3.1 where SkiaSharp draws images at a wrong size for a few first frames on some high DPI screens.

Screenshots

Please have a look at these screenshots:

SkiaSharp 3.0-preview4.1

vlcsnap-2024-07-29-15h14m04s764

SkiaSharp 3.0-preview3.1

vlcsnap-2024-07-29-15h25m38s106

Videos

Please have a look at the following videos:

SkiaSharp 3.0-preview4.1
2024-07-29.14-43-00.mp4
  1. Download the video.
  2. Open the video with VLC Media Player.
  3. Move to a place where a window with SkiaSharp background (a scroll) is about to be shown.
  4. Press E (move forward one frame) until you see a frame where the background is too small.
SkiaSharp 3.0-preview3.1
2024-07-29.14-45-37.mp4
  1. Download the video.
  2. Open the video with VLC Media Player.
  3. Move to a place where a window with SkiaSharp background (a scroll) is about to be shown.
  4. Press E (move forward one frame) until you see the first frame rendered with a scroll background. The scroll is of the right size.

Public reproduction repository

Download a public reproduction repository (.NET MAUI 9.0 Preview 6 with SkiaSharp 3.0-preview 4.1). This will do:
https://github.com/hyvanmielenpelit/iOSMauiSkiaSharpMemoryLeak

Expected Behavior

SkiaSharp will draw all frames in the right size on all high DPI screens. (I have 200% scaling.)

Actual Behavior

SkiaSharp draws some first frames in a wrong size on all high DPI screens. (I have 200% scaling.)

Version of SkiaSharp

Other (Please indicate in the description)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

Processor: 13th Gen Intel(R) Core(TM) i9-13980HX 2.20 GHz
Installed RAM: 32,0 GB (31,6 GB usable)
System type: 64-bit operating system, x64-based processor
Edition: Windows 11 Pro
Version: 23H2
OS build: 22631.3958
Experience: Windows Feature Experience Pack 1000.22700.1026.0

Display

image

image

GPUs

Integrated

image

Dedicated

image

Devices

Asus ProArt Studiobook H7604JV

Relevant Screenshots

From public reproduction repository

vlcsnap-2024-07-29-15h14m04s764

From GnollHack

I have also a screenshot from our game GnollHack about the problem:

vlcsnap-2024-07-29-13h09m04s873

https://github.com/hyvanmielenpelit/GnollHack

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@janne-hmp
Copy link

We should check this with .NET MAUI 9.0 RC2 and SkiaSharp 3.0 Preview 5.4 and see if either one has fixed the problem.

@TommiGustafsson-HMP
Copy link
Author

It seems that SkiaSharp 3.0 Preview 5.4 has fixed this problem, or it happens very rarely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants