Commit Graph

26 Commits

Author SHA1 Message Date
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
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
Robert Phillips
1cec4d5e3d Add a program iterator to SkDeferredDisplayList
Bug: skia:9455
Change-Id: I201218174b5d6efb72f7c06766a49f6711325bd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272530
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-24 14:03:06 +00:00
Robert Phillips
7b0ed557a9 Start precompiling DDL shaders
This is through a private API but it, at least, connects things end-to-end.

Bug: skia:9455
Change-Id: Ib34d49c5c4e4cfa5fa599afc5c967fcadc3de10e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268627
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-02-20 18:08:13 +00:00
Mike Reed
3eaed8d009 fix clang-tidy warnings
unused declaration
passing std::move() to const&

These are triggering warnings in google3

Change-Id: I12cebd0a8fd218e7755718fed7acec7908d386a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271138
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-15 16:32:46 +00:00
Robert Phillips
a865a3aedb Improve DDLTileHelper
TileData now gets a pointer to the final surface
   This allows the tile to, once rendered, compose itself into
   the final surface

DDLTileHelper now stores the TileData in a dumb array
   SkTArray is overkill and, since TileData*s are being doled
   out to threads, we never want reallocation

Added DDLTileHelper::kickOffThreadedWork
   The old code only performed DDL creation in parallel. This
   entry point also replays the DDLs and composes them into the
   final surface in parallel

Change-Id: I66e02ef7f8291b4d402e22bee0ad3546e930609e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270796
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-14 18:48:50 +00:00
Greg Daniel
f41b2bd449 Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit f21bf9e50b.

Reason for revert: relanding with infra fix

Original change's description:
> Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
>
> This reverts commit 2a5954140b.
>
> Reason for revert: breaking everything
>
> Original change's description:
> > Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> >
> > Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ibd3a06e4a91dbb1f225dcc8d17d0db3967b6f85f
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236350
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-22 20:52:09 +00:00
Greg Daniel
f21bf9e50b Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit 2a5954140b.

Reason for revert: breaking everything

Original change's description:
> Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> 
> Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-22 20:12:38 +00:00
Greg Daniel
2a5954140b Merge GrOpList and GrRTOpList and rename to GrOpsTask.
Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-22 19:33:01 +00:00
Chris Dalton
6b49810f98 Extract a GrRenderTask base class from GrOpList
This is a more abstract representation of something that can
participate in the DAG by modifying a GrSurfaceProxy's pixels. This
will serve as the direct base class for future DAG participants that
aren't opLists, and help to eventually remove GrTextureOpList.

Bug: skia:
Change-Id: Ia903c0188e0f6a6602781b90ee8da87ba3cc13f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-08-02 16:56:09 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Jim Van Verth
21bd60daa3 Connect up YUVA images for testing.
* Fixes isTextureBacked() for SkImage_GpuYUVA
* Hooks in SkImage_GpuYUVA::MakePromiseYUVATexture()
* Pass down plane texture sizes to MakePromiseYUVATexture()
* Move some other methods to SkImage_GpuBase.

Bug: skia:7901
Change-Id: I33d62c16b426abba5830f7168f9f8fd54a0cb093
Reviewed-on: https://skia-review.googlesource.com/c/161149
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-10-12 19:31:08 +00:00
Robert Phillips
bfa76f20bf Add GM for less common YUV formats (take 2)
Bug: skia:7903
Change-Id: I2399e4aaae6b91914d637ff0e921e04596b52836
Reviewed-on: https://skia-review.googlesource.com/159141
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-10-03 17:22:02 +00:00
Mike Klein
b5ba83993b Revert "Add GM for less common YUV formats"
This reverts commit 412dd56589.

Reason for revert: serialize-8888

