Sped up shader warmup by only drawing on a 100x100 surface (#36482)
Sped up shader warmup by only drawing on a 100x100 surface and doing the draw calls on top of each other.
This commit is contained in:
@@ -16,7 +16,9 @@ Future<void> beginFrame(Duration timeStamp) async {
|
||||
final ui.Canvas canvas = ui.Canvas(recorder, paintBounds);
|
||||
final ui.Paint backgroundPaint = ui.Paint()..color = Colors.white;
|
||||
canvas.drawRect(paintBounds, backgroundPaint);
|
||||
await const DefaultShaderWarmUp().warmUpOnCanvas(canvas);
|
||||
await const DefaultShaderWarmUp(
|
||||
drawCallSpacing: 80.0, canvasSize: ui.Size(1024, 1024))
|
||||
.warmUpOnCanvas(canvas);
|
||||
final ui.Picture picture = recorder.endRecording();
|
||||
|
||||
// COMPOSITE
|
||||
|
||||
Reference in New Issue
Block a user