skia2/samplecode
Jim Van Verth fc4f768e5a Use int when possible to calculate atlas indices in shaders.
On certain iOS devices half has a mantissa of only 10 bits, which is not
enough to perform the floating point trickery to get the lower bits
out of the "texture coordinates". Instead we use int if available, and
float if not available.

Also re-enables multitexturing for iOS and adds a sample which
stresses the issue, and a version of fontcache that tests multitexturing.

Bug: skia:7285
Change-Id: Ia541b6a418c1860c941071750ceb26459eb846ea
Reviewed-on: https://skia-review.googlesource.com/99800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-01-26 13:54:54 +00:00
..
ClockFaceView.cpp remove unused SkRasterizer 2018-01-21 18:24:11 +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 Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleAARectModes.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleAARects.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleAll.cpp remove unused SkRasterizer 2018-01-21 18:24:11 +00:00
SampleAndroidShadows.cpp Fix alpha contribution to tonal color. 2017-12-19 19:27:06 +00:00
SampleAnimatedImage.cpp Respect repetition count in SkAnimatedImage 2018-01-22 18:53:47 +00:00
SampleAnimatedText.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleAnimator.cpp SkFontData to use smart pointers. 2016-09-16 06:24:20 -07:00
SampleAnimBlur.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleArc.cpp remove unused SkRasterizer 2018-01-21 18:24:11 +00:00
SampleAtlas.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleBigBlur.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SampleBigGradient.cpp turn on extended Clang warnings on Windows too 2017-12-04 19:29:51 +00:00
SampleBitmapRect.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleBlur.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleCamera.cpp Remove more views code, just to simplify things 2017-12-01 17:12:49 +00:00
SampleCCPRGeometry.cpp ccpr: Use primitive restart feature on ARM 2018-01-23 21:29:10 +00:00
SampleChart.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleChineseFling.cpp Add Chinese zoom Sample. 2018-01-22 18:20:27 +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 Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleColorFilter.cpp remove xfermode from public api 2016-10-28 20:06:17 +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 Revert "Revert "resources: remove most uses of GetResourcePath()"" 2017-12-09 01:27:50 +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 Revert "efficiently dash very large rectangles and very long lines" 2017-12-19 20:20:17 +00:00
SampleEffects.cpp Alloc glyph image correctly for SkMask::k3D_Format. 2017-11-14 17:38:34 +00:00
SampleEmboss.cpp Revert "Revert "make it illegal to include SkXfermode.h"" 2016-11-23 22:17:17 +00:00
SampleFatBits.cpp Delete even more unused views code 2017-11-29 18:12:35 +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 remove unneeded SkFlattenableSerialization 2018-01-23 18:13:35 +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 Delete even more unused views code 2017-11-29 18:12:35 +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 IWYU -- SkShader.h 2018-01-23 18:08:30 +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 resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleLCD.cpp Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
SampleLines.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleLua.cpp Fix SampleLua build 2017-12-11 17:15:40 +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
SamplePatch.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SamplePath.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SamplePathClip.cpp Delete even more unused views code 2017-11-29 18:12:35 +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
SamplePathFinder.cpp Delete even more unused views code 2017-11-29 18:12:35 +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 Add analytic clip FPs that read from the CCPR atlas 2017-12-05 18:06:18 +00:00
SamplePdfFileViewer.cpp Revert "Revert "make it illegal to include SkXfermode.h"" 2016-11-23 22:17:17 +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 Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleRectanizer.cpp Fix leak in GM:Rectanizer 2017-12-24 17:06:42 +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
SampleSGInval.cpp [sksg] Fix paint inval 2017-12-29 00:41:00 +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 Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleShadowReference.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
SampleShadowUtils.cpp Fix alpha contribution to tonal color. 2017-12-19 19:27:06 +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 Delete even more unused views code 2017-11-29 18:12:35 +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 Mark overridden destructors with 'override' and remove 'virtual' 2017-03-22 16:06:18 +00:00
SampleSVGPong.cpp Convert SVGPong sample to sksg 2018-01-22 22:28:07 +00:00
SampleText.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextAlpha.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextBox.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextOnPath.cpp Delete even more unused views code 2017-11-29 18:12:35 +00:00
SampleTextureDomain.cpp hide lockpixels api behind flag 2017-04-17 15:33:36 +00:00
SampleTiling.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
SampleUnpremul.cpp resources: orgainize directory. 2017-12-08 17:16:00 +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 IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
vertexdump.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00