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] Unacceptable drop of performance #3109

Open
1 task done
LucaCris opened this issue Dec 7, 2024 · 0 comments
Open
1 task done

[BUG] Unacceptable drop of performance #3109

LucaCris opened this issue Dec 7, 2024 · 0 comments
Labels

Comments

@LucaCris
Copy link

LucaCris commented Dec 7, 2024

Description

Having a gradient background was no issue with Version="2.88.9". Using latest one or even the preview (3.118), the performance is down by 90%.

Code

Having:

BG = new SKPaint
{
    Shader = SKShader.CreateLinearGradient(
                    new SKPoint(0, 0),
                    new SKPoint(0, FireField.Height),
                    [SKColors.DarkBlue, SKColors.Black],
                    [0, 0.75f],
                    SKShaderTileMode.Clamp)
};

...

void PaintSurface(SKPaintSurfaceEventArgs e)
{
    var canvas = e.Surface.Canvas;
    canvas.DrawRect(0, 0, FireField.Width, FireField.Height, BG);
...

The PaintSurface becomes very slow.

Simply commenting out the Shader block, it returns fast... but flat.

Expected Behavior

No changes in drawing speed.

Actual Behavior

No response

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

2.88.9 (Previous)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

No response

Devices

No response

Relevant Screenshots

Well working page:

immagine

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New
Development

No branches or pull requests

1 participant