aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkStroke.cpp
Commit message (Collapse)AuthorAge
...
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* #undef SK_IGNORE_QUAD_STROKE_FIX, to enable the fix for stroked quads.Gravatar reed@google.com2013-01-03
| | | | | | | | chrome may need to define this in preparation for rebaselining. git-svn-id: http://skia.googlecode.com/svn/trunk@6984 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-12-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6947 2bbb7eff-a529-9590-31e7-b0007b416f81
* disable (using build-flag) change in 6937 until I can figure out how to ↵Gravatar mike@reedtribe.org2012-12-24
| | | | | | | | | | rebaseline the self-test in gm/tests. git-svn-id: http://skia.googlecode.com/svn/trunk@6940 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix strokes for quadratics. #define SK_IGNORE_QUAD_STROKE_FIX toGravatar mike@reedtribe.org2012-12-24
| | | | | | | | retain the old behavior (i.e. for skia.gyp until we rebaseline) git-svn-id: http://skia.googlecode.com/svn/trunk@6937 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove legacy build-guards, now that webkit has rebaselined these.Gravatar reed@google.com2012-11-26
| | | | | | | | | | | | | | | | | | SK_DISABLE_FAST_AA_STROKE_RECT SK_IGNORE_FAST_BLURRECT SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX SK_IGNORE_CF_OPTIMIZATION SK_IGNORE_NEW_STROKERECT SK_DISABLE_GPU_BLUR SK_IGNORE_ROTATED_FREETYPE_FIX The changes should all be: remove code for #ifdef remove guard for #ifndef Review URL: https://codereview.appspot.com/6858073 git-svn-id: http://skia.googlecode.com/svn/trunk@6546 2bbb7eff-a529-9590-31e7-b0007b416f81
* add default: to fix warningGravatar reed@google.com2012-11-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6533 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix typo: must use modified join in case the miterlimit forces us to use bevelGravatar reed@google.com2012-11-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6530 2bbb7eff-a529-9590-31e7-b0007b416f81
* use direction from isRect in strokeRect, and only stroke if it is closedGravatar reed@google.com2012-11-21
| | | | | | Review URL: https://codereview.appspot.com/6846086 git-svn-id: http://skia.googlecode.com/svn/trunk@6528 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_IGNORE_NEW_STROKERECT guardGravatar reed@google.com2012-11-20
| | | | | | | | temp workaround for bug in isRect when I'm stroking and the rect isn't closed. git-svn-id: http://skia.googlecode.com/svn/trunk@6520 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix regression from 6510 -- respect kStrokeAndFill setting for stroked rectsGravatar reed@google.com2012-11-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6516 2bbb7eff-a529-9590-31e7-b0007b416f81
* add specialty strokeRect() to SkStroke, which can return much cleaner resultsGravatar reed@google.com2012-11-20
| | | | | | Review URL: https://codereview.appspot.com/6843093 git-svn-id: http://skia.googlecode.com/svn/trunk@6510 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't add circles on chopped cubicsGravatar reed@google.com2012-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4600 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change patheffect to take a (new) StrokeRec object, which encapsulates the fillGravatar reed@google.com2012-05-25
| | | | | | | | | | | | | | | | | | | or stroke parameters for a path. Today, the patheffect only sees if the caller was going to stroke or fill, and if stroke, it just sees the width. With this change, the effect can see all of the related parameters (e.g. cap/join/miter). No other change is intended at this time. After this change, I hope to use this additional data to allow SkDashPathEffect to, at times, apply the stroke as part of its effect, which may be much more efficient than first dashing, and then reading that and stroking it. Most of these files changed just because of the new parameter to filterPath. The key changes are in SkPathEffect.[h,cpp], SkPaint.cpp and SkScalerContext.cpp Review URL: https://codereview.appspot.com/6250051 git-svn-id: http://skia.googlecode.com/svn/trunk@4048 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 4046 -- GM:pathfill failed on one bot, maybe uninitialized memory ↵Gravatar reed@google.com2012-05-24
| | | | | | somewhere? git-svn-id: http://skia.googlecode.com/svn/trunk@4047 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change patheffect to take a (new) StrokeRec object, which encapsulates the fillGravatar reed@google.com2012-05-24
| | | | | | | | | | | | | | | | | | | or stroke parameters for a path. Today, the patheffect only sees if the caller was going to stroke or fill, and if stroke, it just sees the width. With this change, the effect can see all of the related parameters (e.g. cap/join/miter). No other change is intended at this time. After this change, I hope to use this additional data to allow SkDashPathEffect to, at times, apply the stroke as part of its effect, which may be much more efficient than first dashing, and then reading that and stroking it. Most of these files changed just because of the new parameter to filterPath. The key changes are in SkPathEffect.[h,cpp], SkPaint.cpp and SkScalerContext.cpp Review URL: https://codereview.appspot.com/6249050 git-svn-id: http://skia.googlecode.com/svn/trunk@4046 2bbb7eff-a529-9590-31e7-b0007b416f81
* Iter::next takes a bool (defaults to true for now) if we want to consume ↵Gravatar reed@google.com2012-05-16
| | | | | | | | | | degenerates. path-filling and stroking pass false, as they already are written to handle small segments (and it makes next() run 2x faster if you pass false). Review URL: https://codereview.appspot.com/6214049 git-svn-id: http://skia.googlecode.com/svn/trunk@3974 2bbb7eff-a529-9590-31e7-b0007b416f81
* pre allocate space for the result (guesstimation) so we don't spend extra timeGravatar reed@google.com2012-05-15
| | | | | | | | re-growing while we build the stroke. git-svn-id: http://skia.googlecode.com/svn/trunk@3934 2bbb7eff-a529-9590-31e7-b0007b416f81
* recreate http://codereview.appspot.com/6131051/ in svn instead of gitGravatar epoger@google.com2012-05-03
| | | | | | Review URL: https://codereview.appspot.com/6181044 git-svn-id: http://skia.googlecode.com/svn/trunk@3829 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SKPaint's defaults (that might be configurable) into a headerGravatar reed@google.com2012-02-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3280 2bbb7eff-a529-9590-31e7-b0007b416f81
* stroking wants CW, so we reverse if the orig was CCWGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3004 2bbb7eff-a529-9590-31e7-b0007b416f81
* restore (debugged) cheapComputeDirectionGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3000 2bbb7eff-a529-9590-31e7-b0007b416f81
* disable cheap check while its being debuggedGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2998 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath::cheapComputeDirection() plus unittestsGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2996 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath::reverseAddPath()Gravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2995 2bbb7eff-a529-9590-31e7-b0007b416f81
* preserve inverseness when strokingGravatar reed@google.com2011-12-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2916 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modifying SkPath to store all verbs provided by the user, and to giveGravatar schenney@chromium.org2011-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* can't assume (ever :( ) that a 2-ptr src will convexGravatar reed@google.com2011-10-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2562 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't assume a 2-point path is convex, unless its also not closedGravatar reed@google.com2011-10-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2561 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPoint::CanNormalize to unify decisions about when a vector is degenerateGravatar reed@google.com2011-09-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2236 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge with changes for GPU backendGravatar reed@android.com2010-12-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
* move xfermode modes from porterduff into xfermode itselfGravatar reed@android.com2009-06-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@232 2bbb7eff-a529-9590-31e7-b0007b416f81
* fallback to drawing a line if the cubic is still too curvy, even if we'veGravatar reed@android.com2009-06-17
| | | | | | | | | | | | | | | exhausted our recursive attempts to subdivide. Fixes trying to stroke this cubic (width==1.0) path.moveTo(460.2881309415525, 303.250847066498); path.cubicTo(463.36378422175284, 302.1169735073363, 456.32239330810046, 304.720354932878, 453.15255460013304, 305.788586869862); git-svn-id: http://skia.googlecode.com/svn/trunk@219 2bbb7eff-a529-9590-31e7-b0007b416f81
* API change: SkPath computeBounds -> getBoundsGravatar reed@android.com2009-04-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@140 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81