On Tue Jun 10 10:01:39 2025 +0000, Zhiyi Zhang wrote:
I added tests for rendering such bitmaps. The results are a bit strange. On Windows, DrawBitmap() with such bitmaps created from CreateBitmapFromDxgiSurface() with subresource surfaces renders black. For example, see [draw_bitmap_from_dxgi_surface.txt](/uploads/da66fbd5c8ff33486fd63b38ac25b2d1/draw_bitmap_from_dxgi_surface.txt). DrawBitmap() with such bitmaps created from CreateSharedBitmap() with subresource surfaces does work on Windows. So, CreateBitmapFromDxgiSurface() on Windows doesn't create an SRV? On Wine, DrawBitmap() with bitmaps created from subresource surfaces with more than one subresource doesn't work. The color channels are all black. It looks like DrawBitmap() failed somehow. I checked d2d_resource_get_srv_desc(), and it seems fine. Thus, the problem must lie somewhere else. I've marked the rendering tests as todo_wine for now.
I think we need to figure out why they don't work. Using pattern that React Native uses as a start. If we can't render them and we should be able to, it doesn't matter if we can create bitmaps or not, the result won't be useful.