Commit Graph

100 Commits

Author SHA1 Message Date
Chris Dalton
fc0941003e Move tessellation-specific functions out of GrPathUtils
Bug: skia:12524
Change-Id: I2664c8ea707a40724bcf916e907fe28d1fa276d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474357
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-11-20 02:47:40 +00:00
Chris Dalton
2fceb21cb7 [graphite] Add an IntersectionTree class
Implements a BSP tree with NEON/SSE optimizations that tracks
non-overlapping regions. This object can be used batch sets of paths
into non-overlapping draws. Performance on AppleM1 with our existing
benchmarks looks very promising:

    desk_motionmarkarcs.skp     1227 paths -> 69 draws    450us
    desk_motionmarksuits.skp    1417 paths -> 26 draws    201us
    desk_chalkboard.skp         1940 paths -> 11 draws     84us
    desk_ynevsvg.skp             859 paths -> 10 draws     31us
    desk_micrographygirl.skp     318 paths -> 29 draws     11us

Bug: skia:12466
Change-Id: I847a93ed726dea10cb403cb76e578bd81eb920d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460298
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-10-19 19:45:01 +00:00
Kevin Lubick
f541ddf785 Move ToolUtils::make_big_path() to bench/
The ToolUtils file is getting a bit bloated, IMO. I noticed this when
working on Bazel includes.

Including non-header files is a small nuisance in Bazel, so it
is probably better to just make it its own compilation unit.

Change-Id: I06ca3808a37ebef6478f5afa3f14086429899590
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459197
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-10-14 12:57:29 +00:00
Robert Phillips
a3f206e0b8 Non-substantive changes for making v1::SurfaceDrawContext V1-only
Bug: skia:11837
Change-Id: I60112e370c95e6f9d9bc12cb9b05d40dd2220bc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435279
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-02 19:22:58 +00:00
Brian Osman
310178c7b7 Microbench for canvas save/restore calls
Change-Id: I0dbf1af17c3a7ec70437e0479cd8b6b6269d155c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433476
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-27 21:08:11 +00:00
Robert Phillips
04f22eacaa Feed all top-level GPU accessors through skgpu::BaseDevice (take 2)
This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.

This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.

TBR=brianosman@google.com
Bug: skia:11837
Change-Id: Ib69a3ea27c840fa7758bc3318395a27228c7ae9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431539
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-26 14:56:37 +00:00
Robert Phillips
d91d2341b9 Revert "Feed all top-level GPU accessors through skgpu::BaseDevice"
This reverts commit 5de8b19504.

Reason for revert: blocking Android roll

Original change's description:
> Feed all top-level GPU accessors through skgpu::BaseDevice
>
> This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.
>
> This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.
>
> Bug: skia:11837
> Change-Id: I4e205255706680ac58ffe40f714884c2ee7ac799
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431036
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,brianosman@google.com,michaelludwig@google.com

Change-Id: I8a015be4edbe21d63db09d5593af13cc89df4217
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431538
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-22 18:56:51 +00:00
Robert Phillips
5de8b19504 Feed all top-level GPU accessors through skgpu::BaseDevice
This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.

This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.

Bug: skia:11837
Change-Id: I4e205255706680ac58ffe40f714884c2ee7ac799
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431036
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-22 16:47:30 +00:00
Florin Malita
d584ddd151 Add skottie-vs-png decode bench
Three flavors:

  - png data  -> bitmap
  - json data -> skottie::Animation -> SkPicture
  - json data -> skottie::Animation

    micros   	bench
     70.20  	decode_png_small	nonrendering
      4.32 ?	decode_skottiepic_small	nonrendering
      3.71 ?	decode_skottie_small	nonrendering

   4589.10  	decode_png_medium	nonrendering
    117.48 ?	decode_skottiepic_medium	nonrendering
     76.69 ?	decode_skottie_medium	nonrendering

  30895.97  	decode_png_large	nonrendering
   4911.16  	decode_skottiepic_large	nonrendering
   4640.39  	decode_skottie_large	nonrendering

