Bug 254202 - [GPU Process] REGRESSION (261700@main): Various "css-backgrounds/background-size-" tests fail with pixel differences
Summary: [GPU Process] REGRESSION (261700@main): Various "css-backgrounds/background-s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-21 01:19 PDT by Said Abou-Hallawa
Modified: 2023-03-21 12:34 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2023-03-21 01:19:28 PDT
There is a slight difference between a frame decoded using CGImageSourceCreateImageAtIndex() and a frame decode using CGImageSourceCreateThumbnailAtIndex(). A thumbnail frame has to be decoded for a certain size which is called sizeForDrawing.

The test page draws a tiled background-image by calling BitmapImage::drawPattern() which ends up calling CGImageSourceCreateImageAtIndex().
The expected page draws an HTMLImageElements by calling BitmapImage::draw() which ends up calling CGImageSourceCreateThumbnailAtIndex().

The fix is to switch back to use CGImageSourceCreateImageAtIndex() for small images. This way we can ensure the image is decoded the same way for both the test and the expected pages.
Comment 1 Said Abou-Hallawa 2023-03-21 01:19:54 PDT
rdar://106952740
Comment 2 Said Abou-Hallawa 2023-03-21 01:25:17 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11750
Comment 3 EWS 2023-03-21 12:33:59 PDT
Committed 261932@main (ff57fe9af291): <https://commits.webkit.org/261932@main>

Reviewed commits have been landed. Closing PR #11750 and removing active labels.