Skip to content

Suggestion: expose the GetResourceCreationDeviceContext function for use in interop. #755

@benstevens48

Description

@benstevens48

This is a bit of a wish-list feature. I'm using interop of D2D with Win2D quite a lot, to facilitate use of creating image sources from WIC. I invariably find that I have to create a device context to create any D2D resources. It is quite awkward for me to create my own device context pool, because I have to handle the case where the device might be lost etc, and also it seems wasteful to create device contexts when Win2D already has a pool of them. I don't really know how expensive it is to create a device context, but if Win2D has a pool then it must involve some cost. Therefore it would be nice if there was a COM iterface similar to the interop interface that would allow calling GetResourceCreationDeviceContext for a CanvasDevice. My knowledge of COM is a bit hazy so I'm not sure how easy this would be to implement, but I imagine it would be fairly straightforward for someone who knows what they are doing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions