a76620658b
In the linked bug, the 1px stroked rectangles would either be treated as a regular AA rectangle with full coverage interior, or as a subpixel rectangle that would have to calculate reduced coverage for the interior. The translations of the coordinates meant that floating point precision caused the <1px test to go one way or the other since these rectangles were exactly on the boundary. However, the subpixel coverage calculator, as-originally-implemented, suffered from being discontinuous right at 1px if the rectangle was rotated, so there'd be a noticeable pop in intensity of the shape when animating across the 1px boundary. This CL changes the subpixel coverage calculation to no longer be dependent on the orientation of the quadrilateral w/ respect to the pixel grid, and still be accurate when the shape is a rectangle. When it is an arbitrary quad, the approximation isn't geometrically correct but exhibits qualitatively good behavior. It also has the benefit of being much simpler code. Bug: chromium:1007154 Change-Id: I1e001e5d5d4e4f7a5e566e10855fd03eac613d07 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244504 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build_overrides | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
whitespace.txt |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.