toDag abstract method

ScalableImage toDag()

Returns this SI as an in-memory directed acyclic graph of nodes. As compared to a compact scalable image, the DAG representation can be expected to render somewhat faster, at a significant cost in memory. In informal measurements, the DAG representation's paint method ran about 3x faster.

Note, however, that it would not be surprising for the dominant factor in framerate to be a bottleneck elsewhere in the rendering pipeline, e.g. in the GPU. Under these circumstances, there might be no significant overall rendering performance difference between the compact and the DAG representations.

Building a graph structure out of Dart objects might increase memory usage by an order of magnitude.

If this image is already a DAG, this method just returns it.

Implementation

ScalableImage toDag();