* Reland dispose images when done (#67100)
Changes since last time:
- Test for CanvasKit image rendering
(https://github.com/flutter/flutter/pull/67176)
- Fix CanvasKit dispose impl
(https://github.com/flutter/engine/pull/21555)
- Update internal google3 customer with a problematic ImageStream
Listener impl (cl/335091311, cl/335459002)
This reverts commit 473358d93d.
This commit is contained in:
@@ -166,7 +166,7 @@ class AnimationSheetBuilder {
|
||||
key: key,
|
||||
cellSize: frameSize,
|
||||
children: frames.map((ui.Image image) => RawImage(
|
||||
image: image,
|
||||
image: image.clone(),
|
||||
width: frameSize.width,
|
||||
height: frameSize.height,
|
||||
)).toList(),
|
||||
|
||||
@@ -38,12 +38,12 @@ Future<ui.Image> createTestImage({
|
||||
|
||||
final int cacheKey = hashValues(width, height);
|
||||
if (cache && _cache.containsKey(cacheKey)) {
|
||||
return _cache[cacheKey]!;
|
||||
return _cache[cacheKey]!.clone();
|
||||
}
|
||||
|
||||
final ui.Image image = await _createImage(width, height);
|
||||
if (cache) {
|
||||
_cache[cacheKey] = image;
|
||||
_cache[cacheKey] = image.clone();
|
||||
}
|
||||
return image;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user