-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
From @chinmaygarde
drawVertices and drawPoints has vertex buffers whose sizes can be appreciable (IIRC stuff like flare uses it extensively).
drawPath can have custom paths that may be large. There are path iterator APIs that you can use to walk an count the verbs and points. You should probably memoize the size here too.
All arguments that can take a paint may have a shader set on them. These shaders can reference images. In the same vein, shaders in dart:ui should also reference the correct size.
One thing I'm not clear on is whether approximateBytesUsed on SkPicture accounts for any of these - for example, I know it does not include image and font data, but it's not clear to me whether it includes vertex buffers or paths (I would expect it does include paths). At any rate, iterating paths for this purpose is probably more expensive than we want to be.
/cc @chinmaygarde @brianosman @mtklein @liyuqian who may know