New issue
Advanced search Search tips

Issue 1368 link

Starred by 5 users

Issue metadata

Status: Accepted
Owner: ----
Area: ----
NextAction: ----
Priority: Icebox
Type: Defect

Sign in to add a comment

antialiased stroke-rects that are thin draw wrong

Project Member Reported by, Jun 25 2013

Issue description

if the strokeSize is < 1 in antialaising, SkScan::AntiFrameRect may draw wrongly (potentially twice on the same pixels).

SkScan::AntiFrameRect wants to draw in 3 stages:
1. skim the outer rect of the frame, computing partial coverage
2. fill in the sides/top/bottom with solid depending on how thick the stroke is
3. skim the inner rect of the frame, computing partial coverage

For thin rects, #2 is correctly skipped, but we still do #1 AND #3. We need to detect when the stroke lies wholly within 1 pixel, and just skim it once, merging the coverage of the inner and outer rect.

Project Member

Comment 1 by, Dec 7 2015

Labels: Hotlist-Fixit
Project Member

Comment 2 by, Feb 26 2016

will investigate
Project Member

Comment 3 by, Sep 5

Project Member

Comment 4 by, Sep 5

Labels: -Priority-Medium Priority-Icebox
Owner: ----
Here's a better fiddle that shows the current result on CPU / GPU

(screen captures are attached in case the behavior changes)

Of note:
- raster at .3 .4 .5 .6 .7 look the same
- gpu at .3 .4 .5 .6 .7 have same geometry but different darkness
- raster at .7 flips artifacts compared to .8

Also, the original description may be no longer relevant.
Moving to icebox, since this is probably good enough for now.
1.8 KB View Download
2.3 KB View Download

Sign in to add a comment