mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
2f4b7dc2b9
This takes the bilinear interpolation code from Skia. It uses 4 bits of precision instead of 8. This lets it interpolate two components at a time because the results fit in 16 bits. The lower precision code is only used in the fallback code and not in any of the specialized code for NEON. This means pixman gives different results depending on the cpu which isn't great. However, this was easiest and the NEON code doesn't gain as much from using lower precision. Skia actually uses even lower interpolation when working with 565 but that's harder to plug in right now, and this gives a reasonable improvement.
41 lines
1.4 KiB
HTML
41 lines
1.4 KiB
HTML
<!--
|
|
Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/licenses/publicdomain/
|
|
|
|
Test painting patterns with scaling by background-size and
|
|
-moz-transform. background-repeat requires the construction
|
|
of a surface with the pattern contents, which will then be
|
|
scaled up by the transform / background-size. That's why we
|
|
need a threshold filter again.
|
|
-->
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<body style="margin:0; filter:url(#thresholdAt159);">
|
|
<div style="background: white; overflow: hidden;">
|
|
<div style="margin:20px 0px 20px 40px; width:40px; height:20px;
|
|
background:-moz-element(#p);
|
|
-moz-transform:scale(3);"></div>
|
|
<div style="width:120px; height:60px;
|
|
background:-moz-element(#p);
|
|
background-size:300%;"></div>
|
|
|
|
<svg>
|
|
<pattern id="p" patternUnits="userSpaceOnUse"
|
|
x="0" y="0" width="20" height="20">
|
|
<rect x="5" y="5" width="10" height="10" fill="black"></rect>
|
|
</pattern>
|
|
</svg>
|
|
|
|
<svg>
|
|
<filter id="thresholdAt159" color-interpolation-filters="sRGB">
|
|
<feComponentTransfer>
|
|
<feFuncR type="linear" slope="255" intercept="-159"/>
|
|
<feFuncG type="linear" slope="255" intercept="-159"/>
|
|
<feFuncB type="linear" slope="255" intercept="-159"/>
|
|
</feComponentTransfer>
|
|
</filter>
|
|
</svg>
|
|
</div>
|
|
</body>
|
|
</html>
|