[PATCH v3 1/3] d2d1: Implement ID2D1Bitmap1::Map().

Dmitry Timoshkov dmitry at baikal.ru
Tue May 31 07:03:50 CDT 2022


Dmitry Timoshkov <dmitry at baikal.ru> wrote:

> Nikolay Sivov <nsivov at codeweavers.com> wrote:
> 
> > On 5/29/22 12:03, Dmitry Timoshkov wrote:
> > > Nikolay Sivov <nsivov at 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.
> > >
> > I see, makes sense. Please test with attached patches to see if this
> > path still works. Turns out there is no need to create a temporary resource.
> 
> Attached patches seem to work, Unmap() helper could be inlined though.
> Probably I should also note, that the patch to make an image brush work
> for bitmaps is still required for correct painting in my application.

Unfortunately further testing shows that with today's winehq.git my application
hangs on exit. Regression test points to

5e25a4546c812eb174d142a41c28cf83ef2b567e is the first bad commit
commit 5e25a4546c812eb174d142a41c28cf83ef2b567e
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun May 29 15:18:53 2022 +0300

    d2d1: Implement bitmap mapping.
    
    Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>

 dlls/d2d1/bitmap.c       | 72 +++++++++++++++++++++++++++++++++++++++++++++---
 dlls/d2d1/d2d1_private.h |  1 +
 dlls/d2d1/tests/d2d1.c   | 21 +-------------
 3 files changed, 70 insertions(+), 24 deletions(-)

Do you have an idea what might be the reason of the hang?

-- 
Dmitry.



More information about the wine-devel mailing list