If the underlying ImageBuffer of a GraphicsContext is a RemoteImageBufferProxy, ImageBuffer::createCompatibleBuffer() should create a RemoteImageBufferProxy. This will fix things like clipToDrawingCommands. This methods and its corresponding DisplayList items can be removed. The masking ImageBuffer will be remote. All the clipping commands will be recorded and sent to the GPUP. The caller in the WeP can just call clipToImageBuffer(). This will apply the drawing commands to the mask ImageBuffer in the GPUP. And then the masking ImageBuffer will be used to clip the original ImageBuffer.
Created attachment 429033 [details] Patch
Created attachment 429035 [details] Patch
<rdar://problem/78495380>
I am going to repurpose this bug for deleting the GraphicsContext::clipToDrawingCommands() and make it blocked by bug 235758.
Created attachment 450303 [details] Patch
Created attachment 450304 [details] Patch
Created attachment 450308 [details] Patch for review
Comment on attachment 450308 [details] Patch for review Need a new try that passes EWS
Created attachment 451506 [details] Patch
This patch is reverting the following revisions: r267742 r273291 r277715
Created attachment 451584 [details] Patch
(In reply to Said Abou-Hallawa from comment #11) > Created attachment 451584 [details] > Patch Forgot to remove the unused member RemoteDisplayListRecorder::m_maskImageBuffer.
Committed r289594 (247107@main): <https://commits.webkit.org/247107@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451584 [details].