Change-Id: Id93be15f453b70e8cb51ea38f33adc1ebc9ce562
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423819
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-07-01 20:18:03 +00:00
Brian Salomon
31fddc3769 MSKP support in nanobench
Bug: skia:11900
Change-Id: I97d1f2a9523252318ffb4f479b197cb0ef9cf0b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-30 20:04:08 +00:00
Mike Reed
fc32405ff2 Revert "Revert "Add bench for skparagraph""
Fix: check for successful fParagraph creation

This reverts commit ead52dc068.

Change-Id: Id122877935affaaa33ac791e6c5b69c571267adf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385879
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-03-17 18:05:10 +00:00
Mike Reed
ead52dc068 Revert "Add bench for skparagraph"
This reverts commit 1aa25c3217.

Reason for revert: crashing on windows bots

Original change's description:
> Add bench for skparagraph
>
> Change-Id: Ib33e06527660b33984b9171f51026a935ef99f79
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385156
> Reviewed-by: Julia Lavrova <jlavrova@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com,jlavrova@google.com

Change-Id: I7b8524c449f3c484b777af31f83e1372a689de55
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385163
Reviewed-by: Mike Reed <reed@google.com>
2021-03-15 22:55:40 +00:00
Mike Reed
1aa25c3217 Add bench for skparagraph
Change-Id: Ib33e06527660b33984b9171f51026a935ef99f79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385156
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-03-15 22:32:16 +00:00
Mike Reed
069e484cc3 drawBitmap is deprecated
- starting to remove duplicate/unneeded benches

Change-Id: I4cd2e73b4e5d6664a99cc4a51f82436970d12eb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358219
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-24 17:39:15 +00:00
Brian Osman
ce75036b3e SkSL: Remove ByteCode interpreter, generator, etc.
Change-Id: Ib150e6d6d3de34a85ce8051eea843ab3b2d7ab75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356921
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-01-22 14:38:41 +00:00
Chris Dalton
e465205938 Remove the offthread triangulation from GrPathTessellateOp
Rather than copying these triangles twice, we can run "pathToPolys"
during onPrePrepare and "polysToTriangles" during onPrepare.

Also adds a benchmark for normal and inner-fan triangulation.

Bug: skia:10419
Change-Id: Id301afde5de11d93ae026e75e42ac03a50867687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355177
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-22 03:59:29 +00:00
Mike Klein
0047afffb0 remove very oldest SkVM testing
None of these earliest testing tools are useful anymore
now that we can do useful work with SkVM and SkVMBlitter.

Change-Id: I8b25ef6ddd101c4ff8617c6742343dedb4764922
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345456
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-12-17 21:17:46 +00:00
Chris Dalton
2882e70ef3 Add GrPathUtils::findCubicConvex180Chops
This method finds the locations a cubic needs to be chopped at before
it can be passed to the stroke tessellation shader. It's an integral
part of CPU stroke preparation and therefore extremely perf sensitive.

Bug: skia:10419
Change-Id: Ib23c2583b8cfc78814ce52425f7af2c8b2f8b420
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330314
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-11-02 20:33:54 +00:00
Chris Dalton
0e13db707f Clean up GrPathUtils
Removes unused code, including utilities for dealing with KLM
functionals for the implicit cubic function. The implicit has proven
to not be a very good tool for rendering cubics.

Change-Id: I577b50a9eb296c52dc0101a20394480a4a008654
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329440
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-10-26 21:37:26 +00:00
Herb Derby
c27d535fc2 benchmark for text vertex fill
Change-Id: If293360e2473be6d316cbfeccf8ec3ebeba2df1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309779
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-14 16:03:57 +00:00
Chris Dalton
078f875477 Rename GrTessellateStroke* -> GrStrokeTessellate* and friends
Almost half the files in src/gpu/tessellate were beginning with
"GrTessellat*". This CL reorders the camel case words for more
efficient tab completion and better grouping of related files.

