Bug 247254 - UI-process mapped IOSurfaces are always tagged as sRGB
Summary: UI-process mapped IOSurfaces are always tagged as sRGB
Status: RESOLVED DUPLICATE of bug 247776
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Process Model (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-30 23:12 PDT by Simon Fraser (smfr)
Modified: 2023-04-06 16:47 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2022-10-30 23:12:32 PDT
static void recursivelyMapIOSurfaceBackingStore(CALayer *layer)
{
    if (layer.contents && CFGetTypeID((__bridge CFTypeRef)layer.contents) == CAMachPortGetTypeID()) {
        MachSendRight port = MachSendRight::create(CAMachPortGetPort((__bridge CAMachPortRef)layer.contents));
        auto surface = WebCore::IOSurface::createFromSendRight(WTFMove(port), WebCore::DestinationColorSpace::SRGB());
        layer.contents = surface ? surface->asLayerContents() : nil;
    }


DestinationColorSpace::SRGB!
Comment 1 Simon Fraser (smfr) 2022-10-30 23:19:35 PDT
Also:
                case RemoteLayerBackingStore::LayerContentsType::IOSurface: {
                    auto surface = WebCore::IOSurface::createFromSendRight(WTFMove(machSendRight), DestinationColorSpace::SRGB());
                    contents = surface ? surface->asLayerContents() : nil;
                    break;
Comment 2 Radar WebKit Bug Importer 2022-10-31 09:16:05 PDT
<rdar://problem/101760075>
Comment 3 Simon Fraser (smfr) 2023-04-06 16:47:47 PDT
Fixed in https://bugs.webkit.org/show_bug.cgi?id=247776

*** This bug has been marked as a duplicate of bug 247776 ***