Go to file
Michael Ludwig a76620658b Improve subpixel coverage calculation for thin quads
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>
2019-09-26 16:42:36 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Revert "add guard to switch to SkPathTypes" 2019-09-14 19:13:44 +00:00
bin Add bin/try-clients to trigger client tryjobs 2019-06-11 16:55:53 +00:00
build_overrides Update to Dawn ToT. 2019-07-22 16:20:36 +00:00
dm Simplify GPUSink constructors by just passing the config object 2019-09-09 18:12:18 +00:00
docker Fix HOME directory in Docker containers built under cloudbuild. 2019-09-26 02:31:35 +00:00
docs/examples make rectcontour and nestedrects private 2019-09-13 00:17:49 +00:00
example Revert "add guard to switch to SkPathTypes" 2019-09-14 19:13:44 +00:00
experimental Add tests that loads mskp and changes frame. 2019-09-25 18:13:00 +00:00
fuzz added support for user-defined functions to GrSKSLFP 2019-09-20 17:13:57 +00:00
gm Revert "remove 'in uniform' support from GrSkSLFP, make rules more clear" 2019-09-26 16:04:26 +00:00
gn Restrict SkStrikeInterface to GPU and rename to SkStrikeForGPU 2019-09-26 16:06:48 +00:00
include Use safe computation for adding up YUVASizeInfo total bytes 2019-09-23 20:55:28 +00:00
infra Roll recipe dependencies (trivial). 2019-09-26 11:41:00 +00:00
modules [skottie] Add null sink option for skottie_tool 2019-09-26 16:11:14 +00:00
platform_tools android_gdbserver: Don't fail when trying to locate nonexistent files 2019-09-16 16:28:33 +00:00
resources Particles: Added particle flags for tracking state (one-time triggers, etc) 2019-09-25 15:58:09 +00:00
samplecode Revert "add guard to switch to SkPathTypes" 2019-09-14 19:13:44 +00:00
site Add comment explaining that using mirrors might break git cl. 2019-09-24 19:58:02 +00:00
specs [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
src Improve subpixel coverage calculation for thin quads 2019-09-26 16:42:36 +00:00
tests Check support for each GL format independently. 2019-09-26 16:30:46 +00:00
third_party Roll third_party/externals/angle2 6c4ff5ddab07..8be7a4c7f738 (12 commits) 2019-09-23 15:11:24 +00:00
tools When precompiling SkSL, avoid the need to re-link 2019-09-24 20:32:32 +00:00
.clang-format restore .clang-format 2019-03-21 15:52:32 +00:00
.clang-tidy add google-build-namespaces to clang-tidy checks 2018-12-12 16:33:59 +00:00
.gitignore clean up some .gitignores 2019-05-15 19:55:45 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Fix Metal includes breaking macOS local builds 2019-07-08 14:02:47 +00:00
BUILD.gn Move is_orientation_marker into its own file 2019-09-24 17:08:03 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll third_party/externals/angle2 ba04be8c9ef9..f703443b1f67 (6 commits) 2019-09-26 05:43:08 +00:00
go.mod Update Go deps 2019-09-26 05:24:27 +00:00
go.sum Update Go deps 2019-09-26 05:24:27 +00:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py rewrite_includes.py: make it work on windows 2019-08-05 16:14:35 +00:00
public.bzl remove SkPicture_none.cpp 2019-08-16 14:52:25 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt Set up prototype interface for MakeFromCAMetalLayer 2019-09-19 17:37:00 +00:00
whitespace.txt Whitespace test 2019-05-18 13:05:29 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.