Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[web] dont look up webgl params if no GPU is available #38948

Merged
merged 1 commit into from
Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/web_ui/lib/src/engine/canvaskit/surface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,6 @@ class Surface {
majorVersion: webGLVersion.toDouble(),
),
).toInt();
if (_sampleCount == -1 || _stencilBits == -1) {
_initWebglParams();
}

_glContext = glContext;

Expand All @@ -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();
Expand Down