commit | e32b0b7d22d8c2730498911b2d981e1dc6515a79 | [log] [tgz] |
---|---|---|
author | Florin Malita <fmalita@chromium.org> | Fri Dec 08 00:50:24 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Dec 08 00:50:24 2017 |
tree | b3b27497e10b206c3529029d929dbdb6210fce51 | |
parent | 19acb64ddb1e6258e4e39ac9a6f756815e620f03 [diff] |
Ensure that thin, aliased strokes are always rasterized Without anti-aliasing, thin strokes (device width < 1) may or may not raster, depending on their position relative to sample points. This is generally undesirable, and can be avoided with Skia's hairline stroke mode or by enabling anti-aliasing. This CL adds logic to detect subpixel aliased strokes at raster time, and adjust the paint on the fly to ensure that the stroke is visible. The implementation is based on a ScopedImageFlags refactoring: 1) rename to ScopedRasterFlags (more accurate, considering it already performs some non-image flags filtering) 2) get rid of instantiation preconditions - they are duplicated in in the ctor, as filter triggers 3) store a reference to the original flags and construct the modified flags lazily, only when/if needed 4) if no filtering is triggered/performed, return the original flags BUG=791111 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel Change-Id: I029efcf97be8a201d3224957a42c3394be6c272a Reviewed-on: https://chromium-review.googlesource.com/811606 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#522652}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .