Drawing large images on iOS with colorspace transformations is slow. #16454
Labels
dependency: skia
Skia team may need to help us
platform-android
Android applications specifically
platform-ios
iOS applications specifically
On iOS, attempting to draw a very large image using a
SkCanvas::drawImageRect
call is extremely slow (400ms as shown in this trace for this reduced test case). The same call on Android is adequately fast.Investigation shows that an attempted colorspace conversion on iOS is extremely slow. This conversion happens as part of the
SkColorSpaceXformCanvas::onDrawImageRect
call. This call performs work to prepare an intermediate image which seems to incur a per frame texture copy initiated at this site. Preparing this new image is slow (taking 220ms of the 400ms slice) but is also followed by more writes to a buffer followed by a texture upload. This seems to happen per frame which exacerbates the issue.Note: A possible complicating factor could be that the source image is from a GrContext that is not the same as the rendering GrContext (but it is in the same underlying sharegroup). It is possible that the intermediate preparatory step does not result in caching as expected on iOS.
The text was updated successfully, but these errors were encountered: