CoreImage performance is worse than Software path when the image size is less than 250x250px, so a fallback logic based on the size of the image is needed to determine the right time to select CoreImage path or the software path
<rdar://problem/67968396>
Created attachment 408487 [details] Patch
Created attachment 408488 [details] Patch
Created attachment 408489 [details] Renderer using both CoreImage path and software path causes artifacts
This current patch doesn't work when the window goes into background, where it starts to render in multiple smaller tiles. As shown in the video, the two tiles on the right is rendered with wrong contents. The cause is that, the decision of whether or not taking CoreImage path is on the per tile level (each tile will have its own CSS filter) and there will be cases where part of the large element is rendered using CoreImage path (with IOSurface), and other parts are rendered using software path (with CGBitmap image buffer).