Commit Graph

3984 Commits

Author SHA1 Message Date
Brian Salomon
f2c52efce5 Update valgrind suppression
TBR: egdaniel@google.com

Change-Id: If44b5d4b4ac2ffbff5b10950fdf37bf6e79864ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225097
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-02 01:45:03 +00:00
Robert Phillips
da2e67a357 Add GrProtected parameter to all createBackendTexture variants
Change-Id: I667bc730e321b579bef98f3d6003f7a7b29c9890
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224957
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-01 19:46:18 +00:00
Brian Salomon
1d43530aa2 Pass alpha type to GrSurfaceContext::read/writePixels and remove flags.
We deduce whether to premul or unpremul based on the the input/output
alpha types. This means we also now support unpremuling on write and
premuling on read.

Class-ify former struct GrPixelInfo. Remove origin and instead pass a
flip bool to GrConvertPixels.

Unifies read/write methods on GrSurfaceContext via automatic conversion
of SkImageInfo to GrPixelInfo and making GrDirectContext an optional
parameter.

Bug: skia:7580

Change-Id: I42f6997852b4b902fb81264c6de68ca9537606aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224281
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-01 17:30:40 +00:00
Greg Daniel
ab013ebe9c Move GL caps textureable and fbocolorattachment flags to FormatInfo.
Change-Id: I68d623151a64dd68a5ea7a396023c7909c6e48a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223798
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-06-28 19:43:37 +00:00
Brian Osman
9c310473c6 Reland "DM: Add a per-sink MemoryCache to all GPU sinks"
Once https://skia-review.googlesource.com/c/skia/+/224258 lands, this
should be safe.

This reverts commit 1958fbbcff.

Change-Id: I2fca1e60a2d945d440b7cd5f60e4b4dec211decd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224278
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-28 16:30:24 +00:00
Ravi Mistry
199ff68ad3 [lottie-web-perf] Use canvas renderer for lottie-web
NoTry: true
Bug: skia:9195
Change-Id: I79276468c153783aebe7fdeda288166c52a6d1bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224286
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-28 00:17:36 +00:00
Brian Osman
1958fbbcff Revert "DM: Add a per-sink MemoryCache to all GPU sinks"
This reverts commit a7b224d3a3.

Reason for revert: Failures on some ANGLE bots

Original change's description:
> DM: Add a per-sink MemoryCache to all GPU sinks
> 
> This isolates the caches per config, so we don't try to reuse cached
> binaries across different GL versions (or different D3D backend versions
> on ANGLE bots, etc).
> 
> Locally, this sped up ANGLE significantly Looking at a sample bot
> (NUC6i5SYK), it dropped DM from 36m to 31m.
> 
> Change-Id: I95db18c6ea85041e6adbc972f0118233c82818fb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223985
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I8c9af65d89fddb28e5f1395a6c946312f27ba48a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224186
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-27 14:39:09 +00:00
Brian Osman
a7b224d3a3 DM: Add a per-sink MemoryCache to all GPU sinks
This isolates the caches per config, so we don't try to reuse cached
binaries across different GL versions (or different D3D backend versions
on ANGLE bots, etc).

Locally, this sped up ANGLE significantly Looking at a sample bot
(NUC6i5SYK), it dropped DM from 36m to 31m.

Change-Id: I95db18c6ea85041e6adbc972f0118233c82818fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223985
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-27 13:21:13 +00:00
Hal Canary
02eefbeca9 header self-sufficiency and idempotency
Change-Id: I4ec74a358e11d85c6eaf1658efd6f1391ee5e387
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223930
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-06-26 19:12:43 +00:00
Chris Dalton
b3c9745911 Remove "nvpr" configs
The majority of our gm testing has been disabling nvpr, which doesn't
match our real-world behavior where we use nvpr whenever available.
This CL fixes the issue by completely removing the explicit nvpr
configs. Now if we have nvpr, you get it.

This CL also lowers the nvpr priority in the path renderer chain and
adds a "NonNVPR" job on Quadro where we can continue to test our
non-nvpr codepaths on NVIDIA.

Bug: skia:
Change-Id: I6a36f1101c8218adcaaf10cab25d2c28e70371f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223828
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-06-26 16:53:50 +00:00
Ravi Mistry
832623902b [skottie-wasm-perf] Catch and exit with error if browser does not open
Might as well do the same in lottie-web-perf.
Also mark as infra failures to distinguish from real failures.

