Go to file
schenney@chromium.org 4da06ab335 Modifying SkPath to store all verbs provided by the user, and to give
correct results for all stroke and fill modes even on the various types
of degenerate paths.

The goals of this patch include:
1. Have Skia store all of the verbs implied by path construction methods, even
if those define degenerate paths. The SVG implementation in WebKit, which is
backed by Skia, needs to know about all elements of the path, even degenerate
ones, for the correct drawing of markers and line caps. For example, in SVG you
should be able to draw a scatter plot by specifying a marker for vertices and
then giving a sequence of moveTo commands. Skia will not store the moveTos,
requiring a different storage mechanism.

2. Assuming 1, maintain the current Skia behavior. That is, make Skia robust to
degenerate paths.

3. Fix an existing bug in Skia where a degenerate moveTo-lineTo pair spits out
warnings from rasterization and produces incorrect results in inverse-fill
renderings.

4. Adds extensive testing for degenerate paths and path rendering in general.

To meet these goals, the patch I am proposing will result in minor additional
storage for degenerate paths (a few bytes per degenerate path, only if the user
defines such paths). There is also some additional overhead in the iteration
code, with the path now cleaned to remove degenerate segments as part of the
iteration process. I suspect this will also fix issues with computing normal
vectors to degenerate segments. Benchmarking suggests that this change may
result in slightly (< 1%) slower path drawing due to the checks for
degeneracy. This overhead could be removed (in fact, a significant speedup
could occur) if the results of iterating to clean up the path were cached.
This would cost memory, of course, and quite a bit of it.

BUG=398
TEST=tests/PathTest.cpp
     gm/cubicpaths.cpp
     gm/degeneratesegments.cpp
     gm/movepaths.cpp
     gm/linepaths.cpp
     gm/quadpaths.cpp
Review URL: http://codereview.appspot.com/5482051

git-svn-id: http://skia.googlecode.com/svn/trunk@2901 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-12-20 15:14:18 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Make null gl a top level config in bench 2011-12-13 16:49:49 +00:00
experimental [GPU] Add explicit byte order and PM vs. UPM 8888 configs 2011-11-07 15:54:49 +00:00
forth Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
gm Modifying SkPath to store all verbs provided by the user, and to give 2011-12-20 15:14:18 +00:00
gyp Modifying SkPath to store all verbs provided by the user, and to give 2011-12-20 15:14:18 +00:00
include Modifying SkPath to store all verbs provided by the user, and to give 2011-12-20 15:14:18 +00:00
obsolete Move SkGLCanvas.h to obsolete, delete from gyp 2011-12-01 15:47:23 +00:00
samplecode Fix int->float conversion warning in VS2010 2011-12-12 18:34:01 +00:00
src Modifying SkPath to store all verbs provided by the user, and to give 2011-12-20 15:14:18 +00:00
tests Modifying SkPath to store all verbs provided by the user, and to give 2011-12-20 15:14:18 +00:00
third_party [Committed on behalf of scottmg@chromium.org] 2011-08-10 17:49:41 +00:00
tools Make update-doxygen.sh upload docs to http://code.google.com/p/skia-autogen 2011-12-07 18:52:40 +00:00
unix_test_app Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
DEPS Roll gyp and add librarian settings (now supported). 2011-10-03 19:36:51 +00:00
Doxyfile Create update-doxygen script that generates and uploads docs 2011-12-06 14:52:38 +00:00
gyp_skia gyp DEPS roll, and remove no-longer-needed msvs_abspath_output flag 2011-08-15 19:53:17 +00:00
LICENSE Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.bat Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.py Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
Makefile Stop packaging command-line Mac tools as a bundle. 2011-08-15 19:22:39 +00:00
Makefile.old Higher resolution timers for bench. 2011-06-07 19:16:02 +00:00
README whitespace commit to trigger buildbot 2011-07-15 14:11:58 +00:00
skia.gyp Some final cleanups leading up to The Official Switch to Gyp 2011-06-07 14:48:41 +00:00
whitespace.txt whitespace change to tri 2011-12-20 14:34:31 +00:00

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

See full details, and build instructions, at http://code.google.com/p/skia/wiki/DocRoot