BitmapImage::drawPattern() uses ImageOrientation::Orientation::FromImage when using the current ImageFrame to draw the pattern. We end up calling BitmapImageSource::preTransformedNativeImageAtIndex() via other calls. After 276827@main, this function checks if (orientation == ImageOrientation::Orientation::None && size == sourceSize) return nativeImage; Before resolving the orientation if FromImage is passed. We then resolve the image orientation. if (orientation == ImageOrientation::Orientation::FromImage) orientation = frameOrientationAtIndex(index); We then draw the current ImageFrame to a temporary ImageBuffer then we sink the drawn the ImageBuffer to a new NativeImage. This step is not needed if image orientation is TopLeft. We can just return the original image frame.
<rdar://problem/125731142>
Pull request: https://github.com/WebKit/WebKit/pull/26688
Committed 276902@main (34d1f9aabb7b): <https://commits.webkit.org/276902@main> Reviewed commits have been landed. Closing PR #26688 and removing active labels.