NoTry: true
Bug: skia:9207
Change-Id: Id1f3cc5719094d0bf0179ea1a84529c6f376e356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223917
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-26 14:11:20 +00:00
Brian Salomon
d628747dfb Make GrColorSpaceInfo store GrColorType.
This is largely redundant with GrPixelConfig. However, we intend to
remove GrPixelConfig.

Bug: skia:7580

Change-Id: I03d92303be832711f7821f8a97d36387c9b04a9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222883
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-25 14:29:09 +00:00
Chris Dalton
a1638a527e Rename "preferredInternalSampleCount" to "internalMultisampleCount"
Bug: skia:
Change-Id: If6e0287b3d631f4f3856875d94c84d1ddea44f22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223279
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-06-24 19:40:12 +00:00
Ravi Mistry
137822513c [lottie-web-perf] Make similar to skottie-wasm-perf
* Take 25 evenly distributed sample points.
* Fix bug where goToAndStop was not seeking to a frame.
* Make sure it draws to 1000x1000.

NoTry: true
Bug: skia:9195
Change-Id: I73139e41542d22329bb9e3383059ac50011a9882
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223300
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-24 19:05:30 +00:00
Ravi Mistry
f52bce41f7 [skottie-wasm-perf] Make sure we are drawing to 1000x1000
NoTry: true
Bug: skia:9195
Change-Id: I7f5bf641dc69b618f2dfa27200b0e770d9e7ca80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223298
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-24 19:01:32 +00:00
Brian Salomon
e7499c7e8a GrColorSpaceInfo stores SkAlphaType.
This means GrSurfaceContext's know their alpha type.
All GrRenderTargetSurfaceContexts are kPremul.

Make GrTextureProducer store GrColorSpaceInfo.

Bug: skia:7580
Change-Id: I5ff321ef52c0edd32e5fac99dff95d44aa66f592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223184
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-24 17:48:01 +00:00
Mike Klein
2b7b2a2331 add bit_clear
I was just reading the ARM docs and realized that their BIC ("BIt
Clear") is the same as SSE's ANDN ("AND Not") instruction.  It's kind of
a neat little tool to have laying around... comes up more than you'd
think, and it's sometimes the clearest way to express what you're doing,
as in the changed program here where the comment is "mask away the low
bits".  That's a bit_clear with a mask for what you want to clear away!

And the real reason to write this up is that I want to have a CL to
point to that shows how to add an instruction top to bottom.

Change-Id: I99690ed9c1009427b3986955e7ae6264de4d215c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223120
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-06-24 16:31:15 +00:00
Emircan Uysaler
23ca4e7dc5 Enable creating protected vulkan backend
This CL allows user to indicate that they have a protected content in
GrVkBackendContext creation which results in protected CommandPool and Queue
usage.

Bug: skia:9016
Change-Id: I6a478d688b6988c2c5e5e98f18f58fb21f9d26ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210067
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Emircan Uysaler <emircan@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-24 16:04:00 +00:00
Chris Dalton
6ce447a4ec Eliminate mixed samples as an FBO type or AA type
From now on, sample counts always refer to the number of actual color
samples, and render targets don't have separate color and stencil
sample counts.

If mixed samples support is available when making a
"GrAAType::kCoverage" draw, then an op may attach and use a mixed
sampled stencil buffer internally. But this will all be invisible to
the client.

After this CL, we temporarily won't have a mode to use nvpr with mixed
samples. That will soon be fixed by a follow-on CL that enables nvpr
with mixed samples in the normal "gl" and "gles" configs.

Bug: skia:
Change-Id: I1cb8277f0d2d0d371f24bb9f39cd473ed5c5c83b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221878
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-06-24 04:08:45 +00:00
Herb Derby
9b06f2168d Add API for glyph image data
Move the invariants for glyph image data into SkGlyph.

Change-Id: I1958612bb73cfffe42df19a11c8899048559013b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222876
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-21 19:56:17 +00:00
Nathaniel Nifong
0426c38daa Reland "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This is a reland of 7635013ad1

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

Bug: 9176
Change-Id: Ifef1ff45ac0013ba3015f88c7ecd75527b28b604
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222505
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-06-21 15:49:21 +00:00
Jim Van Verth
87bda3dabe Fix Mac viewer on command line launch.
If you launch the Mac viewer from the command line, it will sit there
until you click on the thumbnail in the dock, and only then will bring
up the window. This fixes that so it will open the window immediately.

Change-Id: I5628dc6c59833f808a61dedde457774114dd0e94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222783
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-06-21 15:45:22 +00:00
Brian Salomon
384981be3d Revert "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This reverts commit 7635013ad1.

Reason for revert: breaking bots 

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=djsollen@google.com,mtklein@google.com,kjlubick@google.com,reed@google.com,nifong@google.com

Change-Id: Ie5e5dac46ba1beeb8de0a29c1a7be1264616fe92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222502
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-20 18:52:01 +00:00
Mike Klein
397fc88fc0 first VEX ymm vector ops
- 32x8 i32 add,sub,mul
   - add I32_Naive bench/test builder to get better i32 mul coverage
   - minor refactoring all over

Change-Id: I13cc19ff37a2da0bcff289ba51baac08f456d6c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222485
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-20 18:20:00 +00:00
Nathaniel Nifong
7635013ad1 Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-06-20 17:33:04 +00:00
Brian Salomon
f30b1c1bd5 Revert "Revert "Make SkASSERT not break build in constexpr GrSwizzle method on GCC""
This reverts commit 27239e456a.

Revert "Revert "Add function to GrDataUtils to handle color conversions.""

This reverts commit c34d993b62.

Change-Id: Iac1bdaa6f8380e63bbb87394e7fca96808572131
Bug: skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222039
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-20 16:56:15 +00:00
Ravi Mistry
b2ca0067a7 [lottie-web-perf] Add LottieWeb CPU and GPU bots
* Added support for LottieWeb bots in perf_skottiewasm_lottieweb.py
* Adds a LOTTIE_WEB_BLACKLIST for lottie files that crash lottie-web as described in https://bugs.chromium.org/p/skia/issues/detail?id=9187#c4

NoTry: true
Bug: skia:9187
Change-Id: I8dbf485e7162e027cb4c4db2bf8f8e9c3ec4d966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222157
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-20 16:49:13 +00:00
Robert Phillips
b520476ee6 Swap GrSurfaceProxy over to being held via sk_sp
This CL:
   replaces GrProxyRef with sk_sp
   streamlines GrIORefProxy to be more like SkRefCntBase (i.e., move the fTarget pointer to GrSurfaceProxy)

Change-Id: I17d515100bb2d9104eed64269bd3bf75c1ebbbb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221997
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-06-20 11:43:45 +00:00
Ravi Mistry
0233b1edf2 [lottie-web-perf] Use latest lottie-web version and use install location
NoTry: true
Bug: skia:9187
Change-Id: Id0a35b77e41c2b8ef8f3b0b61558c9d96db1c09a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222177
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-19 20:57:20 +00:00
Ravi Mistry
6ac3795ebf [lottie-web-perf] Command line application to measure perf
Uses puppeteer to bring up Chrome headless and then calls lottie-web-perf.html with endpoints for lottie.min.js and the target lottie file.

NoTry: true
Bug: skia:9187
Change-Id: Ic1f4c9fc1cd68b3f747e58bdbf1ea51387e5e139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221717
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-19 17:06:35 +00:00
Brian Osman
f0095cf86a Add option to use a program binary cache in DM, etc
Change-Id: I2117e41388962682a40f9db9ffc62150b30c7847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221779
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-19 00:00:11 +00:00
Brian Osman
064729e439 Implement program binary caching in ES2 (with GL_OES_get_program_binary)
Change-Id: I6f9ee51f7c063ca03bf48fccd413dae244edd191
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 23:49:11 +00:00
Brian Osman
88c05343dd Cast to fix Linux ANGLE builds
Change-Id: I4badf65abc63c592195d0ef9e15c015f7adb54b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221718
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 19:50:08 +00:00
Brian Osman
dbe7cf9c42 Connect ANGLE's trace events to Skia's tracing
ANGLE has a collection of platform hooks for embedding. Setting these
four allows us to get trace events related to shader compile and other
ANGLE work.

Change-Id: I11c32155023c6f4bda72daddfecc2dbe48b00675
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221657
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 18:22:11 +00:00
Brian Osman
fb32ddf622 Revert "Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU""
This reverts commit 37a59ef1af.

Change-Id: If38da265ebbb196e72c7d035ba51028438787e2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221541
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 14:47:12 +00:00
Greg Daniel
f91aeb259e Move a bunch of gpu files out of include/private and into src/gpu.
In GrRecordingContext I moved the auditTrail onto the heap and only there
when compiling for tests. This allowed us to move a lot of files out of
include private.

Change-Id: Ib76ac211c0c6fd10bacaccf0c5f93f21a59f35d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221344
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2019-06-18 14:24:42 +00:00
Ravi Mistry
517be93cab [skottie-wasm-perf] Command line application to measure perf
Uses puppeteer to bring up Chrome headless and then calls
skottie-wasm-perf-html with endpoints for canvaskit.js, canvaskit.wasm,
and the target lottie file.

Notry: true
Bug: skia:9179
Change-Id: I3250f2edf92329dce6e3f0bf125fa26b70bed632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221557
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-18 13:24:15 +00:00
Ravi Mistry
cb5ed84589 [skottie-wasm-perf] Date.now() has millisecs precision, we need microsecs
Uses performance.now() which should be within 5us.
performance.now() was increased to be within 100us in https://chromium-review.googlesource.com/c/chromium/src/+/853505 but this has been undone since then with https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/timing/time_clamper.h?l=26

Verified that the version of puppeteer we will use (1.17.0) uses crrev.com/662092 from puppeteer's package.json that revision is from May/2019 so it does include the 5us change.

NoTry: true
Bug: skia:9179
Change-Id: Ie6a42bae618b2f3a2be1bc229d1e8f8a503259d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221556
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-18 13:06:45 +00:00
Robert Phillips
37a59ef1af Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU"
This reverts commit 90507286cc.

Reason for revert: Seems to be breaking some builds

Original change's description:
> Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU
> 
> Change-Id: I7236a30040ab532086e68d6e9de2898dd7acaa32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221098
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,kjlubick@google.com,brianosman@google.com,ethannicholas@google.com,reed@google.com

Change-Id: Ie230315a72ebcfae32bc9ce7bafec1f87106cff2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221536
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-06-18 11:35:18 +00:00
Chris Dalton
1e6c5b8dee Add a "preferredInternalSampleCount" cap
This new cap tells Ganesh how many samples to use when performing
internal draws with MSAA or mixed samples. The default is always 4x,
but the client can change that with
GrContextOptions::fPreferredInternalMSAASampleCount.

Also adds a command line flag to viewer to control
fPreferredInternalMSAASampleCount.

Bug: skia:
Change-Id: Iba369273e802aa1bee796b576b3c18af347b0494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221156
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-06-17 23:47:59 +00:00
Mike Reed
4b203ad7ac add motion blur params to skottie2movie
--motion_angle ... [default is 180]
--motion_samples ... [default is 1, for no motion blur]

Change-Id: Iec0f31655b3369f51e0b398efb2d5b156dcbaf2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221416
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-06-17 23:13:16 +00:00
Brian Osman
b500ef7a76 Add some precision back to timestamps when using --trace
Optimizations to JSON size (%f -> %g) changed the meaning of the digits
argument, causing these timestamps to become severely truncated. Traces
have been fairly useless as a result (too many events starting/stopping
at the same time). This adds enough digits back that things are better.

Change-Id: I3f2d2a3dd064daf8449ac34ab5440f95e339a392
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221346
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-17 22:08:06 +00:00
Brian Osman
90507286cc Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU
Change-Id: I7236a30040ab532086e68d6e9de2898dd7acaa32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221098
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-17 21:16:18 +00:00
Mike Klein
342b1b2753 proposed: add bytes() op
I'm staring at this assembly,

	vmovups	(%rsi), %ymm3
	vpsrld	$24, %ymm3, %ymm4
	vpslld	$16, %ymm4, %ymm15
	vorps	%ymm4, %ymm15, %ymm4
	vpsubw	%ymm4, %ymm0, %ymm4

Just knowing that could be

	vmovups	(%rsi), %ymm3
	vpshufb	 0x??(%rip), %ymm3, %ymm4
	vpsubw	%ymm4, %ymm0, %ymm4

That is, instead of shifting, shifting, and bit-oring
to create the 0a0a scale factor from ymm3, we could just
byte shuffle directly using some pre-baked control pattern
(stored at the end of the program like other constants)

pshufb lets you arbitrarily remix bytes from its argument and
zero bytes, and NEON has a similar family of vtbl instructions,
even including that same feature of injecting zeroes.

I think I've got this working, and the speedup is great,
from 0.19 to 0.16 ns/px for I32_SWAR, and
from 0.43 to 0.38 ns/px for I32.

Change-Id: Iab850275e826b4187f0efc9495a4b9eab4402c38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220871
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-17 15:29:34 +00:00
Kevin Lubick
5f11dd74ce add html for perfing skottie-wasm
Change-Id: I7ce4d869565d57756b17587fcb612ccbfdbea9e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220747
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-14 17:51:25 +00:00
Derek Sollenberger
d7a959726d Update CtsSkQPTestCases to non-shardable in release script
The curent SKQP runner doesn't support sharding.

Bug: b/134522828
Change-Id: Ia4e147fea36551e71737b16218e316570384f507
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220296
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-06-14 17:05:51 +00:00
Mike Klein
4c4945a252 trim another instruction of I32_SWAR
Now that we've got shr_16x2, extract(..., 8, splat(0x00ff00ff)) is
better done as shr_16x2(..., 8).  This swaps a 16-bit shift in for
the 32-bit shift, a wash, but lets us drop the bit_and at the end,
saving one whole instruction.

This places I32_SWAR a tiny little bit faster than the code in Opts,
like .19 ns/px vs .20 ns/px for Opts.

Change-Id: I4160dc03ecc8b855c0773a927f1510ad5cbb4b87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220856
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-13 21:58:05 +00:00
Mike Klein
7f061fb53b streamline srcover math in I32_SWAR
This is the final bunny I've got in my hat, I think...

Remembering that none of the s += d*invA adds can overflow,
we can use a single 32-bit add to add them all at once.

This means we don't have to unpack the src pixel into rb/ga
halves.  We need only extract the alpha for invA.

This brings I32_SWAR even with the Opts code!

curr/maxrss	loops	min	median	mean	max	stddev	samples   	config	bench
  36/36  MB	133	0.206ns	0.211ns	0.208ns	0.211ns	1%	▁▇▁█▁▇▁▇▁▇	nonrendering	SkVM_4096_I32_SWAR
  37/37  MB	152	0.432ns	0.432ns	0.434ns	0.444ns	1%	▃▁▁▁▁▃▁▁█▁	nonrendering	SkVM_4096_I32
  37/37  MB	50	0.781ns	0.794ns	0.815ns	0.895ns	5%	▆▂█▃▅▂▂▁▂▁	nonrendering	SkVM_4096_F32
  37/37  MB	76	0.773ns	0.78ns	0.804ns	0.907ns	6%	▄█▅▁▁▁▁▂▁▁	nonrendering	SkVM_4096_RP
  37/37  MB	268	0.201ns	0.203ns	0.203ns	0.204ns	0%	█▇▆▆▆▆▁▆▆▆	nonrendering	SkVM_4096_Opts

Change-Id: Ibf0a9c5d90b35f1e9cf7265868bd18b7e0a76c43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220805
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-13 21:32:45 +00:00
Mike Klein
57cb5ba122 i16x2 sub/shr
More i16x2 ops, as seemed immediately useful in I32_SWAR.

   I32_SWAR: 0.27 ns/px  --> 0.25 ns/px
   I32:      0.43 ns/px
   F32:      0.76 ns/px
   RP:       0.8  ns/px
   Opts:     0.2  ns/px

Change-Id: I04fed0d1ed1c4218d0cafb45fd0ee6d68880de80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220801
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-13 19:17:34 +00:00
Mike Klein
3538908983 baby steps into 16-bit ops
I figure the easiest way to expose 16-bit operations
is to expose 16x2 pair operations... this means we
can continue to always work with the same size vector.

Switching from 32-bit multiplies to 16-bit multiplies
is going to deliver the most oomph... they cost roughly
half what 32-bit multiplies do on x86.

Speed now:

   I32_SWAR: 0.27 ns/px
   I32:      0.43 ns/px
   F32:      0.76 ns/px
   RP:       0.8  ns/px
   Opts:     0.2  ns/px

Change-Id: I8350c71722a9bde714ba18f97b8687fe35cc749f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220709
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-13 18:44:44 +00:00