Commit Graph

139 Commits

Author SHA1 Message Date
John Stiles
46e7507b0d Revert "Performance experiment: Disable SkSL inliner in nanobench/skpbench."
This reverts commit 3f35ac10b4.

Reason for revert: concluding experiment

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
>
> Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: Ia7c34e3e2bb4f777a4bd18a5646e494eeb3c93ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384456
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-13 13:08:19 +00:00
John Stiles
3f35ac10b4 Performance experiment: Disable SkSL inliner in nanobench/skpbench.
This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.

Change-Id: Icbd64096445a353187b30feea68573d89ca18664
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-12 20:45:08 +00:00
Adlai Holler
55aaefe687 Reland "Support sharing promise images between DDLs"
This reverts commit 38b9a4bc3e.

Reason for revert: Fixed ASAN, TSAN, and other bugs via other CLs.

Original change's description:
> Revert "Support sharing promise images between DDLs"
>
> This reverts commit 07e11d48cb.
>
> Reason for revert: Broke DDL3_ASAN and DDL3_TSAN
>
> Original change's description:
> > Support sharing promise images between DDLs
> >
> > - Migrate our code to SkImage::MakePromiseTexture
> > - Have DDLTileHelper share one SKP and one set of promise images across all tiles.
> > - Disallow on-the-fly allocation of mips for promise textures.
> >
> > Bug: skia:10286
> > Change-Id: Ie35976958454fc520f3c9d860e6285441260c9f7
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291938
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I939b14875d1a20e4a92eab94680adcfe9596ad81
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10286
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375738
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>


Bug: skia:10286
Change-Id: Ibfd7dfcd72f10a4e29a87fa8c610f2dfd018e0db
Cq-Include-Trybots: luci.skia.skia.primary:Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL3_ASAN,Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375739
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-03-04 13:10:37 +00:00
Robert Phillips
96f6d9a37f Add DDLTileHelper option to tile separately in x & y
afaik Chrome only tiles in Y which should yield less threaded text blob contention

Change-Id: I9ff484ed2ce66428e2d7ca6188eba79cd99b1547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376608
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-26 16:34:51 +00:00
Adlai Holler
38b9a4bc3e Revert "Support sharing promise images between DDLs"
This reverts commit 07e11d48cb.

Reason for revert: Broke DDL3_ASAN and DDL3_TSAN

Original change's description:
> Support sharing promise images between DDLs
>
> - Migrate our code to SkImage::MakePromiseTexture
> - Have DDLTileHelper share one SKP and one set of promise images across all tiles.
> - Disallow on-the-fly allocation of mips for promise textures.
>
> Bug: skia:10286
> Change-Id: Ie35976958454fc520f3c9d860e6285441260c9f7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291938
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I939b14875d1a20e4a92eab94680adcfe9596ad81
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10286
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375738
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-25 17:55:00 +00:00
Adlai Holler
07e11d48cb Support sharing promise images between DDLs
- Migrate our code to SkImage::MakePromiseTexture
- Have DDLTileHelper share one SKP and one set of promise images across all tiles.
- Disallow on-the-fly allocation of mips for promise textures.

Bug: skia:10286
Change-Id: Ie35976958454fc520f3c9d860e6285441260c9f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291938
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-25 17:00:19 +00:00
John Stiles
cbd65754f2 Revert "Performance experiment: Disable SkSL optimization in nanobench/skpbench"
This reverts commit b34a896c12.

Reason for revert: experiment is complete

Original change's description:
> Performance experiment: Disable SkSL optimization in nanobench/skpbench
>
> Cloned from http://review.skia.org/369716
> Re-running the experiment now that @switch is supported when
> optimizations are disabled.
>
> Change-Id: I428051d9c679a8084589fba428a637f36587be16
> Bug: skia:11341
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374516
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I1e91c55538ef35f413f2c41c83df9d9c0f29d9a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375016
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-24 14:14:26 +00:00
John Stiles
b34a896c12 Performance experiment: Disable SkSL optimization in nanobench/skpbench
Cloned from http://review.skia.org/369716
Re-running the experiment now that @switch is supported when
optimizations are disabled.

