skia2/samplecode
Cary Clark 992c7b03ef Add standard fonts to all GMs.
Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

  sk_tool_utils::set_portable_typeface or
  sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

BUG=skia:2687
R=mtklein@google.com

Review URL: https://codereview.chromium.org/407183003
2014-07-31 08:58:44 -04:00
..
ClockFaceView.cpp Builder class for SkLayerRasterizer. 2014-02-26 13:27:37 +00:00
GMSampleView.h DM: also run benches once. 2014-02-26 23:01:57 +00:00
OverView.cpp Removes uses of unnamed namespace from samplecode. 2013-09-13 12:39:55 +00:00
OverView.h Add a header for OverView.cpp as well. 2012-09-18 01:52:20 +00:00
Sample2PtRadial.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:19:56 +00:00
SampleAAClip.cpp replace SkBitmap::Config with SkColorType in gms 2014-02-17 21:21:46 +00:00
SampleAARectModes.cpp Move SkShader::fLocalMatrix into SkShader constructor. 2014-04-28 14:55:39 +00:00
SampleAARects.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleAll.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
SampleAnimatedGradient.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleAnimator.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleAnimBlur.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
SampleApp.cpp Add standard fonts to all GMs. 2014-07-31 08:58:44 -04:00
SampleApp.h Port SampleApp to SkCommandLineFlags. 2014-06-19 14:18:56 -07:00
SampleArc.cpp remove SkFloatToScalar macro 2013-11-25 19:44:07 +00:00
SampleAvoid.cpp Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
SampleBigBlur.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
SampleBigGradient.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleBitmapRect.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleBlur.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
SampleBox.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleCamera.cpp Move SkShader::fLocalMatrix into SkShader constructor. 2014-04-28 14:55:39 +00:00
SampleChart.cpp Removes uses of unnamed namespace from samplecode. 2013-09-13 12:39:55 +00:00
SampleCircle.cpp add peekPixels to SkCanvas and SkSurface 2014-02-13 17:14:46 +00:00
SampleClamp.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleClip.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
SampleClock.cpp Add Clock Sample. 2013-09-17 19:52:05 +00:00
SampleCode.h remove SkBounder -- unused and unloved 2014-06-03 10:54:00 -07:00
SampleColorFilter.cpp Move SkShader::fLocalMatrix into SkShader constructor. 2014-04-28 14:55:39 +00:00
SampleComplexClip.cpp fix more 64bit warnings 2014-01-27 13:42:58 +00:00
SampleConcavePaths.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleCull.cpp deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients 2013-12-17 19:22:07 +00:00
SampleDash.cpp Move SkShader::fLocalMatrix into SkShader constructor. 2014-04-28 14:55:39 +00:00
SampleDegenerateTwoPtRadials.cpp remove remaining references to Sk64 (obsolete) 2014-01-13 14:53:55 +00:00
SampleDither.cpp add new copyTo version to SkBitmap, which takes SkColorType 2014-02-23 03:59:35 +00:00
SampleDitherBitmap.cpp Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/) 2014-04-11 17:15:40 +00:00
SampleDraw.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleEffects.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
SampleEmboss.cpp remove unused Kernel33MaskFilter 2014-05-12 13:35:55 +00:00
SampleEmptyPath.cpp Clean up SkTypes.h. 2013-10-11 18:50:45 +00:00
SampleEncode.cpp hide discardable factory from public imagegenerator api 2014-05-27 14:14:22 +00:00
SampleFatBits.cpp re-land hide get/setLocalMatrix 2014-05-12 20:42:21 +00:00
SampleFillType.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleFilter2.cpp hide Config in SkImageDecoder -- use SkColorType instead 2014-06-12 17:40:00 -07:00
SampleFilter.cpp hide SkBitmap::Config entirely (behind a flag) 2014-06-17 08:38:31 -07:00
SampleFilterFuzz.cpp Remove the single-sigma version of SkDropShadowImageFilter::Create(). 2014-07-22 12:49:25 -07:00
SampleFontCache.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleFontScalerTest.cpp remove SkFloatToScalar macro 2013-11-25 19:44:07 +00:00
SampleFuzz.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
SampleGradients.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
SampleHairCurves.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
SampleHairline.cpp Revert "Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)" 2014-05-29 15:57:20 +00:00
SampleHairModes.cpp Move SkShader::fLocalMatrix into SkShader constructor. 2014-04-28 14:55:39 +00:00
SampleLayerMask.cpp Reduce internal explicit SaveFlags usage. 2014-04-18 14:19:31 +00:00
SampleLayers.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
SampleLCD.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleLines.cpp remove unused Kernel33MaskFilter 2014-05-12 13:35:55 +00:00
SampleLua.cpp add drawImage to lua 2013-06-11 02:20:28 +00:00
SampleManyRects.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
SampleMeasure.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleMipMap.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleMovie.cpp Fix more clang errors. 2013-04-05 21:13:14 +00:00
SampleOvalTest.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SamplePatch.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
SamplePath.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SamplePathClip.cpp Fixing some warnings on Linux 2013-03-07 20:52:59 +00:00
SamplePathEffects.cpp Builder class for SkLayerRasterizer. 2014-02-26 13:27:37 +00:00
SamplePathFill.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SamplePathUtils.cpp Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
SamplePdfFileViewer.cpp remove remaining references to Sk64 (obsolete) 2014-01-13 14:53:55 +00:00
SamplePictFile.cpp Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) 2014-06-04 05:40:44 -07:00
SamplePicture.cpp Cleanup usage of GetResourcePath() after commit bcbc1788b4. 2014-07-01 12:35:49 -07:00
SamplePoints.cpp remove unused Kernel33MaskFilter 2014-05-12 13:35:55 +00:00
SamplePolyToPoly.cpp remove SkFloatToScalar macro 2013-11-25 19:44:07 +00:00
SampleRectanizer.cpp Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h) 2014-06-02 10:20:15 -07:00
SampleRegion.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleRepeatTile.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleRotateCircles.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleShaders.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleShaderText.cpp remove unneeded inval 2014-06-02 14:41:24 -07:00
SampleSkLayer.cpp deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients 2013-12-17 19:22:07 +00:00
SampleSlides.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
SampleSpiral.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleStringArt.cpp Type warning fix for: Add string art GM and sample. 2013-09-19 16:32:49 +00:00
SampleStrokePath.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
SampleStrokeRect.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleSubpixelTranslate.cpp Cleanup usage of GetResourcePath() after commit bcbc1788b4. 2014-07-01 12:35:49 -07:00
SampleText.cpp remove dead code from sample 2014-07-15 19:56:55 -07:00
SampleTextAlpha.cpp stop calling SkCanvas::getDevice 2014-06-30 09:05:34 -07:00
SampleTextBox.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleTextOnPath.cpp Make sure SkDrawLooper objects can only be allocated on the heap. 2014-04-15 15:48:36 +00:00
SampleTextureDomain.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
SampleTiling.cpp Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) 2014-06-04 05:40:44 -07:00
SampleTinyBitmap.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleUnpremul.cpp Cleanup: Rename SkOSPath functions. 2014-07-28 19:26:58 -07:00
SampleVertices.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
SampleWarp.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SampleWritePixels.cpp use SkColorType instead of SkBitmap::Config in samplecode 2014-02-17 02:55:57 +00:00
SampleXfermodesBlur.cpp Revert "Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)" 2014-05-29 15:57:20 +00:00
TransitionView.cpp remove SkFloatToScalar macro 2013-11-25 19:44:07 +00:00
TransitionView.h Add a header for OverView.cpp as well. 2012-09-18 01:52:20 +00:00
vertexdump.cpp remove SkFloatToScalar macro 2013-11-25 19:44:07 +00:00