Bug 201391 - [FTW] NativeImagePtr is drawn with invalid scaling
Summary: [FTW] NativeImagePtr is drawn with invalid scaling
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
Keywords: InRadar
Depends on:
Reported: 2019-09-01 16:06 PDT by Brent Fulgham
Modified: 2019-09-02 14:38 PDT (History)
7 users (show)

See Also:

Patch (7.18 KB, patch)
2019-09-01 16:40 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2019-09-01 16:06:14 PDT
The current implementation of FTW applies horrible scaling factors to native images, resulting in blocky images (in some cases).

This patch corrects the handling of native images, and retrieves more data from the ImageDecoder's metadata system.
Comment 1 Brent Fulgham 2019-09-01 16:35:06 PDT
Also: The API that I was using to create BitmapRenderContexts overrode the screen DPI by passing the same size for the "logical dimensions" and the "pixel dimensions". This patch corrects that mistake.

We need to use this API (rather than letting Direct2D handle it) because our software image processing wants to work in 1x dimensions, so those code paths need to be able to supply matching pixel and logical dimensions.
Comment 2 Brent Fulgham 2019-09-01 16:40:32 PDT
Created attachment 377832 [details]
Comment 3 WebKit Commit Bot 2019-09-02 14:37:12 PDT
Comment on attachment 377832 [details]

Clearing flags on attachment: 377832

Committed r249414: <https://trac.webkit.org/changeset/249414>
Comment 4 WebKit Commit Bot 2019-09-02 14:37:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-09-02 14:38:17 PDT