skia2/gyp
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
..
all.gyp Some final cleanups leading up to The Official Switch to Gyp 2011-06-07 14:48:41 +00:00
android_system.gyp Move the Android sample app into the android repo. 2011-11-04 13:00:18 +00:00
animator.gyp combine target_defaults.gypi into common.gypi 2011-07-01 17:16:26 +00:00
apptype_console.gypi Stop packaging command-line Mac tools as a bundle. 2011-08-15 19:22:39 +00:00
bench.gyp move ports into its own gyp file 2011-12-14 17:12:04 +00:00
bench.gypi add bench for shader+blitMask 2011-11-15 15:29:45 +00:00
common_conditions.gypi add first cut at arithmetic mode 2011-12-10 19:36:56 +00:00
common_variables.gypi Fix for missing file from previous CL that broke the build. 2011-11-03 13:13:27 +00:00
common.gypi Virtualize SkGLContext with subclasses SkNativeGLContext and SkMesaGLContext, allow both in gm 2011-10-19 20:43:20 +00:00
core.gyp Fix android build and cleanup references to SkMMapStream 2011-12-15 16:16:22 +00:00
effects.gyp add optional manual global initialization 2011-12-15 14:16:43 +00:00
experimental.gyp combine target_defaults.gypi into common.gypi 2011-07-01 17:16:26 +00:00
FileReaderApp.gyp move ports into its own gyp file 2011-12-14 17:12:04 +00:00
freetype.gyp add initial gyp to build freetype lib (problems with cflags not showing up in xcode) 2011-11-10 15:00:52 +00:00
gm.gyp move ports into its own gyp file 2011-12-14 17:12:04 +00:00
gmslides.gypi Modifying SkPath to store all verbs provided by the user, and to give 2011-12-20 15:14:18 +00:00
gpu.gyp Make GrGLShaderVar objects aware of whether they are uniform, varying, or 2011-12-08 14:44:10 +00:00
images.gyp Add windowscodecs.lib to images.gyp 2011-11-21 21:04:06 +00:00
iOSSampleApp.gyp move ports into its own gyp file 2011-12-14 17:12:04 +00:00
libtess.gyp Changes to the android gyp system to build without RTTI and exceptions. 2011-12-05 13:55:55 +00:00
opts.gyp Adding support to trunk for building Skia using the Android NDK. 2011-11-03 13:08:29 +00:00
pdf.gyp [PDF] Refactor SkPDFFont to enable font/cmap subsetting. 2011-07-25 22:34:12 +00:00
ports.gyp Fix android build and cleanup references to SkMMapStream 2011-12-15 16:16:22 +00:00
SampleApp.gyp move ports into its own gyp file 2011-12-14 17:12:04 +00:00
SimpleCocoaApp.gyp Switched Mac SampleApp to use Cocoa, removed the seperate CocoaSampleApp, moved dependencies out of experimental 2011-08-30 14:40:49 +00:00
svg.gyp combine target_defaults.gypi into common.gypi 2011-07-01 17:16:26 +00:00
tests.gyp move ports into its own gyp file 2011-12-14 17:12:04 +00:00
tools.gyp add optional manual global initialization 2011-12-15 14:16:43 +00:00
utils.gyp Add SkWGLExtensionInterface for dealing with WGL extensions 2011-12-01 16:34:28 +00:00
views.gyp Add support for building Android SampleApp. 2011-11-07 15:43:57 +00:00
xml.gyp Adding support to trunk for building Skia using the Android NDK. 2011-11-03 13:08:29 +00:00
xps.gyp Add xps device to skia. 2011-10-10 13:19:10 +00:00
zlib.gyp Add support for building Android SampleApp. 2011-11-07 15:43:57 +00:00