Skip to content

Commit fceba51

Browse files
committed
Optimize Skia rendering for 120 fps
1 parent 21b0f6b commit fceba51

File tree

5 files changed

+186
-236
lines changed

5 files changed

+186
-236
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using System.Windows.Forms;
1111
using SkiaSharp;
1212

13-
namespace WinDynamicDesktop.SkiaSharp
13+
namespace WinDynamicDesktop.Skia
1414
{
1515
sealed class BitmapCache
1616
{
@@ -138,10 +138,10 @@ private SKBitmap CreateImage(Uri uri)
138138
using (var fullBitmap = new SKBitmap(info))
139139
{
140140
codec.GetPixels(fullBitmap.Info, fullBitmap.GetPixels());
141-
fullBitmap.ScalePixels(bitmap, SKFilterQuality.High);
141+
fullBitmap.ScalePixels(bitmap, new SKSamplingOptions(SKCubicResampler.Mitchell));
142142
}
143143
}
144-
144+
145145
return bitmap;
146146
}
147147
}

0 commit comments

Comments
 (0)