skia2/bench
Brian Osman f04fb3cacb Change how GPs configure attributes
Adds setVertexAttributes and setInstanceAttributes. These take a pointer
to the first attribute, and a count. The count is the total number of
possible attributes, though some may not be initialized. The base class
computes the number of initialized attributes, pre-computes the strides,
and only allows subsequent access to the initialized attributes.

The attributes need to be allocated contiguously. Some GPs place them in
an array, though most just place them as consecutive members, and pass
a pointer to the first one.

Indexed access would be possible, but now it makes more sense to iterate
over all attributes, so enable that, and use range-based for everywhere.

Completely remove the per-attribute offset helper (again - possible, but
not real helpful), and make the stride always available. In many ops,
just use the GP's computed stride, rather than re-computing it.

Bug: skia:
Change-Id: Ie4cccb7969a98ee5a10b373e714fbd702e875b3e
Reviewed-on: https://skia-review.googlesource.com/c/169241
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-11-13 00:57:17 +00:00
..
AAClipBench.cpp change SkClipOp to a class enum 2016-12-12 15:38:31 +00:00
AlternatingColorPatternBench.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
AndroidCodecBench.cpp Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap" 2017-10-03 20:03:35 +00:00
AndroidCodecBench.h SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h 2017-01-11 18:55:34 +00:00
BenchLogger.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
BenchLogger.h Remove Sk prefix from some bench classes. 2014-06-19 12:32:29 -07:00
Benchmark.cpp Remove dead code from Benchmark 2018-08-09 13:07:28 +00:00
Benchmark.h Remove dead code from Benchmark 2018-08-09 13:07:28 +00:00
BezierBench.cpp chmod -x *.cpp *.h 2016-10-27 16:41:14 +00:00
BigPathBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
BitmapBench.cpp Test performance of 565 bitmap scaling 2017-12-06 18:32:29 +00:00
BitmapRectBench.cpp Revert "Revert "SkTypes: extract SkTo"" 2018-06-14 14:55:17 +00:00
BitmapRegionDecoderBench.cpp Remove calls to computeOutputColor- Type and Space 2018-03-13 15:42:52 +00:00
BitmapRegionDecoderBench.h Remove SkAutoTDelete. 2016-11-03 19:03:40 +00:00
BlendmodeBench.cpp update blendmode bench 2017-07-04 16:47:29 +00:00
BlurBench.cpp Remove occluded rrect blur benchmark 2018-08-20 19:01:00 +00:00
BlurImageFilterBench.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
BlurRectBench.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
BlurRectsBench.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
BlurRoundRectBench.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
ChartBench.cpp Fix benches that aren't really timing what we want 2017-12-18 15:56:02 +00:00
check_bench_regressions.py Adds dashboard link for one-line plot on each alert item. 2014-05-13 17:38:17 +00:00
ChecksumBench.cpp Use sse4.2 CRC32 instructions to hash when available. 2016-08-08 09:06:28 -07:00
ChromeBench.cpp change clip-bounds getters to always return the rect 2017-01-23 17:14:53 +00:00
ClearBench.cpp Add clear benchmark 2018-10-08 21:13:26 +00:00
ClipMaskBench.cpp add conservative bounds to raster tiling 2018-04-12 16:22:30 +00:00
ClipStrategyBench.cpp Add a bench for comparing complex clip strategies 2017-12-24 17:12:42 +00:00
CmapBench.cpp Move SkTypeface to sk_sp. 2016-05-12 10:09:31 -07:00
CodecBench.cpp Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap" 2017-10-03 20:03:35 +00:00
CodecBench.h SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h 2017-01-11 18:55:34 +00:00
CodecBenchPriv.h remove references to kIndex_8_SkColorType from our tools/tests 2017-07-12 20:25:44 +00:00
ColorCanvasDrawBitmapBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
ColorFilterBench.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
ColorPrivBench.cpp make most of SkColorPriv.h private 2017-09-15 16:31:35 +00:00
ColorSpaceXformBench.cpp Use SkColor4f functionality, rather than SkPM4f.h inline functions 2018-10-26 19:04:18 +00:00
CompositingImagesBench.cpp Reland "Move GrGeometryProcessor's textures out of classes and into" 2018-08-07 14:02:49 +00:00
ControlBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
CoverageBench.cpp Attempt 3: SkRasterPipelineBlitter: support A8 2017-01-13 13:25:28 +00:00
CubicKLMBench.cpp Remove SK_SUPPORT_GPU checks in tool-only code 2018-05-31 18:59:44 +00:00
CubicMapBench.cpp add bench for cubicmap 2018-08-15 20:51:57 +00:00
DashBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
DisplacementBench.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
DrawBitmapAABench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
DrawLatticeBench.cpp Implement a fast path for solid color lattice rectangle 2017-12-11 18:26:18 +00:00
EncodeBench.cpp Add comment about how to run Decoder benchmarks 2018-11-08 18:12:51 +00:00
FontCacheBench.cpp test,tools: whitespace changes for clang-format 2018-09-19 17:50:51 +00:00
FontScalerBench.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
FSRectBench.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
GameBench.cpp IWYU -- SkShader.h 2018-01-23 18:08:30 +00:00
GeometryBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
GMBench.cpp Fix benches that aren't really timing what we want 2017-12-18 15:56:02 +00:00
GMBench.h Add benchmark for comparing multitexturing to non-multitexturing image draws. 2017-10-11 20:32:49 +00:00
GradientBench.cpp Remove SkLinearGradient::kForce4fContext_PrivateFlag 2017-06-07 20:24:51 +00:00
GrCCFillGeometryBench.cpp ccpr: Rename GrCCPathParser to GrCCFiller 2018-08-20 20:25:24 +00:00
GrMemoryPoolBench.cpp test,tools: whitespace changes for clang-format 2018-09-19 17:50:51 +00:00
GrMipMapBench.cpp Reland "Reland "Require mips to be allocated at texture creation time and disable late allocations."" 2018-06-08 23:01:44 +00:00
GrResourceCacheBench.cpp Remove SK_SUPPORT_GPU checks in tool-only code 2018-05-31 18:59:44 +00:00
gUniqueGlyphIDs.h Make header files self-sufficient 2017-02-10 01:19:52 +00:00
HairlinePathBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
HardStopGradientBench_ScaleNumColors.cpp Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
HardStopGradientBench_ScaleNumHardStops.cpp Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
HardStopGradientBench_SpecialHardStops.cpp Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
ImageBench.cpp Fix native_image_to_raster_surface crash in ANGLE msaa configs 2017-06-08 15:37:40 +00:00
ImageCacheBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
ImageCacheBudgetBench.cpp Stop using SkTSwap. 2018-06-19 02:06:31 +00:00
ImageCycleBench.cpp Reland "Move GrGeometryProcessor's textures out of classes and into" 2018-08-07 14:02:49 +00:00
ImageFilterCollapse.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
ImageFilterDAGBench.cpp resources: orgainize directory. 2017-12-08 17:16:00 +00:00
InterpBench.cpp make most of SkColorPriv.h private 2017-09-15 16:31:35 +00:00
JSONBench.cpp Fold SkJSON into Skia/utils 2018-06-19 18:23:30 +00:00
LightingBench.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
LineBench.cpp Revert of Modify LineBench for drawing straight line (patchset #3 id:40001 of https://codereview.chromium.org/1936153002/ ) 2016-05-05 14:02:36 -07:00
MagnifierBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
MathBench.cpp remove SkTCast 2018-06-18 17:22:18 +00:00
Matrix44Bench.cpp re-precate SkMatrix44::SkMatrix44() 2018-10-04 14:01:11 +00:00
MatrixBench.cpp Revert of Change mapRectScaleTranslate to pass args/ret by value (patchset #2 id:20001 of https://codereview.chromium.org/2138943002/ ) 2016-08-10 07:13:21 -07:00
MatrixConvolutionBench.cpp distinguish distinct matrixconvolution benchmarks 2016-04-12 15:52:52 -07:00
MemsetBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
MergeBench.cpp remove unused mode parameter from SkMergeImageFilter 2017-06-19 14:01:56 +00:00
microbench.json Fix the other microbench schema 2014-07-25 08:30:11 -07:00
MipMapBench.cpp Reland "Stop conflating F16 with linear gamma" 2018-08-28 14:23:27 +00:00
MorphologyBench.cpp Update SkMorphology ImageFilters to sk_sp 2016-04-05 09:09:37 -07:00
MutexBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
nanobench.cpp Move GrBackend enum to enum class. 2018-10-12 14:01:58 +00:00
nanobench.h Remove SK_SUPPORT_GPU checks in tool-only code 2018-05-31 18:59:44 +00:00
PatchBench.cpp Interpolate patch vertices in destination color space 2018-07-09 23:35:59 +00:00
PathBench.cpp test,tools: whitespace changes for clang-format 2018-09-19 17:50:51 +00:00
PathIterBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
PathOpsBench.cpp add pathops bench for simplify 2018-11-05 13:15:21 +00:00
PathTextBench.cpp Reland "Move remove ptr args to MakeRecAndEffects" 2018-11-09 20:01:42 +00:00
PDFBench.cpp SkDocument: Factories now located in SkPDFDocument.h and SkXPSDocument.h 2018-09-20 18:21:07 +00:00
PerlinNoiseBench.cpp Hide SkPerlinNoiseShader impl details 2017-05-18 17:24:39 +00:00
PictureNestingBench.cpp return pictures as sk_sp 2016-03-18 07:25:55 -07:00
PictureOverheadBench.cpp bench clip overhead during recording 2017-03-06 21:45:02 +00:00
PicturePlaybackBench.cpp Remove SkAutoTDelete. 2016-11-03 19:03:40 +00:00
PolyUtilsBench.cpp Add new PolyUtils benches 2018-09-20 18:34:20 +00:00
PremulAndUnpremulAlphaOpsBench.cpp Rename SkConfig8888/SkPixelInfo to SkConvertPixels 2017-02-15 13:50:55 +00:00
QuickRejectBench.cpp Optimized implementation of quickReject() 2016-08-12 08:29:08 -07:00
ReadPixBench.cpp Reland "add getAlphaf() to pixmap/bitmap" 2018-09-21 17:41:03 +00:00
RecordingBench.cpp move skpipe to experimental 2018-09-21 17:20:25 +00:00
RecordingBench.h move skpipe to experimental 2018-09-21 17:20:25 +00:00
RectanizerBench.cpp Remove SK_SUPPORT_GPU checks in tool-only code 2018-05-31 18:59:44 +00:00
RectBench.cpp Remove dead code from Benchmark 2018-08-09 13:07:28 +00:00
RectoriBench.cpp hide SkBlurMaskFilter and SkBlurQuality 2018-03-14 17:27:36 +00:00
RefCntBench.cpp trim #include <new> from SkPostConfig.h 2018-06-11 15:55:31 +00:00
RegionBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
RegionContainBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
RepeatTileBench.cpp remove unneeded code for index8 imagse 2017-07-03 19:07:25 +00:00
ResultsWriter.h Mark overridden destructors with 'override' and remove 'virtual' 2017-03-22 16:06:18 +00:00
RotatedRectBench.cpp Replace SkFAIL with SK_ABORT. 2017-08-16 15:37:54 +00:00
RTreeBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
ScalarBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
ShaderMaskBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
ShaderMaskFilterBench.cpp Convert A8 D32 mask blitters to Sk4px 2018-04-18 19:52:53 +00:00
ShadowBench.cpp Remove dead code from Benchmark 2018-08-09 13:07:28 +00:00
ShapesBench.cpp test,tools: whitespace changes for clang-format 2018-09-19 17:50:51 +00:00
Sk4fBench.cpp Sk4f: add floor() 2016-02-09 15:41:36 -08:00
SkGlyphCacheBench.cpp Reland "Move remove ptr args to MakeRecAndEffects" 2018-11-09 20:01:42 +00:00
SKPAnimationBench.cpp change clip-bounds getters to always return the rect 2017-01-23 17:14:53 +00:00
SKPAnimationBench.h Replace SkFAIL with SK_ABORT. 2017-08-16 15:37:54 +00:00
SKPBench.cpp Make nanobench --mpd flush between canvases. 2018-10-31 17:39:11 +00:00
SKPBench.h Don't use MEM_MOVE=true with SkTArrays of sk_sp 2018-09-05 20:11:07 +00:00
skpbench.json Fix scale type in JSON format 2014-06-26 15:39:31 -07:00
SortBench.cpp test,tools: whitespace changes for clang-format 2018-09-19 17:50:51 +00:00
StreamBench.cpp speedup dynamicwstream 2016-12-15 19:49:31 +00:00
StrokeBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
SwizzleBench.cpp Reland "have SkConvertPixels use SkColorSpaceXformSteps" 2018-09-21 16:18:06 +00:00
TableBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
TextBench.cpp resources: resource identifiers don't begin with leading slash 2017-12-08 20:03:18 +00:00
TextBlobBench.cpp Fixup textblob benchmark 2018-10-08 18:44:58 +00:00
TileBench.cpp prepare to remove obsolete macros 2018-04-24 19:19:01 +00:00
TileImageFilterBench.cpp Update TileImageFilter to sk_sp 2016-04-15 07:57:40 -07:00
TopoSortBench.cpp Move control of explicit GPU resource allocation to GrContextOptions 2018-02-08 12:36:29 +00:00
VertBench.cpp move vertex-mode enum into SkVertices 2017-04-03 15:50:16 +00:00
VertexColorSpaceBench.cpp Change how GPs configure attributes 2018-11-13 00:57:17 +00:00
WritePixelsBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
WriterBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00