这是indexloc提供的服务,不要输入任何密码
Skip to content

[iOS, 3.116.1] SKGLView and SKCanvasView generate a canvas at different scale with the same settings on some iOS devices #3296

@janne-hmp

Description

@janne-hmp

Description

Not sure if this is intended, but on iOS, SKCanvasView seems to always use scaling factor equal to DeviceDisplay.Current.MainDisplayInfo.Density, while SKGLView seems to use on some devices something a bit different when drawing with the exact same settings. This is the scaling between SKCanvasView/SKGLView.Width and e.Info.Width in PaintSurface. I believe they should both use the same scaling factor, possibly equal to MainDisplayInfo.Density. This seems at least to be the case on Android and Windows on all devices. On iPhone 11, e.Info.Width is a bit bigger for SKGLView than it is for SKCanvasView (where the scaling is equal to MainDisplayInfo.Density).

Code

No code, we observed this behavior on iPhone 11.

Expected Behavior

All iOS devices use the same scaling factor equal to DeviceDisplay.Current.MainDisplayInfo.Density with both SKCanvasView and SKGLView.

Actual Behavior

SKGLView on some iOS devices (iPhone 11 for example) uses a scaling factor different from DeviceDisplay.Current.MainDisplayInfo.Density.

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

iOS

Platform / Operating System Version

iOS 18.5

Devices

iPhone 11

Relevant Screenshots

No response

Relevant Log Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions