skia2/samplecode
Hal Canary f107a2fd01 SkUTF
Create new header and namespace, `SkUTF` where we are putting all of our
robust, well documented UTF-8, UTF-16, and UTF-32 functions:
`SkUTF::{Count,Next,To}UTF{8,16,32}()`.

SkUTF.h and SkUTF.cpp do not depend on the rest of Skia and are suitable
for re-use in other modules.

Some of the old UTF-{8,16} functions still live in SkUtils.h; their use
will be phased out in future CLs.

Also added more unit testing and cleaned up old tests.

Removed functions that were unused outside of tests or used only once.

Change-Id: Iaa59b8705abccf9c4ba082f855da368a0bad8380
Reviewed-on: https://skia-review.googlesource.com/143306
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-07-31 20:11:19 +00:00
..
ClockFaceView.cpp rebase 2018-06-08 20:36:53 +00:00
DecodeFile.h use unique_ptr for codec factories 2017-07-25 15:35:23 +00:00
PerlinPatch.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
Sample2PtRadial.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleAAClip.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleAAGeometry.cpp SkTypes: more into SkMacros 2018-06-12 20:24:43 +00:00
SampleAARectModes.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleAARects.cpp one more path is rect bug 2018-04-10 14:17:21 +00:00
SampleAll.cpp remove unused SkRasterizer 2018-01-21 18:24:11 +00:00
SampleAndroidShadows.cpp Implement tilted concave ambient shadow 2018-06-14 19:09:44 +00:00
SampleAnimatedImage.cpp Simplify SkAnimatedImage 2018-01-30 18:46:35 +00:00
SampleAnimatedText.cpp Move internal calls from GrContext to GrContextPriv 2018-03-06 14:23:45 +00:00
SampleAnimator.cpp SkFontData to use smart pointers. 2016-09-16 06:24:20 -07:00
SampleAnimBlur.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleArc.cpp remove unused SkRasterizer 2018-01-21 18:24:11 +00:00
SampleAtlas.cpp Defer Sample setup to onOnceBeforeDraw. 2018-06-07 20:37:06 +00:00
SampleBigBlur.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleBigGradient.cpp turn on extended Clang warnings on Windows too 2017-12-04 19:29:51 +00:00
SampleBitmapRect.cpp Defer Sample setup to onOnceBeforeDraw. 2018-06-07 20:37:06 +00:00
SampleBlur.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleCamera.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleCCPRGeometry.cpp Remove clamping of kPlus with F16 configs 2018-07-11 14:30:58 +00:00
SampleChart.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleChineseFling.cpp Move internal calls from GrContext to GrContextPriv 2018-03-06 14:23:45 +00:00
SampleCircle.cpp Factor code to rotate a canvas about a point. 2016-07-12 15:01:19 -07:00
SampleClamp.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleClip.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
SampleClipDrawMatch.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleClock.cpp Add samples to Viewer. 2016-06-16 09:52:35 -07:00
SampleCode.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleCode.h SkMacros split from SkTypes.h 2018-06-12 18:39:33 +00:00
SampleColorFilter.cpp one more path is rect bug 2018-04-10 14:17:21 +00:00
SampleComplexClip.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
SampleConcavePaths.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleCowboy.cpp BUILD: build when !skia_use_expat 2018-03-22 20:28:45 +00:00
SampleDash.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleDegenerateTwoPtRadials.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
SampleDither.cpp one more path is rect bug 2018-04-10 14:17:21 +00:00
SampleEffects.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleEmboss.cpp Revert "Revert "make it illegal to include SkXfermode.h"" 2016-11-23 22:17:17 +00:00
SampleFatBits.cpp Some iwyu for tests which will otherwise break. 2018-03-14 21:07:15 +00:00
SampleFillType.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleFilter2.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleFilterFuzz.cpp Use MaskFilter to create SDFs for text. 2018-05-04 13:56:02 +00:00
SampleFilterQuality.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleFlutterAnimate.cpp Use int when possible to calculate atlas indices in shaders. 2018-01-26 13:54:54 +00:00
SampleFontCache.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleFontScalerTest.cpp Remove internal use of SkTypeface::Style. 2017-07-27 21:30:45 +00:00
SampleFuzz.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleGlyphTransform.cpp Set bounds correctly for color emoji that need post-cache transfoms 2018-06-01 18:31:47 +00:00
SampleGradients.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleHairCurves.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleHairline.cpp Revert "Revert "SkTypes: extract SkTo"" 2018-06-14 14:55:17 +00:00
SampleHairModes.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleHT.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleIdentityScale.cpp Revert "Revert "resources: remove most uses of GetResourcePath()"" 2017-12-09 01:27:50 +00:00
SampleLayerMask.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
SampleLayers.cpp Remove SkDrawFilter. 2018-07-12 02:36:44 +00:00
SampleLCD.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleLighting.cpp Restore SkLightingShader and associated classes 2018-07-17 17:24:50 +00:00
SampleLines.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleLitAtlas.cpp Restore SkLightingShader and associated classes 2018-07-17 17:24:50 +00:00
SampleLua.cpp Update SampleLua and lua files. 2018-05-22 15:51:25 +00:00
SampleManyRects.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleMeasure.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
SampleMegaStroke.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleNima.cpp renamed samplecode/Nima to samplecode/SampleNimaActor 2018-06-22 20:36:17 +00:00
SampleNimaActor.cpp renamed samplecode/Nima to samplecode/SampleNimaActor 2018-06-22 20:36:17 +00:00
SampleNimaActor.h renamed samplecode/Nima to samplecode/SampleNimaActor 2018-06-22 20:36:17 +00:00
SamplePatch.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePath.cpp Whitespace Fixup 2018-07-11 19:27:58 +00:00
SamplePathClip.cpp Stop using SkTSwap. 2018-06-19 02:06:31 +00:00
SamplePathEffects.cpp remove unused SkRasterizer 2018-01-21 18:24:11 +00:00
SamplePathFill.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
SamplePathFuzz.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePathOverstroke.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePathText.cpp include/private/SkTemplates: Cleanup bare pointers. 2018-04-24 19:13:56 +00:00
SamplePdfFileViewer.cpp Remove SkDumpCanvas 2018-03-10 03:29:54 +00:00
SamplePoints.cpp Revert "Revert "make it illegal to include SkXfermode.h"" 2016-11-23 22:17:17 +00:00
SamplePolyToPoly.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleQuadStroker.cpp Some iwyu for tests which will otherwise break. 2018-03-14 21:07:15 +00:00
SampleRectanizer.cpp SkUTF 2018-07-31 20:11:19 +00:00
SampleRegion.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleRepeatTile.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleShaders.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleShaderText.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleShadowColor.cpp Whitespace Fixup 2018-07-11 19:27:58 +00:00
SampleShadowReference.cpp Whitespace Fixup 2018-07-11 19:27:58 +00:00
SampleShadowUtils.cpp Whitespace Fixup 2018-07-11 19:27:58 +00:00
SampleShip.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleSlides.cpp remove unused SkRasterizer 2018-01-21 18:24:11 +00:00
SampleStringArt.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleStrokePath.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleStrokeRect.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleSubpixelTranslate.cpp Revert "Revert "resources: remove most uses of GetResourcePath()"" 2017-12-09 01:27:50 +00:00
SampleSVGFile.cpp BUILD: build when !skia_use_expat 2018-03-22 20:28:45 +00:00
SampleText.cpp Reland "Remove devKerning" 2018-05-02 15:15:08 +00:00
SampleTextAlpha.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleTextBox.cpp use SkShaper instead of SkTextBox 2018-02-10 18:34:37 +00:00
SampleTextOnPath.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextureDomain.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
SampleTiling.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleUnpremul.cpp SkUTF 2018-07-31 20:11:19 +00:00
SampleVertices.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleWritePixels.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleXfer.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleXfermodesBlur.cpp SkUTF 2018-07-31 20:11:19 +00:00
vertexdump.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00