Change-Id: I428051d9c679a8084589fba428a637f36587be16
Bug: skia:11341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374516
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-23 22:21:30 +00:00
Brian Osman
4f065e286d Revert "Performance experiment: Disable SkSL optimization in nanobench/skpbench"
This reverts commit 5ad759065d.

Reason for revert: Experiment concluded - got the data we need.

Original change's description:
> Performance experiment: Disable SkSL optimization in nanobench/skpbench
>
> Change-Id: I974571e7e0e9d0170f92b970d425d9ce530e312e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369716
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I68bc07e8a604abb77fe9c1f1dac794ab7b90b9e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370156
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-13 01:06:13 +00:00
Nathaniel Nifong
ba4c3086ba Move GPU locking logic into generic hardware profile
Change-Id: If130b47acdd7f7fc06daa1d4cb5938e4476e0171
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367776
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2021-02-12 23:01:08 +00:00
Adlai Holler
79426194de Pipe ReducedOpsTaskSplitting into skpbench.py
This ought to help!

Bug: skia:10877
Change-Id: I8265c26dc4146ab78c125f27b533915cfb61aae8
Cq-Include-Trybots: luci.skia.skia.primary:Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_ReduceOpsTaskSplitting_Skpbench,Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_ReduceOpsTaskSplitting_Skpbench,Test-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-ASAN_ReduceOpsTaskSplitting_Vulkan
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369756
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-12 19:32:02 +00:00
Brian Osman
5ad759065d Performance experiment: Disable SkSL optimization in nanobench/skpbench
Change-Id: I974571e7e0e9d0170f92b970d425d9ce530e312e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369716
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-12 16:02:25 +00:00
Herb Derby
1db274d0b9 add sample output to skpbench
Change-Id: I67338888313b11dceec1548e3e031cff92bf46f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364956
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-02-03 17:25:59 +00:00
Nathaniel Nifong
9109dc17af Skpbench: perform core locking functionality into generic hardware profile
Change-Id: Id1c7d156276bca53f8cbac64997ad3f1c139cf4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364836
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2021-02-03 16:40:19 +00:00
Florin Malita
7006e15df5 [svg] Allow clients to pass a custom SkFontMgr
Introduce a Builder helper and plumb the client-provided SkFontMgr for
font resolution.

Also clean up some of the legacy SkSVGDom factories.

Bug: skia:10840
Change-Id: I6e1eabe7c257cb75dfdb5bf67054f93f25769027
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333577
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-11-11 01:51:44 +00:00
Robert Phillips
0c0884991d Update DDL testing harness to support drawing DDL w/ integer offsets
This isn't hooked up anywhere but breaks up the omnibus CL.

Change-Id: I15c200e57450e7cc8ee95a3f7969926d0eb8487f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333129
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-10 14:34:46 +00:00
Florin Malita
b3418103e9 Reland "[svg] Relocate out of experimental"
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

This reverts commit d6cf56fd34.

TBR=

Change-Id: Ibadd7c8dc0464ec0c27841530ade0c2098305d20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327344
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2020-10-16 02:32:41 +00:00
Robert Phillips
d6cf56fd34 Revert "[svg] Relocate out of experimental"
This reverts commit 6fc4106a9d.

Reason for revert: Blocking the Android roll

Original change's description:
> [svg] Relocate out of experimental
>
> Move the SVG rendering code to modules/svg, and componentize.
> Also split into include/src/utils.
>
> As external clients still reference the old header locations,
> introduce temporary forwarding headers to facilitate the migration.
>
> Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

TBR=fmalita@chromium.org,fmalita@google.com,tdenniston@google.com

Change-Id: I386cf77a15a9e1d392029804abaf937dae53f435
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327342
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-15 18:54:18 +00:00
Florin Malita
6fc4106a9d [svg] Relocate out of experimental
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-15 14:36:06 +00:00
Adlai Holler
a069304560 Rename GrContextPriv to GrDirectContextPriv
Change-Id: I3fccadd8a2860dbee73f93f995738146373f8a39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326196
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-14 16:46:01 +00:00
Ben Wagner
ae4bb98f13 Reland "Remove use of legacy display globals."
This is a reland of c1916c34fe

As it turns out, benches are not always given a canvas.

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

Change-Id: I61a2ac058fafc99653e3304876cf4b97350dac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322490
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 19:13:58 +00:00
Herb Derby
4c3486e6f1 add pixel xl to skpbench
Change-Id: I931292a74e39eb06715ce3dde6a4662474a23df6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322322
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-10-05 18:34:18 +00:00
Jim Van Verth
bd0881cb58 Revert "Remove use of legacy display globals."
This reverts commit c1916c34fe.

Reason for revert: Bots unhappy

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com

Change-Id: I365d2b1d19241a90130bc1b59663651817966f63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322400
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-05 16:34:15 +00:00
Ben Wagner
c1916c34fe Remove use of legacy display globals.
In the ongoing effort to remove the display globals from Skia, allow
their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
in a normal Skia build and remove all use from Skia code.

Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 15:53:10 +00:00
Chris Dalton
9278f10795 Add "AllPathsVolatile" skpbench bots
Also adds GalaxyS20 to the mix, which wasn't running skpbench
previously.

Also removes the skpbench logic to fail if we don't recognize the
hardware or have specific scripts for it. We don't have time to reverse
engineer every new piece of hardware we want to run on and the general
android script is quite helpful already.

Bug: skia:10419
Change-Id: I0e139cdd4bc2e7ca0e2e14c715d319664fa8c949
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319143
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-24 19:50:34 +00:00
Brian Salomon
59c60b0cb3 Reland "Add idea of DataType to SkYUVAPixmapInfo."
This is a reland of ed63444587

Original change's description:
> Add idea of DataType to SkYUVAPixmapInfo.
> 
> DataType describes the data type of YUVA channels
> independent of how they are grouped into planes.
> 
> Adds mapping functions between SkColorType/channel count
> and DataType.
> 
> SkYUVAPixmapInfo can be constructed from DataType and will
> choose appropriate SkColorTypes for each plane.
> 
> Valid SkYUVAPixmapInfos now have the same DataType for each
> plane (could relax this in the future, esp for alpha plane).
> 
> SkYUVAPixmapInfo::SupportedDataTypes specifies the supported
> combinations of SkYUVAInfo::PlanarConfig and
> kYUVAPixmapInfo::DataType supported by a GrContext (based on
> supported texture formats).
> 
> SkImageGenerator/SkCodec YUVA query API now takes a
> SupportedDataTypes.
> 
> Change-Id: I8791234638e6ba3396d1e7960b7bc210edc6dd57
> Bug: skia:10632
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314276
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:10632
Change-Id: I35b55b7477c11c822fdb3729a9f84acff1eb785d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315284
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-03 18:05:17 +00:00
Michael Ludwig
c7fa895e50 Revert "Add idea of DataType to SkYUVAPixmapInfo."
This reverts commit ed63444587.

Reason for revert: trying to unblock android roller, which incorrectly thinks this has a merge conflict: https://b.corp.google.com/issues/167576324

Original change's description:
> Add idea of DataType to SkYUVAPixmapInfo.
> 
> DataType describes the data type of YUVA channels
> independent of how they are grouped into planes.
> 
> Adds mapping functions between SkColorType/channel count
> and DataType.
> 
> SkYUVAPixmapInfo can be constructed from DataType and will
> choose appropriate SkColorTypes for each plane.
> 
> Valid SkYUVAPixmapInfos now have the same DataType for each
> plane (could relax this in the future, esp for alpha plane).
> 
> SkYUVAPixmapInfo::SupportedDataTypes specifies the supported
> combinations of SkYUVAInfo::PlanarConfig and
> kYUVAPixmapInfo::DataType supported by a GrContext (based on
> supported texture formats).
> 
> SkImageGenerator/SkCodec YUVA query API now takes a
> SupportedDataTypes.
> 
> Change-Id: I8791234638e6ba3396d1e7960b7bc210edc6dd57
> Bug: skia:10632
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314276
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,scroggo@google.com