Bug: skia:10419
Change-Id: I3df0ddbb2367cdbd880807a8aef2dd88ec12f830
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306659
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-07-31 02:24:05 +00:00
Mike Reed
13711ebe68 rename SkMipMap to SkMipmap
Change-Id: I1fa8a0482a717847236a30b4851061f4074b7755
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-15 13:26:13 +00:00
John Stiles
6e9ead9166 Revert "Remove custom SkSort algorithms."
This reverts commit 70474c1cb0.

Reason for revert: bot build failure

Original change's description:
> Remove custom SkSort algorithms.
> 
> SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
> The difference is small on randomized inputs, but quite significant for
> semi-ordered inputs (forward/backward/repeated). There doesn't seem to
> to be any compelling advantage to SkTQSort.
> 
> Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u
> 
> (These performance numbers are from an optimized build my local machine;
> it's possible that we might see different results on the test bots.)
> 
> Change-Id: Iaf19563041547eae7de2953be249129108f093b1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: I1126dd4cda95716dac225ad32d5b0e5cf3f09421
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302447
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-14 00:25:05 +00:00
John Stiles
70474c1cb0 Remove custom SkSort algorithms.
SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
The difference is small on randomized inputs, but quite significant for
semi-ordered inputs (forward/backward/repeated). There doesn't seem to
to be any compelling advantage to SkTQSort.

Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u

(These performance numbers are from an optimized build my local machine;
it's possible that we might see different results on the test bots.)

Change-Id: Iaf19563041547eae7de2953be249129108f093b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-13 23:35:20 +00:00
Mike Reed
f8a6b5b4b0 Impl SkFilterOptions for raster-images
Maintains the old and new code-paths:
- if the shader was made with explicit filteroptions, use those
- if not, infer the filteroptions from the filterquality enum
  (and the legacy heuristics of sniffing/snapping the ctm)

In either case, the bulk of the onProgram() is shared, driving off
the (possibly computed locally) filteroptions.

bench looks sort like we expect:

    509.28  	filteroptions_sampling_0_mipmap_0	8888
    495.76  	filteroptions_sampling_0_mipmap_1	8888
    642.52  	filteroptions_sampling_0_mipmap_2	8888

    942.40  	filteroptions_sampling_1_mipmap_0	8888
    976.94  	filteroptions_sampling_1_mipmap_1	8888
   1686.34  	filteroptions_sampling_1_mipmap_2	8888

Bug: skia:10344
Change-Id: I77a79f79f640986fdd6b14f163c1a03462c55dc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297561
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-10 13:08:33 +00:00
Brian Osman
89d33d0a25 Remove GrCCFillGeometryBench
Not important, and the constructors for these six benchmarks were
allocating a total of 3 GB of RAM.

Change-Id: I03db4d21fe9755902e1b642eb2b6315f697b955e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301656
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-07-09 21:31:03 +00:00
Greg Daniel
6d2febd632 Reland "Add create backend texture with color upload bench."
This reverts commit 1ff415d5a1.

Reason for revert: relanding with fix

Original change's description:
> Revert "Add create backend texture with color upload bench."
> 
> This reverts commit 690b4c4644.
> 
> Reason for revert: breaking bots
> 
> Original change's description:
> > Add create backend texture with color upload bench.
> > 
> > Change-Id: Id4994cb809d6e19ca511b63dba71b45257eca927
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287618
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,robertphillips@google.com
> 
> Change-Id: I2ac38977abc0004b38a94dacf0a235ae4fbac5d3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287636
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,robertphillips@google.com

Change-Id: I287a1d829d4d861d149b0f1d9adf556a38e44abb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287638
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-05 00:43:52 +00:00
Greg Daniel
1ff415d5a1 Revert "Add create backend texture with color upload bench."
This reverts commit 690b4c4644.

Reason for revert: breaking bots

Original change's description:
> Add create backend texture with color upload bench.
> 
> Change-Id: Id4994cb809d6e19ca511b63dba71b45257eca927
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287618
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com

Change-Id: I2ac38977abc0004b38a94dacf0a235ae4fbac5d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287636
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-04 20:20:29 +00:00
Greg Daniel
690b4c4644 Add create backend texture with color upload bench.
Change-Id: Id4994cb809d6e19ca511b63dba71b45257eca927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287618
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-05-04 19:33:17 +00:00
Chris Dalton
7f0b8973e9 Add CPU benchmarks for individual methods on GrTessellatePathOp
Change-Id: Ica5d3229fc602d17cf568a25742612c94b87ae9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285215
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-24 15:23:41 +00:00
Mike Klein
96f6401789 harmonize rewrite-includes and gn-format checks
The CheckGeneratedFiles bot only required rewriting
.gn files, while the presubmit wants both .gn and .gni files.

It also appears that the #includes rewrite script runs on
both the presubmit and CheckGeneratedFiles bots.

These presubmits run on the CQ before landing right?
If so, no need for them in the CheckGeneratedFIles bot at all.

And of course, format .gni files.

Change-Id: Icd4526d62f85088862ad93566cc9ace11dc3e33f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281505
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 17:00:54 +00:00
Mike Reed
fdf94044ff Remove exotic legacy bitmap drawing entry points: Nine, Lattice
follow-ups:
- remove associated virtuals in canvas

Change-Id: I3efa7a88ed0905ebf080712993e7f43148df36dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276282
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-11 13:11:47 +00:00
Michael Ludwig
b6c27f1284 Add GrQuad::bounds() benchmark
Change-Id: I3748fcae9b608b7a29d6354fb26c37193870e377
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265761
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-22 18:23:55 +00:00
Michael Ludwig
1beb8ae9a2 Reland "Add variety of bulk API benchmarks"
This reverts commit 659b21d480.

Reason for revert: Fixed skipping nonrendering benchmark

Original change's description:
> Revert "Add variety of bulk API benchmarks"
>
> This reverts commit e63595dd85.
>
> Reason for revert: Breaking the Perf tests:
>
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
> Command exited with code 139
> #######################################
> symbolized stacktrace follows
> #######################################
> build/nanobench BulkRectBench<1000, (RectangleLayout)1, (ImageMode)2, (DrawMode)2>::onPerCanvasPreDraw(SkCanvas*) at skia/bench/BulkRectBench.cpp:218
> build/nanobench main at skia/bench/nanobench.cpp:1277
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f1213dad2e1]
> build/nanobench _start at ??:?
>
>
>
>
>
> Original change's description:
> > Add variety of bulk API benchmarks
> >
> > Covers drawing 1000 anti-aliased rectangles, either sharing 1 image, using
> > a unique image, or as a solid color. Tests using the bulk APIs and regular
> > one-at-a-time drawing.
> >
> > Change-Id: Icdf5a1f6df229aed785212d0941b89c11aa785c0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251003
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,egdaniel@chromium.org,michaelludwig@google.com
>
> Change-Id: I3b26d5a04c472993585242a108c2764ea2b96940
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251213
> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
> Commit-Queue: Joe Gregorio <jcgregorio@google.com>

Change-Id: I83538faa29ada5ab1b02ff07ae9fe90734ed198e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251238
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-10-28 18:48:32 +00:00
Joe Gregorio
659b21d480 Revert "Add variety of bulk API benchmarks"
This reverts commit e63595dd85.

Reason for revert: Breaking the Perf tests:

ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Command exited with code 139
#######################################
symbolized stacktrace follows
#######################################
build/nanobench BulkRectBench<1000, (RectangleLayout)1, (ImageMode)2, (DrawMode)2>::onPerCanvasPreDraw(SkCanvas*) at skia/bench/BulkRectBench.cpp:218
build/nanobench main at skia/bench/nanobench.cpp:1277
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f1213dad2e1]
build/nanobench _start at ??:?
  




Original change's description:
> Add variety of bulk API benchmarks
> 
> Covers drawing 1000 anti-aliased rectangles, either sharing 1 image, using
> a unique image, or as a solid color. Tests using the bulk APIs and regular
> one-at-a-time drawing.
> 
> Change-Id: Icdf5a1f6df229aed785212d0941b89c11aa785c0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251003
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,egdaniel@chromium.org,michaelludwig@google.com

Change-Id: I3b26d5a04c472993585242a108c2764ea2b96940
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251213
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2019-10-28 16:29:35 +00:00
Michael Ludwig
e63595dd85 Add variety of bulk API benchmarks
Covers drawing 1000 anti-aliased rectangles, either sharing 1 image, using
a unique image, or as a solid color. Tests using the bulk APIs and regular
one-at-a-time drawing.

Change-Id: Icdf5a1f6df229aed785212d0941b89c11aa785c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251003
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-28 16:20:04 +00:00
Robert Phillips
de4456f6f2 Add bench for SkDDLRecorder detach
On Windows I'm getting:

curr/maxrss	loops	min	median	mean	max	stddev	samples   	config	bench
  33/38  MB	1495	2.62us	2.65us	2.66us	2.72us	1%	.o.o.oO.OO	gl	DDLRecorder

Change-Id: I529e6ac612c455915c166472124b08647eb7bffd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241039
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-12 17:09:08 +00:00
Florin Malita
922e2254b1 Add a colortype conversion bench
curr/maxrss	loops	min	median	mean	max	stddev	samples   	config	bench
  46/46  MB	4	65.4µs	65.5µs	67.1µs	75.5µs	5%	█▅▁▁▁▁▁▁▁▁	nonrendering	ctconvert_4_4_readpixels
  46/46  MB	3	80.4µs	80.7µs	82.2µs	93.8µs	5%	█▁▁▁▂▁▁▁▁▁	nonrendering	ctconvert_4_4_drawbitmap
  46/46  MB	3	76.5µs	76.6µs	80.5µs	93.4µs	8%	▇▁▁▁▁▁█▄▁▂	nonrendering	ctconvert_4_6_readpixels
  46/46  MB	2	155µs	155µs	157µs	174µs	4%	█▁▁▁▁▁▁▁▁▁	nonrendering	ctconvert_4_6_drawbitmap

