[PATCH 1/2] d2d1: Implement GetSurface() for bitmaps.

Nikolay Sivov nsivov at codeweavers.com
Fri Sep 14 10:43:21 CDT 2018


On 09/14/2018 06:15 PM, Henri Verbeet wrote:

> On 14 September 2018 at 10:20, Nikolay Sivov <nsivov at codeweavers.com> wrote:
>> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
>> ---
>>   dlls/d2d1/bitmap.c       | 69 ++++++++++++++++++++++++----------------
>>   dlls/d2d1/d2d1_private.h | 12 +++++--
>>   dlls/d2d1/device.c       |  9 ++----
>>   dlls/d2d1/tests/d2d1.c   | 63 ++++++++++++++++++++----------------
>>   4 files changed, 90 insertions(+), 63 deletions(-)
>>
> This seems a little more complicated than it really needs to be. In
> d2d_bitmap_GetSurface(), can't you just do something like the
> following?
>
>      ID3D10ShaderResourceView_GetResource(bitmap->view, &resource);
>      ID3D10Resource_QueryInterface(resource, &IID_IDXGISurface, &surface);
Yes, that would be an alternative to separate surface pointer in bitmap 
structure. The problem is that this method is not supposed to always 
work. According to tests it only works for bitmaps created from DXGI 
target/device context. I can use some flag instead to indicate that if 
you think it's better.



More information about the wine-devel mailing list