Skip to content

Reuse existing handles when drawing image at size #479

@HeikoKlare

Description

@HeikoKlare

The Windows implementation for GC#drawImage(Image, destX, destY, destWidth, destHeight) uses Image capabilities to draw at a specific size in the best available quality since:

This takes into account the ability to directly load the image at the desired size (from SVG or ImageDataAtSizeProvider). If that's not possible, it loads the image data at the best fitting size (i.e, for the best fitting zoom) and creates a temporary handle for that image data.
There might, however, be an "ordinary" handle for the image at that zoom may already exist. In that case, this handle should be reused instead of loading image data again and creating another handle unnecessarily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

    Type

    No type

    Projects

    Status

    👀 In Review

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions