Updated the test to not fail the build if a GPU is not available
This commit is contained in:
Родитель
b787f469e8
Коммит
592a56fae5
|
@ -41,7 +41,7 @@ namespace SkiaSharp.Tests
|
|||
(glxMajor < 1) ||
|
||||
(glxMajor == 1 && glxMinor < 3)) {
|
||||
Destroy();
|
||||
throw new Exception("GLX version 1.3 or higher required.");
|
||||
throw new Exception($"GLX version 1.3 or higher required ({glxMajor}.{glxMinor} provided).");
|
||||
}
|
||||
|
||||
var fbc = Glx.ChooseFBConfig(fDisplay, Xlib.XDefaultScreen(fDisplay), visualAttribs);
|
||||
|
|
|
@ -89,15 +89,18 @@ namespace SkiaSharp.Tests
|
|||
|
||||
protected GlContext CreateGlContext()
|
||||
{
|
||||
TestGlVersion();
|
||||
|
||||
if (IsLinux) {
|
||||
return new GlxContext();
|
||||
} else if (IsMac) {
|
||||
return new CglContext();
|
||||
} else if (IsWindows) {
|
||||
return new WglContext();
|
||||
} else {
|
||||
try {
|
||||
if (IsLinux) {
|
||||
return new GlxContext();
|
||||
} else if (IsMac) {
|
||||
return new CglContext();
|
||||
} else if (IsWindows) {
|
||||
return new WglContext();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Assert.Ignore("Unable to create GL context: " + ex.Message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче