Nikolay Sivov nsivov@codeweavers.com wrote:
I started by extending tests from patch 3/3, and I'm curious now how does your application create such bitmap?
Is it just ID2D1DeviceContext::CreateBitmap(D2D1_BITMAP_OPTIONS_CANNOT_DRAW | D2D1_BITMAP_OPTIONS_CPU_READ), or something more complicated?
How is this bitmap used later? Is it set to an image brush, and then used for fills?
The application first creates a bitmap with D2D1_BITMAP_OPTIONS_TARGET, then creates an image brush from it. Then the app creates another bitmap with D2D1_BITMAP_OPTIONS_CANNOT_DRAW | D2D1_BITMAP_OPTIONS_CPU_READ, copies contents from original bitmap with ::CopyFromBitmap() and then ::Map()s it with D2D1_MAP_OPTIONS_READ.