When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels.
Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered.
This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects.
This initial naive patch makes the transition, which allows these features to work. There is a lot of room for performance improvements.
It's likely that WebKit bitmaps should be handled more efficiently than this initial patch, and I look forward to DirectX experts to help me do so! (Help, Sony People!)
Created attachment 374809 [details]
This initial WIP patch is just to see if I broke WinCairo or AppleWin ports.
I would appreciate input from DirectX experts, though.
Created attachment 374824 [details]
Created attachment 374851 [details]
Created attachment 374855 [details]
Comment on attachment 374855 [details]
Clearing flags on attachment: 374855
Committed r247841: <https://trac.webkit.org/changeset/247841>
All reviewed patches have been landed. Closing bug.
It turns out that this change is horrible for performance (MotionMark dropped from ~200 down to 4).
I'll be backing a large portion of these changes out in a follow-up.