forked from firka/flutter
[web] dont look up webgl params if no GPU is available (flutter/engine#38948)
This commit is contained in:
@@ -336,9 +336,6 @@ class Surface {
|
||||
majorVersion: webGLVersion.toDouble(),
|
||||
),
|
||||
).toInt();
|
||||
if (_sampleCount == -1 || _stencilBits == -1) {
|
||||
_initWebglParams();
|
||||
}
|
||||
|
||||
_glContext = glContext;
|
||||
|
||||
@@ -348,6 +345,9 @@ class Surface {
|
||||
throw CanvasKitError('Failed to initialize CanvasKit. '
|
||||
'CanvasKit.MakeGrContext returned null.');
|
||||
}
|
||||
if (_sampleCount == -1 || _stencilBits == -1) {
|
||||
_initWebglParams();
|
||||
}
|
||||
// Set the cache byte limit for this grContext, if not specified it will
|
||||
// use CanvasKit's default.
|
||||
_syncCacheBytes();
|
||||
|
||||
Reference in New Issue
Block a user