Change-Id: I72c39539a4766f10cac3ca3cdef6c503a8319ff1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314895
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-02 21:26:39 +00:00
Brian Salomon
ed63444587 Add idea of DataType to SkYUVAPixmapInfo.
DataType describes the data type of YUVA channels
independent of how they are grouped into planes.

Adds mapping functions between SkColorType/channel count
and DataType.

SkYUVAPixmapInfo can be constructed from DataType and will
choose appropriate SkColorTypes for each plane.

Valid SkYUVAPixmapInfos now have the same DataType for each
plane (could relax this in the future, esp for alpha plane).

SkYUVAPixmapInfo::SupportedDataTypes specifies the supported
combinations of SkYUVAInfo::PlanarConfig and
kYUVAPixmapInfo::DataType supported by a GrContext (based on
supported texture formats).

SkImageGenerator/SkCodec YUVA query API now takes a
SupportedDataTypes.

Change-Id: I8791234638e6ba3396d1e7960b7bc210edc6dd57
Bug: skia:10632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314276
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-02 13:21:45 +00:00
Mike Reed
92f6eb1602 use pathbuilder
Change-Id: I2bca419a3273a9cc8a984b0f4159f518968c6652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313077
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-25 16:29:48 +00:00
Robert Phillips
7b4e43c522 Update final set of tools to take GrDirectContext
This updates skiaserve, fm, and the fuzzer

Change-Id: Ia1b447b79723eeab73da11755d28f7ab443d5fbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300263
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-06 12:48:03 +00:00
Robert Phillips
00f78de600 Update additional tools to take a GrDirectContext
GM was updated in:
https://skia-review.googlesource.com/c/skia/+/300172 (Make GM::onGpuSetup take a GrDirectContext)

This CL updates: skpbench, nanobench, and some testing infrastructure.

Only minor changes were made to the unit tests as they will be updated
en masse in a follow up cl.

Change-Id: Ieffc98865d4c9fc73e292d3c807ed4ae2081745a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300220
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-01 20:42:25 +00:00
Greg Daniel
ce9f016ed3 Remove unused GrFlushFlags.
This also adds back default flush() calls which simply do a flush
without any submit.

Change-Id: Ia8c92bbdecd515d871abfa6364592f502e98656b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298818
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-06-30 19:39:31 +00:00
John Stiles
30212b7941 Fix implicit fallthroughs throughout Skia.
This CL is not fully comprehensive; for instance, it does not contain
fixes for backends that don't compile on Mac. But it does resolve the
vast majority of cases that trigger -Wimplicit-fallthrough.

A few minor bugs were found and fixed, but none that were likely to
affect normal operation.

Change-Id: I43487602b0d56200ce8b42702e04f66390d82f60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295916
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-11 22:29:53 +00:00
Nathaniel Nifong
cd0df4f7cd Add a basic readme to help the uninitiated build and run skpbench
Change-Id: Ib276f960f385c88392bca90924a9a42752e585ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295603
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-06-11 13:27:03 +00:00
Adlai Holler
e5c379d3a1 Reland "Update skpbench to let the gpu thread run alongside the recording threads"
This reverts commit 2403a1001b.

Reason for revert: Fixed bot failure

Original change's description:
> Revert "Update skpbench to let the gpu thread run alongside the recording threads"
>
> This reverts commit ca06ce48f1.
>
> Reason for revert: It is dying on a bot with the error:
> skpbench.py: error: unrecognized arguments: --ddlNumRecordingThreads c:\b\s\w\ir\skp
>
> Original change's description:
> > Update skpbench to let the gpu thread run alongside the recording threads
> >
> > Bug: skia:10176
> > Change-Id: Ibadd52b86abfd2802b9b3f31c86ab573554601db
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289883
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: Iec316410563f0fe1d06f44bcfa58f6790c547f98
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290117
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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


Bug: skia:10176
Change-Id: I1b57c91ed60b093440191274d1acb72d9e0c3b37
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290443
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-05-18 15:12:47 +00:00
Robert Phillips
2403a1001b Revert "Update skpbench to let the gpu thread run alongside the recording threads"
This reverts commit ca06ce48f1.

