mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Expose approximateBytesUsed for Picture (flutter/engine#5378)
This commit is contained in:
parent
ab0c8a6516
commit
32b1182b0b
@ -3404,6 +3404,12 @@ class Picture extends NativeFieldWrapperClass2 {
|
||||
/// Release the resources used by this object. The object is no longer usable
|
||||
/// after this method is called.
|
||||
void dispose() native 'Picture_dispose';
|
||||
|
||||
/// Returns the approximate number of bytes allocated for this object.
|
||||
///
|
||||
/// The actual size of this picture may be larger, particularly if it contains
|
||||
/// references to image or other large objects.
|
||||
int get approximateBytesUsed native 'Picture_GetAllocationSize';
|
||||
}
|
||||
|
||||
/// Records a [Picture] containing a sequence of graphical operations.
|
||||
|
||||
@ -18,7 +18,8 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Picture);
|
||||
|
||||
#define FOR_EACH_BINDING(V) \
|
||||
V(Picture, toImage) \
|
||||
V(Picture, dispose)
|
||||
V(Picture, dispose) \
|
||||
V(Picture, GetAllocationSize)
|
||||
|
||||
DART_BIND_ALL(Picture, FOR_EACH_BINDING)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user