Bug 201391

Summary: [FTW] NativeImagePtr is drawn with invalid scaling
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit2Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, don.olmstead, Hironori.Fujii, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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]
Patch
Comment 3 WebKit Commit Bot 2019-09-02 14:37:12 PDT
Comment on attachment 377832 [details]
Patch

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
<rdar://problem/54956764>