Files
firefox/testing/web-platform/tests/css/css-paint-api
Xida Chen 24cce95b57 Bug 1564744 [wpt PR 17603] - [PW] Make PW canvas transform account for device scale factor, a=testonly
Automatic update from web-platform-tests
[PW] Make PW canvas transform account for device scale factor

Right now when the zoom-for-dsf feature is not enabled (currently on
Mac only), the recording canvas has its own logic to handle device
scale factor. Given an example, when we run chrome on Linux with
--force-device-scale-factor = 2, the transformation matrix for the
recording canvas has a scale of (2, 2). But when this is on Mac, the
transformation matrix has a scale of (1, 1). This causes a big problem
when call setTransform() canvas API because it changes the
transformation matrix in an unexpected way without accounting for the
device scale factor.

In this CL, we give the PaintRenderingContext2D a new member which
is specifically the device scale factor on a platform where the
zoom-for-dsf is not enabled. Then whenever a setTransform is called,
we need to account for the device scale factor.

Bug: 970783, 716231
Change-Id: Idaca018a9afab656f868079dd8dd9324327da4b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1682659
Reviewed-by: Stephen McGruer <[email protected]>
Reviewed-by: Fernando Serboncini <[email protected]>
Commit-Queue: Xida Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#674488}

--

wpt-commits: 6e93013acee5454f1a7313f42af409cf8bd46e65
wpt-pr: 17603
2019-07-24 13:32:54 +01:00
..