Change-Id: Ib53f76a289ee101a85054d773cadcea475baf280
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237141
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-08-26 15:41:54 +00:00
Mike Reed
9dc0b9e2f8 remove code now that loopers are dead (w.r.t. canvas and paint)
We can't remove the loopers themselves, as they are still used
by android and chrome (they just don't ever pass them to skia).

Eventually each of those clients will resolve this, but for now
we just keep the classes (and tests) in skia.

Bug: skia:4783
Change-Id: I5f507e6bb82280f2bc7c0b21eebe59c287aa9265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230579
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-30 12:49:28 +00:00
Brian Osman
569f12f0e5 Interpreter: Vectorized interpreter
This converts the SkSL interpreter to operate in SIMT fashion. It handles
all the same features as the previous scalar implementation, but operates
on N lanes at a time. (Currently 8).

It's modeled after GPU and other parallel architectures, using execution
masks to handle control flow, including divergent control-flow.

Change-Id: Ieb38ffe2f55a10f72bdab844c297126fe9bedb6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217122
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-13 15:50:55 +00:00
Julia Lavrova
a3552c5e6d Reland "SkParagraph"
This is a reland of 10ad0b9b01

Original change's description:
> SkParagraph
>
> Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: I46cf43eae693edf68e45345acd0eb39e04e02bfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219863
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-06-11 17:20:36 +00:00
Herb Derby
07cd38dc13 Revert "SkParagraph"
This reverts commit 10ad0b9b01.

Reason for revert: Breaks google3 build

Original change's description:
> SkParagraph
> 
> Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

TBR=borenet@google.com,djsollen@google.com,halcanary@google.com,bungeman@google.com,kjlubick@google.com,reed@google.com,drott@chromium.org,jlavrova@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I3f4ef2f34b7489d008c2fe92527d39fba0e16ff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219858
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-06-10 13:16:53 +00:00
Julia Lavrova
10ad0b9b01 SkParagraph
Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-06-07 17:23:23 +00:00
Mike Klein
68c50d015b sketch an skvm
With all the thinking around a stack-based interpreter,
I figured I'd sketch out some ideas for a register VM too.

I kind of have the hunch that this is the direction that
will actually let us replace large amounts of Skia's CPU
backend with an efficient interpreter or JIT.

Change-Id: Ia2b5ba4a3fc27556f5b6ba95cd1ace46d3217403
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216665
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-03 19:53:48 +00:00
Ethan Nicholas
40679c3aa5 added SkSL bench
Bug: skia:
Change-Id: I8497ddbc5c5fef4e0fa87f3b9828034ba34284cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217636
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-06-03 16:01:30 +00:00
Hal Canary
dc19391eef SkShaper: new benchmarks
For the record on my machine:

       2897.46 μs   shaper_tifnagh
       2912.11 μs   shaper_hebrew
       2943.12 μs   shaper_english
       2955.57 μs   shaper_greek
       2966.55 μs   shaper_cyrillic
       3057.37 μs   shaper_lao
       3067.87 μs   shaper_nko
       3364.01 μs   shaper_han_traditional
       7876.46 μs   shaper_han_simplified
       9060.30 μs   shaper_ethiopic
      13202.39 μs   shaper_balinese
      24200.44 μs   shaper_buginese
      27776.86 μs   shaper_kana
      29691.41 μs   shaper_sundanese
      30949.22 μs   shaper_newtailue
      34719.73 μs   shaper_tibetan
      35545.17 μs   shaper_thai
      36623.54 μs   shaper_taitham
      42048.83 μs   shaper_mandaic
      48342.53 μs   shaper_khmer
      65015.62 μs   shaper_javanese
      82198.24 μs   shaper_tamil
      99166.26 μs   shaper_bengali
      99824.46 μs   shaper_hangul
     101777.10 μs   shaper_sinhala
     105471.68 μs   shaper_cherokee
     131298.10 μs   shaper_myanmar
     134949.71 μs   shaper_thaana
     143183.11 μs   shaper_devanagari
     177995.12 μs   shaper_syriac
     186761.23 μs   shaper_vai
     236699.95 μs   shaper_emoji

Change-Id: I312c8333be2408090797cddfe25ef2ccc6eaf82b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211823
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-05-03 14:22:35 +00:00
Mike Reed
e3f17b911f remove SkMixer, since we have explicit lerps/blends in SkShader
Change-Id: I937861df9d8ae89c0587ea59dd740989bebd35a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207305
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-04-10 20:59:30 +00:00
Brian Osman
f9666f5467 Remove SkColorSpaceXformCanvas, and supporting code:
- SkColorSpaceXformer
- makeColorSpace on SkShader, SkColorFilter,
  SkImageFilter, SkDrawLooper, and SkLights
- DM support and some bot configs

Bug: skia:8773
Change-Id: I16ef8f487de6c35329b3b0474c1d66d7fa0a6220
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202430
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-03-21 17:12:33 +00:00
Mike Reed
90155edf14 add bench for mixers
Bug: skia:
Change-Id: I1b12c0deac802fb9da8bd285c1ff6d7e63da00f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201687
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-03-16 16:39:17 +00:00
Herb Derby
2e845910be Benchmark for charToGlyph
Change-Id: Id8c7a37c62b596b9f73e331d9a3e36ccd3a51513
Reviewed-on: https://skia-review.googlesource.com/c/188461
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-02-04 18:03:52 +00:00