Reason for revert: It is dying on a bot with the error:
skpbench.py: error: unrecognized arguments: --ddlNumRecordingThreads c:\b\s\w\ir\skp

Original change's description:
> Update skpbench to let the gpu thread run alongside the recording threads
> 
> Bug: skia:10176
> Change-Id: Ibadd52b86abfd2802b9b3f31c86ab573554601db
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289883
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Iec316410563f0fe1d06f44bcfa58f6790c547f98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290117
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-05-15 12:19:27 +00:00
Adlai Holler
ca06ce48f1 Update skpbench to let the gpu thread run alongside the recording threads
Bug: skia:10176
Change-Id: Ibadd52b86abfd2802b9b3f31c86ab573554601db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289883
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-05-14 21:13:16 +00:00
Greg Daniel
0a2464f51f Update internal skia uses to use flushAndSubmit and submit calls.
Bug: skia:10118
Change-Id: Ieb7c0eece56d3d9df56ecb52e00e76c01f038de8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289888
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-14 20:26:44 +00:00
John Stiles
00ee8f58aa Fix format specifier in skpbench.
`zu` is the expected specifier for a size_t. `li` can cause errors in
the Android build.

Change-Id: Ie418c9e8778a629acf47ae58a2720fd11a732c87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287896
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-05-06 20:57:14 +00:00
Robert Phillips
11c6767a17 Create DDL for final composition step in DDL test harness
Besides better matching Viz's behavior this also reduces a lot of choppiness in the composition RenderTask DAG.

In the previous approach DDL draws and compositing draws would be interleaved resulting in a lot of render target swaps.

This necessitated some reorganization bc I wanted to reuse PromiseImageCallbackContext to manage the tiles' promiseImages.

Change-Id: I513bf060a69ff2bfe0e7b82ae72f149dfede632e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285056
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-24 12:16:34 +00:00
Robert Phillips
8472a3d01c Update DDL test harness to use backendTextures to back tiles (take 2)
This better matches Chrome's use of DDLs.

With path, image, and text draws stripped out, here is the perf impact of this change:

           before CL   after CL
w/ DDLs      7.792      1.038
w/o DDLs     0.800      0.876

This perf improvement (in the DDL case) is from backend texture wrapping SkSurfaces being created w/o initialization. The prior method of SkSurface creation was resulting in double clearing of all the surfaces.

This perf improvement won't be seen by Chrome since they've always being using wrapped backend texture SkSurfaces.

TBR=bsalomon@google.com

Bug: 1056730
Change-Id: Ic04d322cad96df845e75437211208495862c6555
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283866
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-17 14:39:44 +00:00
Robert Phillips
9ff1d841f6 Revert "Update DDL test harness to use backendTextures to back tiles"
This reverts commit 7ae9d2fca6.

Reason for revert: Triggering Vulkan Debug layer errors

Original change's description:
> Update DDL test harness to use backendTextures to back tiles
> 
> This better matches Chrome's use of DDLs.
> 
> With path, image, and text draws stripped out, here is the perf impact of this change:
> 
>            before CL   after CL
> w/ DDLs      7.792      1.038
> w/o DDLs     0.800      0.876
> 
> This perf improvement (in the DDL case) is from backend texture wrapping SkSurfaces being created w/o initialization. The prior method of SkSurface creation was resulting in double clearing of all the surfaces.
> 
> This perf improvement won't be seen by Chrome since they've always being using wrapped backend texture SkSurfaces.
> 
> TBR=bsalomon@google.com
> Change-Id: Ice3993ca125fce37804e58c353c265cf659dbe2f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283456
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ife023ede0774ec2cce4c0d6e7708c036347ebf54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283648
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-15 16:22:17 +00:00
Robert Phillips
7ae9d2fca6 Update DDL test harness to use backendTextures to back tiles
This better matches Chrome's use of DDLs.

With path, image, and text draws stripped out, here is the perf impact of this change:

           before CL   after CL
w/ DDLs      7.792      1.038
w/o DDLs     0.800      0.876

