mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Core - Added the ability to change graphics context at runtime
Settings - Added setting for switching between software-based and Vulkan-based rendering
This commit is contained in:
1 parent
d7e302fb23
commit
f888fb5697
19 files changed
+281
-270
No files matched your search
@@ -36,11 +36,11 @@ namespace Artemis.Core
|
||||
int width = (int) pathBounds.Width;
|
||||
int height = (int) pathBounds.Height;
|
||||
|
||||
SKImageInfo imageInfo = new SKImageInfo(width, height);
|
||||
if (Constants.SkiaGraphicsContext == null)
|
||||
SKImageInfo imageInfo = new(width, height);
|
||||
if (Constants.ManagedGraphicsContext?.GraphicsContext == null)
|
||||
Surface = SKSurface.Create(imageInfo);
|
||||
else
|
||||
Surface = SKSurface.Create(Constants.SkiaGraphicsContext, true, imageInfo);
|
||||
Surface = SKSurface.Create(Constants.ManagedGraphicsContext.GraphicsContext, true, imageInfo);
|
||||
|
||||
Path = new SKPath(path);
|
||||
Path.Transform(SKMatrix.CreateTranslation(pathBounds.Left * -1, pathBounds.Top * -1));
|
||||
|
||||
Reference in new issue
Block a user