Original change's description:
> Add GM for less common YUV formats
> 
> Bug: skia:7903
> Change-Id: I0d6e6d6274d66a71aaf24b68b6d9ceb0f2148b68
> Reviewed-on: https://skia-review.googlesource.com/157601
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I3c8375244ddee5d12836076793ec78a46cc04450
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7903
Reviewed-on: https://skia-review.googlesource.com/c/159043
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-02 20:36:15 +00:00
Robert Phillips
412dd56589 Add GM for less common YUV formats
Bug: skia:7903
Change-Id: I0d6e6d6274d66a71aaf24b68b6d9ceb0f2148b68
Reviewed-on: https://skia-review.googlesource.com/157601
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-10-02 18:57:58 +00:00
Robert Phillips
e8e2bb1384 Test YUV images in DDL
The main two CLs calved off (and landed independently) from this CL are:

https://skia-review.googlesource.com/c/skia/+/156761 (Add SkImage_Gpu::MakePromiseYUVATexture)
  -- adds internal place holder for YUVA promise images (only returns Y channel)

https://skia-review.googlesource.com/c/skia/+/156140 (Add SkImage_Base API to access planar data)
  -- adds ability to grab planes for testing purposes (not externally visible)

Bug: skia:7903
Bug: skia:8424
Change-Id: Id0f2f84851dacc66c2c266a30cafa0b628b12eb4
Reviewed-on: https://skia-review.googlesource.com/151983
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-10-01 12:12:29 +00:00
Robert Phillips
7a3197bae3 Revert "Fix bug in GM's DDL drawing mode"
This reverts commit 06f69eb296.

Reason for revert: SKPBench dying

Original change's description:
> Fix bug in GM's DDL drawing mode
> 
> Due to how we were constructing the promise images we weren't hitting this before.
> 
> It is possible, when re-inflating the images of an SKP, that a draw occurs to create an image subset. When this occurs it is crucial that the generated opList be added to the appropriate drawing manager (so that it gets copied into the DDL).
> 
> This CL gets rid of the prior hack. It does have the (minor) downside that the SkDDLRecorders are now all created outside of their thread silos.
> 
> Change-Id: Ic6b23a8b68c0d4fe25dd8588c6e2ab65f9f238cf
> Reviewed-on: https://skia-review.googlesource.com/157080
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia52094ce0e356b77b025a7352f2cc728df77d259
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/157223
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-26 21:18:28 +00:00
Robert Phillips
06f69eb296 Fix bug in GM's DDL drawing mode
Due to how we were constructing the promise images we weren't hitting this before.

It is possible, when re-inflating the images of an SKP, that a draw occurs to create an image subset. When this occurs it is crucial that the generated opList be added to the appropriate drawing manager (so that it gets copied into the DDL).

This CL gets rid of the prior hack. It does have the (minor) downside that the SkDDLRecorders are now all created outside of their thread silos.

Change-Id: Ic6b23a8b68c0d4fe25dd8588c6e2ab65f9f238cf
Reviewed-on: https://skia-review.googlesource.com/157080
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-26 17:57:36 +00:00
Robert Phillips
f18c756360 Pull non-substantive changes out of omnibus CL
https://skia-review.googlesource.com/c/skia/+/131500 (Move op memory
storage to GrContext) is still a bit of a monster. Offload the trivial
stuff.

Change-Id: I27eb0c441d08111491b3cfee3b93d260c26c2790
Reviewed-on: https://skia-review.googlesource.com/134501
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-13 18:07:58 +00:00
Brian Osman
c7ad40f76f Remove SK_SUPPORT_GPU checks in tool-only code
Most of this is (obviously) not necessary to do, but once
I started, I figured I'd just get it all. Tools (nanobench,
DM, skiaserve), all GMs, benches, and unit tests, plus support
code (command line parsing and config stuff).

This is almost entirely mechanical.

Bug: skia:
Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb
Reviewed-on: https://skia-review.googlesource.com/131153
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-31 18:59:44 +00:00
Robert Phillips
96601084b3 Add DDL to SKPBench
Most of this CL is just repackaging the promise image and tile
code from ViaDDL for reuse by SKPBench.

Change-Id: Ie5003c36fe85cc5be9639552f9488b8e92dcdbbf
Reviewed-on: https://skia-review.googlesource.com/129805
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-05-30 10:12:08 +00:00