This perf improvement (in the DDL case) is from backend texture wrapping SkSurfaces being created w/o initialization. The prior method of SkSurface creation was resulting in double clearing of all the surfaces.

This perf improvement won't be seen by Chrome since they've always being using wrapped backend texture SkSurfaces.

TBR=bsalomon@google.com
Change-Id: Ice3993ca125fce37804e58c353c265cf659dbe2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283456
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-15 16:07:47 +00:00
Robert Phillips
24a8e9e170 Reland "Update skpbench's DDL timing"
This reverts commit f35dfabe40.

Reason for revert: 

Relanding - usage of the flag has been removed from the bots in:

https://skia-review.googlesource.com/c/skia/+/275688 (Remove bot to record DDL creation time)

Original change's description:
> Revert "Update skpbench's DDL timing"
> 
> This reverts commit 6f0124ad68.
> 
> Reason for revert: need to remove flag on bots first
> 
> Original change's description:
> > Update skpbench's DDL timing
> > 
> > Chrome is seeing some extra overhead when using DDLs for rasterization. This CL updates skpbench to try to replicate their usage of DDLs (or, at least, better illustrate the overhead of using DDLs).
> > 
> > Bug: skia:9455
> > Change-Id: I2abc7cf2d597c97d1d7a47425064c621a7ef0eb3
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275496
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,robertphillips@google.com
> 
> Change-Id: I87b8c78355b81f5f6c90b74f59f176f3cdbdfdaa
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:9455
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275681
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I18446e385edb7827fae89541a03545194fe84f6a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275691
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-06 20:26:50 +00:00
Robert Phillips
e690d9b60c Remove bot to record DDL creation time
This option is being removed in:

https://skia-review.googlesource.com/c/skia/+/275496 (Update skpbench's DDL timing)

Change-Id: Ibdb0c3c04d38503a97add94286d252b664a0eda5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275688
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-06 20:20:50 +00:00
Robert Phillips
f35dfabe40 Revert "Update skpbench's DDL timing"
This reverts commit 6f0124ad68.

Reason for revert: need to remove flag on bots first

Original change's description:
> Update skpbench's DDL timing
> 
> Chrome is seeing some extra overhead when using DDLs for rasterization. This CL updates skpbench to try to replicate their usage of DDLs (or, at least, better illustrate the overhead of using DDLs).
> 
> Bug: skia:9455
> Change-Id: I2abc7cf2d597c97d1d7a47425064c621a7ef0eb3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275496
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I87b8c78355b81f5f6c90b74f59f176f3cdbdfdaa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275681
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-06 19:14:10 +00:00
Robert Phillips
6f0124ad68 Update skpbench's DDL timing
Chrome is seeing some extra overhead when using DDLs for rasterization. This CL updates skpbench to try to replicate their usage of DDLs (or, at least, better illustrate the overhead of using DDLs).

Bug: skia:9455
Change-Id: I2abc7cf2d597c97d1d7a47425064c621a7ef0eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275496
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-06 18:46:41 +00:00
Robert Phillips
6eb5cb96fc Clean up for DDL program pre-compilation
This CL:
  1) Fixes a GrTexture access in GrTextureEffect that was blocking pre-compilation

  2) Adds program pre-compilation to the DDL Via - which would've caught the GrTextureEffect problem on the bots

  3) Adds some #if'ed out code for collecting program pre-compilation stats

Bug: skia:9455
Change-Id: Ibcb07ae855b7a644e1f22c3427a928f116ab300d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-05 19:11:37 +00:00
Robert Phillips
19f466d399 Adds gpu stats for program cache
With the addition of the DDL program pre-compilation we need to know how it is working.

This CL also fixes some threading bugs.

Bug: skia:9455
Change-Id: I20da58a7f1b19685687fae1d159d4e0db8a4964d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273001
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-26 16:11:56 +00:00
Greg Daniel
02497d4016 Update nanobench and skpbench to use flush API for gpu syncing.
This also allows us to remove all the one off Fence code that we
implemented in all the backend TestContexts

Change-Id: I9ff7ba4690cf3f19a180f51fc510991a112bb62c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272456
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-02-24 17:21:35 +00:00