-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
a: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterdependency: dartDart team may need to help usDart team may need to help usengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedPerformance issues related to (mostly rendering) speed
Description
Use case
I started creating an app for writing down notes on your tablet using a pen. For this, I used a CustomPaint (with canvas.drawLine()) in combination with a GestureDetector. After some Lines, the app gets extreme frame drops and is unusable, so I converted the lines into images every few hundred offsets.
Here some of the relevant code:
ui.PictureRecorder recorder = ui.PictureRecorder();
// some code inbetween...
ui.Picture picture = recorder.endRecording();
ui.Image newImage = await picture.toImage(
....
);Now the problem with this method is that I am getting a really strong frame drop every time toImage() gets called.
Recording of the issue in Release Mode:
Proposal
In the Flutter docs, there is mentioned that 'This is a slow operation that is performed on a background thread.'.
But I wanted to request a faster and more efficient way of converting a Picture to an Image.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterdependency: dartDart team may need to help usDart team may need to help usengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedPerformance issues related to (mostly rendering) speed
