남세현
unread,Aug 12, 2023, 6:54:33 AM8/12/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-discuss
Hello. I am trying to draw a lot of images using CanvasKit for purposes such as creating an image editor or a browser. I am encountering a phenomenon where the performance suddenly drops when opening many images and using MipMaps.
The slowdown seems to start when the number of images being drawn on the screen reaches around 20, and the total number of pixels reaches approximately 51,497,487 pixels. Both the FilterMode and MipMap are set to Linear, and all images are loaded as Web ImageBitmap using MakeLazyImageFromTextureSource. The size of the images is around 2000 x 1000.
It was fine when there were 14 full-color JPG images and 5 grayscale PNG images.
However, when the number of PNG images increased, the slowdown issue occurred.
When there were 0 JPG images and 42 grayscale PNG images, there was no slowdown at all.
Disabling MipMaps also resolves the issue.
Considering that grayscale images don't cause slowdowns and that turning off MipMaps also resolves the problem, it seems that the issue might not be solely related to the number of image pixels. Could you please advise what might be the problem?
I understand MipMaps as a feature that creates thumbnails, so I thought enabling MipMaps would reduce the load and help render a large number of images. Am I misunderstanding? Do I need to manually create thumbnails and cache them for use?