This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment on attachment 438006[details]
Patch without dependencies (and so will fail EWS)
View in context: https://bugs.webkit.org/attachment.cgi?id=438006&action=review> Source/WebKit/Shared/cg/ShareableBitmapCG.cpp:46
> + CGColorSpaceRef colorSpace = configuration.colorSpace->platformColorSpace();
I was poking around after we discussed this, and it turns out there is some interesting SPI in CoreGraphics related to this that we might want to explore:
CGBitmapContextCreateForFlatteningImage()
I think we should ask the CoreGraphics folks if it would make sense for us to use it.
(In reply to Sam Weinig from comment #19)
> I was poking around after we discussed this, and it turns out there is some
> interesting SPI in CoreGraphics related to this that we might want to
> explore:
>
> CGBitmapContextCreateForFlatteningImage()
Nice find. It's doing similar work to find an appropriate color space that I'm doing in validateConfiguration, and avoids conversion in some more cases.
CGBitmapContextCreateForFlatteningImage() creates its own buffer for the bitmap, but ShareableBitmap needs to create the buffer in shared memory. So I am not sure we could use it as it stands, unless we're happy to use it just to find an appropriate bitmap configuration and color space, or if we draw to it then copy the data out afterwards into the shared memory.
If there were an API that could tell us the appropriate color space and bitmap configuration to use, that would be ideal. Although we would still need to teach ShareableBitmap about other bitmap configurations that it doesn't support right now (e.g. float components with non-extended range color spaces, CMYK, single channel grayscale) and store that in the ShareableBitmap::Configuration.
2021-09-05 22:18 PDT, Cameron McCormack (:heycam)
2021-09-07 22:14 PDT, Cameron McCormack (:heycam)
2021-09-07 22:56 PDT, Cameron McCormack (:heycam)
2021-09-07 23:27 PDT, Cameron McCormack (:heycam)
2021-09-08 00:08 PDT, Cameron McCormack (:heycam)
2021-09-09 03:38 PDT, Cameron McCormack (:heycam)
2021-09-09 19:06 PDT, Cameron McCormack (:heycam)
2021-09-09 20:38 PDT, Cameron McCormack (:heycam)
2021-09-10 00:10 PDT, Cameron McCormack (:heycam)
2021-09-10 00:12 PDT, Cameron McCormack (:heycam)
2021-09-10 17:01 PDT, Cameron McCormack (:heycam)
2021-09-10 17:02 PDT, Cameron McCormack (:heycam)
2021-09-12 18:41 PDT, Cameron McCormack (:heycam)
2021-09-12 18:42 PDT, Cameron McCormack (:heycam)
2021-09-12 19:23 PDT, Cameron McCormack (:heycam)
2021-09-12 19:23 PDT, Cameron McCormack (:heycam)
2021-09-16 15:55 PDT, Cameron McCormack (:heycam)
2021-09-16 16:09 PDT, Cameron McCormack (:heycam)
2021-09-16 16:25 PDT, Cameron McCormack (:heycam)