Bug 271977

Summary: REGRESSION (276827@main): When drawing a pattern, get the oriented image frame only if the orientation is not TopLeft
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: ImagesAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=265363
Bug Depends on:    
Bug Blocks: 265363    

Said Abou-Hallawa
Reported 2024-04-01 11:43:27 PDT
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.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-04-01 12:10:16 PDT
Said Abou-Hallawa
Comment 2 2024-04-01 12:28:33 PDT
EWS
Comment 3 2024-04-01 14:36:15 PDT
Committed 276902@main (34d1f9aabb7b): <https://commits.webkit.org/276902@main> Reviewed commits have been landed. Closing PR #26688 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.