Bug 226275 - #ifdef out transformToColorSpace() in ImageBuffer and subclasses to make it clear it is only needed for non-CG ports
Summary: #ifdef out transformToColorSpace() in ImageBuffer and subclasses to make it c...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-26 08:54 PDT by Sam Weinig
Modified: 2021-06-02 08:55 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2021-05-26 08:54:26 PDT
We currently have no-op implementations of transformToColorSpace() in ImageBuffer and its CG subclasses. I think we should make it clear it is not intended to work for CG by making it impossible to call via #ifdef.
Comment 1 Sam Weinig 2021-05-26 08:56:45 PDT
Really, we should have a better macro for this. Maybe ENABLE_IMAGE_BUFFER_SUPPORTS_COLOR_SPACE?
Comment 2 Sam Weinig 2021-05-26 09:05:23 PDT
ENABLE_IMAGE_BUFFER_SUPPORTS_COLOR_SPACE is not great, because it will be really confusing to see:

#if !ENABLE(IMAGE_BUFFER_SUPPORTS_COLOR_SPACE)
    maskerData->maskImage->transformToColorSpace(colorSpace);
#endif

Perhaps the real answer is that we need to replace transformToColorSpace() with something that makes it clear it is not really correct. Like a function that just does a getPixelBuffer -> colorSpace transformation > setPixelBuffer(), though that would obviously be less efficient so not a good idea.
Comment 3 Radar WebKit Bug Importer 2021-06-02 08:55:19 PDT
<rdar://problem/78765976>