New issue
Advanced search Search tips

Issue 756823 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Components:
EstimatedDays: ----
NextAction: 2017-09-30
OS: ----
Pri: 2
Type: Feature


Sign in to add a comment

Implement straight skeleton (phase 2) in GrTessellator

Project Member Reported by senorblanco@chromium.org, Aug 18 2017

Issue description

Implement the partial straight skeleton algorithm (phase 2) to improve quality of thin paths with subpixel filled regions. This implements edge events, but not split events or chained edge events.
 
Blocking: 754612
Blocking: 754293
Blocking: 723980
The NextAction date has arrived: 2017-09-30
Blocking: 728070
Description: Show this description
Summary: Implement straight skeleton (phase 2) in GrTessellator (was: Implement straight skeleton (phase 3) in GrTessellator)
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f159ed2b600751818a80586bc958b34e04285c3

commit 3f159ed2b600751818a80586bc958b34e04285c3
Author: Stephen White <senorblanco@chromium.org>
Date: Tue Dec 19 22:02:30 2017

Add a new #ifdef to protect legacy Skia code.

An upcoming Skia path rendering change will affect some layout test
results. This ifdef temporarily protects us from that change.

Bug:  756823 
Change-Id: I5c1405112c648952ad3cc2088fb4a2209f09b26b
Reviewed-on: https://chromium-review.googlesource.com/834715
Reviewed-by: Brian Salomon <bsalomon@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525152}
[modify] https://crrev.com/3f159ed2b600751818a80586bc958b34e04285c3/skia/config/SkUserConfig.h

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 21 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/e260c46bbfe0e15e5b3d4a964484cc07b161b59a

commit e260c46bbfe0e15e5b3d4a964484cc07b161b59a
Author: Stephen White <senorblanco@chromium.org>
Date: Thu Dec 21 20:51:27 2017

GrTessellator: implement straight skeleton, phase 2.

This CL implements two major changes to the AA tessellating path
renderer:

1) Fix inverted edges after stroke and simplify. Instead of detecting
   and fixing edges which invert on stroking during the stroking pass, we
   run the full simplify pass on both inner and outer contours, then
   create edge collapse events for the overlap regions. We then process
   the edge events in a priority queue and process them in order of decreasing
   alpha (this is the "edge event" part of the straight skeleton
   algorithm). By doing it after simplification, we ensure that
   there's a full-alpha intersection vertex to join the collapse edge
   to (which may have <1 alpha), so no spurious gradients appear in
   the rendered path.

2) "Pointy" vertices (defined as those which meet at an acute angle less
   than 14 degrees) are now properly bevelled off during stroking.
   This removes antialiasing artifacts which extend beyond the path
   boundary.

Some ancillary changes:

The extracted boundaries which are input to stroking have their line
equations pre-normalized, and multiplied by winding.  This simplifies
a lot of code which was performing this computation on the fly.

The workaround for the "intruding vertex" problem was removed, since the
straight skeleton now moves the intruding vertex before it can cause
problems.

Bug:  756823 
Change-Id: I271ed32be6847da55273b387e8c04bbf9b512b70
Reviewed-on: https://skia-review.googlesource.com/87341
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>

[modify] https://crrev.com/e260c46bbfe0e15e5b3d4a964484cc07b161b59a/tests/TessellatingPathRendererTests.cpp
[modify] https://crrev.com/e260c46bbfe0e15e5b3d4a964484cc07b161b59a/src/gpu/GrTessellator.cpp

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e4d6d0b50ec2e40aabe6a8c9928f512101771bb1

commit e4d6d0b50ec2e40aabe6a8c9928f512101771bb1
Author: Stephen White <senorblanco@chromium.org>
Date: Tue Jan 02 17:16:48 2018

Enable new edge inversion handling in Skia.

Remove the GR_TESSELLATOR_LEGACY_INVERSION_HANDLING #ifdef.
This enables the partial straight skeleton (phase 2) in Skia.

BUG= 756823 , 754612 , 754293 , 723980 , 728070 

Change-Id: I70b4daef016dc950002cb0e98073bc90696b2ab9
Reviewed-on: https://chromium-review.googlesource.com/843082
Reviewed-by: Brian Salomon <bsalomon@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526496}
[modify] https://crrev.com/e4d6d0b50ec2e40aabe6a8c9928f512101771bb1/skia/config/SkUserConfig.h
[add] https://crrev.com/e4d6d0b50ec2e40aabe6a8c9928f512101771bb1/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-arc-circumference-fill-expected.png
[add] https://crrev.com/e4d6d0b50ec2e40aabe6a8c9928f512101771bb1/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-ellipse-circumference-fill-expected.png
[modify] https://crrev.com/e4d6d0b50ec2e40aabe6a8c9928f512101771bb1/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-arc-circumference-fill-expected.png
[modify] https://crrev.com/e4d6d0b50ec2e40aabe6a8c9928f512101771bb1/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-ellipse-circumference-fill-expected.png
[delete] https://crrev.com/5b2de20541d2b08bf64e81804b538eb4d03a4e21/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-arc-circumference-fill-expected.png
[delete] https://crrev.com/5b2de20541d2b08bf64e81804b538eb4d03a4e21/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-ellipse-circumference-fill-expected.png

Status: Fixed (was: Assigned)
Fixed as of crrev.com/526496 above.

Sign in to add a comment