mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 22:05:40 +00:00
c832680e15
We are running into rasterization inaccuracies here. This test draws green circles on a green rectangle and assumes that the result will be solid green. Here's what happens with D2D: D2D computes coverage values in floating point so assume that we get a coverage of about 0.112399 or 0.112399*255 == 28.6 green (128/255 == 0.50196) is multiplied by the coverage to get 0.0564702 or .0564702*255 == 14.39 the results of the pixel shader get rounded before blending. So we get (r=0,g=14,b=0,a=29) blending this OVER green gives: 14+(255-29)*128/255 == 127 instead of 128. This doesn't happen with other backends because they typically use integer coverage amounts. We fix it by using ' ' instead of '.'