mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Do not call Picture.toImage on web during shader warm-up (#60379)
This commit is contained in:
parent
769468298b
commit
7518a146c2
@ -91,7 +91,10 @@ abstract class ShaderWarmUp {
|
||||
final ui.Picture picture = recorder.endRecording();
|
||||
final TimelineTask shaderWarmUpTask = TimelineTask();
|
||||
shaderWarmUpTask.start('Warm-up shader');
|
||||
await picture.toImage(size.width.ceil(), size.height.ceil());
|
||||
// Picture.toImage is not yet implemented on the web.
|
||||
if (!kIsWeb) {
|
||||
await picture.toImage(size.width.ceil(), size.height.ceil());
|
||||
}
|
||||
shaderWarmUpTask.finish();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user