mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[web] dont look up webgl params if no GPU is available (flutter/engine#38948)
This commit is contained in:
parent
7ed656d596
commit
949d3d458b
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user