skia2/include/core
Mike Reed c924a88e33 SkPath::shrinkToFit() needs to perform copy-on-write
When we shrink a path, we might relocate its underlying arrays.
Doing so would invalidate any outstanding Iterators. The caller must
handle this for its path object, but there may be copies elsewhere,
which have just ref'd the underlying arrays. To keep these copys'
iterators alive, we defensively "copy-on-write", so as to not relocate
their buffers.

Incidentally, update SkContourMeasureIter's constructor to clarify that
it is iterating through its copy of the path, and not the original.

Change-Id: I5c9331ab36ac8e156218532478f6d7105fd97cdc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326438
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-10-14 20:24:11 +00:00
..
SkAnnotation.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkBBHFactory.h Fix clang 12 Wsuggest-override and Wsuggest-destructor-override 2020-07-22 01:11:36 +00:00
SkBitmap.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkBlendMode.h remove enum docs 2020-02-11 21:43:07 +00:00
SkBlurTypes.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkCanvas.h Revert "Remove GrContext" 2020-10-14 18:30:13 +00:00
SkCanvasVirtualEnforcer.h remove legacy virtual from enforcer 2020-03-13 14:57:03 +00:00
SkClipOp.h Update SkClipOp::kMax_EnumValue to match non-deprecated values 2020-09-28 15:30:33 +00:00
SkColor.h Add getter for channels to GrBackendFormat 2020-04-08 19:54:27 +00:00
SkColorFilter.h [skottie] Add support for invert/YIQ 2020-09-11 14:55:44 +00:00
SkColorPriv.h Remove SkScalarClampMax and SkScalarPin 2020-02-06 18:29:51 +00:00
SkColorSpace.h Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
SkContourMeasure.h [canvaskit] Flesh out remaining docs for core CanvasKit. 2020-10-05 11:47:40 +00:00
SkCoverageMode.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkCubicMap.h [skottie] De-dupe sequential cubic mappers 2019-07-17 17:14:46 +00:00
SkData.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkDataTable.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkDeferredDisplayList.h Require a direct context to precompile a DDL's programs 2020-08-14 14:35:41 +00:00
SkDeferredDisplayListRecorder.h Rename GrMipMapped GrMipmapped 2020-07-21 14:06:35 +00:00
SkDocument.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkDrawable.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkDrawLooper.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkEncodedImageFormat.h GOOGLE3 -> SK_BUILD_FOR_GOOGLE3 2017-12-19 14:42:16 +00:00
SkExecutor.h Allow SkThreadPool to be non-borrowing 2020-04-23 16:11:28 +00:00
SkFilterQuality.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFlattenable.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkFont.h split transformed mask from SDFT 2020-07-26 16:59:44 +00:00
SkFontArguments.h Remove SkFontArguments::Axis. 2020-07-15 20:59:22 +00:00
SkFontLCDConfig.h Reland "Remove use of legacy display globals." 2020-10-05 19:13:58 +00:00
SkFontMetrics.h SkCustomTypefaceBuilder to set SkFontStyle 2020-08-19 00:09:55 +00:00
SkFontMgr.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkFontParameters.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFontStyle.h Wsign-conversion for public headers 2020-06-02 12:34:54 +00:00
SkFontTypes.h Remove SkTextEncoding and SkFontHinting macros. 2019-05-22 20:44:28 +00:00
SkGraphics.h add SkGraphics::AllowJIT() 2020-08-06 14:38:26 +00:00
SkICC.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkImage.h Revert "Remove GrContext" 2020-10-14 18:30:13 +00:00
SkImageEncoder.h Revert "add runtime registration for encoders" 2019-05-15 22:02:39 +00:00
SkImageFilter.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkImageGenerator.h Reland "Add idea of DataType to SkYUVAPixmapInfo." 2020-09-03 18:05:17 +00:00
SkImageInfo.h Add several more values to SkYUVColorSpace 2020-07-24 18:49:10 +00:00
SkM44.h Add rc accessor method to SkMatrix. 2020-09-22 21:32:20 +00:00
SkMallocPixelRef.h Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
SkMaskFilter.h remove unused maskfilter helpers: Combine, Compose 2020-05-05 19:10:00 +00:00
SkMath.h impl SkMulDiv255Round with SkMul16ShiftRound 2020-09-09 17:01:17 +00:00
SkMatrix44.h Revert "transition matrix44 to opt-in only" 2020-04-16 10:01:29 +00:00
SkMatrix.h Reland "Allow rect and circle blur fast cases to be used with rotation matrices." 2020-09-24 21:33:44 +00:00
SkMilestone.h Update Skia milestone to 88 2020-10-01 21:26:03 +00:00
SkOverdrawCanvas.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkPaint.h [canvaskit] Add docs/types for Paint and Filters/Effects 2020-10-05 11:46:38 +00:00
SkPath.h SkPath::shrinkToFit() needs to perform copy-on-write 2020-10-14 20:24:11 +00:00
SkPathBuilder.h use pathbuilder 2020-09-09 12:43:00 +00:00
SkPathEffect.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkPathMeasure.h [canvaskit] Flesh out remaining docs for core CanvasKit. 2020-10-05 11:47:40 +00:00
SkPathTypes.h Move convexity enum out of public 2020-08-30 13:04:22 +00:00
SkPicture.h pass 'nested' bool to approximateOpCount 2020-08-19 16:45:53 +00:00
SkPictureRecorder.h Revert "Remove GrContext" 2020-10-14 18:30:13 +00:00
SkPixelRef.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkPixmap.h Wsign-conversion for public headers 2020-06-02 12:34:54 +00:00
SkPngChunkReader.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkPoint3.h Add clipping for perspective triangles 2019-12-17 23:24:18 +00:00
SkPoint.h Test texture domain effect with local matrix. 2019-11-22 22:37:33 +00:00
SkPromiseImageTexture.h Return GrBackendTexture from SkPromiseImageTexture by value. 2020-09-30 19:50:03 +00:00
SkRasterHandleAllocator.h use std::make_unique 2019-12-12 22:32:45 +00:00
SkRect.h Remove SkMin32/SkMax32 2020-02-06 17:31:51 +00:00
SkRefCnt.h Make GrSurfaceProxy ref counts thread safe. 2019-10-24 19:55:23 +00:00
SkRegion.h remove enum docs 2020-02-11 21:43:07 +00:00
SkRRect.h Fix special case in SkRRect::setOval where the oval devolves to a rect 2020-10-14 17:44:51 +00:00
SkRSXform.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRWBuffer.h Fix clang 12 Wsuggest-override and Wsuggest-destructor-override 2020-07-22 01:11:36 +00:00
SkScalar.h Format and comment SkScalarInterpFunc 2020-08-26 20:50:34 +00:00
SkSerialProcs.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkShader.h Revert "Remove GrContext" 2020-10-14 18:30:13 +00:00
SkSize.h Remove GrSurfaceDesc 2020-02-07 19:48:13 +00:00
SkStream.h Add SkFILEStream constructor which takes a size. 2020-09-11 19:50:24 +00:00
SkString.h Use SkScalar type where appropriate. 2020-07-28 20:13:37 +00:00
SkStrokeRec.h Relax SkStrokeRec::hasEqualEffect 2020-09-15 20:05:40 +00:00
SkSurface.h Revert "Remove GrContext" 2020-10-14 18:30:13 +00:00
SkSurfaceCharacterization.h Add GrInternalSurfaceFlag for vulkan input attachment. 2020-08-27 20:05:29 +00:00
SkSurfaceProps.h Reland "Remove use of legacy display globals." 2020-10-05 19:13:58 +00:00
SkSwizzle.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTextBlob.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkTileMode.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTime.h Remove SK_REQUIRE_LOCAL_VAR macro. 2020-07-31 02:32:01 +00:00
SkTraceMemoryDump.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTypeface.h Add SkTypeface::getPostScriptName. 2020-10-06 15:35:06 +00:00
SkTypes.h [fuzz] Add libfuzzer binaries to BUILD.gn 2020-09-15 14:52:02 +00:00
SkUnPreMultiply.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkVertices.h Enable ClangTidy check readability-const-return-type. 2020-08-07 17:42:38 +00:00
SkYUVAIndex.h Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
SkYUVAInfo.h Expand SkYUVAInfo::PlanarConfig/SkYUVAPixmapInfo::DataType values. 2020-09-18 20:43:12 +00:00
SkYUVAPixmaps.h Expand SkYUVAInfo::PlanarConfig/SkYUVAPixmapInfo::DataType values. 2020-09-18 20:43:12 +00:00
SkYUVASizeInfo.h A new way to specify YUVA planar data from SkCodec to SkImage_Lazy 2020-08-24 14:25:32 +00:00