Commit Graph

4413 Commits

Author SHA1 Message Date
Brian Salomon
2eb7b57d14 Remove unused GrTextureDomain
Bug: skia:10139

Change-Id: I20cd95fcf5f11832366c32e48ed4d442c82b0719
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284082
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-21 18:51:24 +00:00
Mike Reed
1174cf82f3 add gm to test pathops bug
Bug: skia:10155
Change-Id: I1e7eb28eb7ea641794adab869d1bca537bdfa30b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284516
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-20 18:31:51 +00:00
Brian Osman
449b1157a7 Plumb SkMatrixProvider throughout Ganesh
Renames the provider to SkMatrixProvider, which is now also able to
provide the local-to-device matrix. Everywhere that does paint
conversion and FP generation now has access to the entire matrix
provider, instead of just the CTM.

This will allow the SkSL FP (and others) to fetch other matrix state.

Change-Id: Iffb00bae0d438da0e8de3eebe75183ed6d440fd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284040
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-20 13:48:40 +00:00
Ethan Nicholas
36a3e014e1 Revert "Converted texture and runtime effects to use GrMatrixEffect"
This reverts commit 4ab84eda53.

Reason for revert: Breaking some GMs.

Original change's description:
> Converted texture and runtime effects to use GrMatrixEffect
> 
> Change-Id: I6e769d52291dd29c2d06983dae5013b6058864cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283780
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Idb2c782ae619689744e868bf38111cc4eaf0b40a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284233
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-04-17 19:00:36 +00:00
Ethan Nicholas
4ab84eda53 Converted texture and runtime effects to use GrMatrixEffect
Change-Id: I6e769d52291dd29c2d06983dae5013b6058864cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283780
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-17 17:43:33 +00:00
Michael Ludwig
c80026c640 Add GM for blur + repeat bugs
Bug: skia:10145
Change-Id: I2b4a531a357dab3493169c63f5ec103e7756ae6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283939
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-04-16 15:20:39 +00:00
Brian Osman
d1afef6b18 Support markers (custom matrices) in SkVertices Attributes
Bug: skia:9984
Change-Id: Ie799ffa19304978e2076f9ba790e8a34c1b03adf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283225
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-15 14:30:46 +00:00
Ethan Nicholas
5843012837 Add sample(child, matrix) to SkSL.
This allows fragment processors to sample their children with their
local coordinate system transformed by a matrix.

Change-Id: Ifa848bbd85b939bbc5751fec5cf8f89ee904bf39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282590
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-04-14 16:07:34 +00:00
Robert Phillips
404b7cf1c4 Appease VS 2019
W/o this change VS 2019 has an internal compiler error on the std::initialize_list<>::begin method.

Change-Id: I3be014e124fcdb29c96c7f71a43ea7e7f039758d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282849
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-10 16:04:37 +00:00
Brian Salomon
c505a45bac Remove GrCaps::getYUVAColorTypeFromBackendFormat().
We no longer need a color type to make a wrapped proxy.

Update image_from_yuv_textures GM to make single channel textures.

Make Image factories that infer SkColorChannel values for YUVAIndices
be smarter about picking the channel for single channel textures.

Bug: skia:10078

Change-Id: I84eeaae5c9197dec96c856ce4263b6bd674e7111
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282623
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-04-10 16:00:37 +00:00
Brian Salomon
12632f11f0 Always initialize YUYAIndex::fChannel in wacky YUV format GMs
Speculative fix for MSAN failure.

Change-Id: I8c71186f40ddfa60418e917bd7b248a33883669c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282844
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-04-10 14:37:06 +00:00
Brian Salomon
f7255d72f8 Try out plane/channel index scheme in wacky yuv format GMs.
Bug: skia:10078

Change-Id: Ic47ac84ab7a047d91ae72b45ccd0adc9f449e2be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282618
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-04-10 13:20:32 +00:00
Mike Klein
d7d1462b50 example of overdraw CF that we can JIT
Branch-free code translates to SkVM more easily than the branchy.

Caveat: the GM is not actually JITing with home-grown JIT today because
that JIT can't gather8, i.e. it can't sample from A8 images yet.  But it
works with SkVM interpreter and JITs with LLVM.

Change-Id: I41a6e1d6dda3a6d89a1150bfc7cbc63fe609d4e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282612
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-09 18:08:36 +00:00
Brian Osman
68219bfaca Add Usage::kColor to SkVertices custom attributes
Always treated as unpremul, RGB(A) sRGB colors. Automatically
transformed to destination color space, and premuled.

Bug: skia:9984
Change-Id: I78fdb16482f70714a8a8b64a9552e8874d7966fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282336
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-08 23:57:27 +00:00
Brian Osman
c88ca32f88 Remove gamma GM
This stopped being relevant when color management was no longer tied to
linear blending.

Change-Id: I2171c5c74d75cf2f78c1ff9fac62584a305c71ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282158
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-07 19:43:47 +00:00
Chris Dalton
03fdf6a9a9 Implement support for indirect draws
Change-Id: Ib1c0570d747bf9f46be3486f37eba3af53ed1e3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281642
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-04-07 19:41:18 +00:00
Robert Phillips
e19babf996 Remove GrAtlasManager.h from all other .h files
Having GrAtlasManager.h in GrContextPriv.h was needlessly propagating dependence on that header.

Change-Id: Idf5836f1e217ecd2da91f751b488a63a884c02ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281739
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-07 12:43:46 +00:00
Ethan Nicholas
16464c3232 Tracking uniform ownership
This is a prerequisite change for the upcoming sample(child, matrix)
function. By itself, this CL doesn't really change anything; it just
adds an ownership tracking feature which sample(child, matrix) depends
on.

Change-Id: I98b12e5fb062a2535af367931e7a932ea9c63a59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281337
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-04-06 19:02:37 +00:00
Mike Reed
3ef77ddf9e clean up public m44 and camera api
saveCamera() is no longer experimental

In a separate CL, will stage changes to concat virtual to take M44.

Change-Id: Iaf37ce2f24ab1223c54aeb1e79eaebf18f87fece
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281589
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-06 15:34:17 +00:00
Brian Salomon
302757148f Make copy proxy in GM budgeted when texgen policy is kDraw.
Change-Id: I7d12c81b195144de217c928f5537665cae21c644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281580
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-04-03 20:31:44 +00:00
Brian Salomon
c524378621 Don't require color type to make proxy copies.
Bug: skia:10078

Change-Id: I3ce0d97f8ada55403cc3f88bb16659085449ea29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281207
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-03 15:25:34 +00:00
Brian Salomon
8efbbbc0d1 image_from_yuv_textures GM recreates YUVA image before each draw.
Otherwise if any draw flattens the image all subsequent draws of
the image use the flattened texture.

Change-Id: Id1aa58e33f2ec5a13cf1ff75d15f6137aafd556e

Bug: skia:9570
Change-Id: I3a45c4e2b9fead3a5a2500bf5f738ab5d1fbfc17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281336
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-02 21:34:06 +00:00
Brian Salomon
8afde5f395 Rename outputView->writeView and outputSwizzle->writeSwizzle
Change-Id: Ib09550201bc1556e04555fc7dc9408ab469684a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280964
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-04-02 15:06:16 +00:00
Brian Osman
717d386e0b Remove more remnants of SkVertices bone support
Bug: skia:9984
Change-Id: Ib79cf2509f5f92672cbb0b6060b8b33f99e9ac28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281162
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-04-02 14:12:06 +00:00
Brian Osman
ffd11f4ab3 Adding attribute types to SkVertices
Adds structure to the per-vertex (now custom) data.
Attributes currently just have a type, but the next
step is to augment that with semantic flags to handle
transformation logic in the vertex shader.

Added unit tests and GMs that exercise attributes of
varying float counts, as well as normalized bytes.

Bug: skia:9984
Change-Id: I02402d40b66a6e15b39f71125004efb98bc06295
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280338
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-01 23:23:26 +00:00
Brian Salomon
982f546cc1 Rename outputSwizzle->writeSwizzle.
It is also used for writes to surfaces other than fragment shader
output. e.g. clears.

Change-Id: Id1eb79be6d1a8aed936456bffa59dee32661cec8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280344
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-31 21:50:38 +00:00
Brian Osman
8cbedf9855 Improve SkVerticesPriv ergonomics
Rather than two separate (partially overlapping) ways of accessing the
private portions of SkVertices, use a single privileged helper class
(similar to GrContextPriv).

Change-Id: I76b14b63088658ed8726719cce126577e5a52078
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280601
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-31 16:10:07 +00:00
Mike Reed
853c15cdaa remove unused SkLightingShader
Change-Id: I60a3569b47b599b710c0f3a9522241748f15360d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280409
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-30 20:55:34 +00:00
Brian Osman
01e6d17fe8 Stop including SkCanvas.h from GrTypesPriv.h
It was too easy to get into circular include chains. Added static
asserts to ensure we keep our quad AA flags in sync. Also, IWYU.

Change-Id: I01aefa264aa56420ab5a46a8ecd9e63c021c79ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280405
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-30 20:43:34 +00:00
Mike Reed
f36b37f828 onProgram for SkGaussianColorFilter, plus gm and bench
iMac Pro bench:
- RP:          167
- VM exp:      195
- VM quartics: 135

Change-Id: Ie8deb38f246b9ae7bbd35e59c3e7e66fc7c42de5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279918
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-27 20:41:20 +00:00
Ben Wagner
dabd98c390 Begin fixing GrShaderVar.
Remove as many setters as possible, make the constructors less
ambiguous, make it movable, remove USE_UNIFORM_FLOAT_ARRAYS.

Change-Id: I71397d04b5b5d6deb792d77cb98d629d42785f06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279218
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-26 16:23:30 +00:00
Mike Reed
265de3a93c Include all tests, enlarge labels
Need to expand the size of highcontrastcolorfilter gm, to show all cases.
Also enlarge labels so they can be read.

Change-Id: I8f9278e7ce2f06a9a6921d70f1f38dc18f9023d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279336
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-26 13:05:39 +00:00
Robert Phillips
71cb6fda55 Initialize all the SkYUVAIndex fields in the wacky_yuv_formats GM
Change-Id: Ie5eb29f065cdf419209d68eab123cf5d3f7eceab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279216
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-25 22:19:46 +00:00
Brian Salomon
5c4c61eeb3 Reland x4 "Drawing YUVA images does not flatten for bicubic."
Actually don't snap the other coordinate.

This reverts commit 5575e3c4ea.

Change-Id: I7ef5c16ecbccf5131da595d2396243fbdefb4ddf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279140
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-25 19:21:27 +00:00
Kevin Lubick
988ce0490a remove localmatrix parameter from Blend and Lerp compose shaders
Bug: skia:10080
Change-Id: I936d6d696c86c50d5b51dc84894127c38ad753d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279048
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-03-25 17:56:26 +00:00
Brian Osman
f11e331524 Validate per-vertex vertices data against effect in SkCanvas
Updates the vertices_data GM to work on the GPU backend, too. For now,
it still works on the CPU via the original hack.

Bug: skia:9984
Change-Id: I2e11bd01e3cc953d2837ecd6ca8b2305b060e5fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278857
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-25 16:01:46 +00:00
Brian Salomon
5575e3c4ea Revert "Reland x3 "Drawing YUVA images does not flatten for bicubic.""
This reverts commit 367374894a.

Reason for revert: Nexus 5 fails SkiaRenderer readback tests.

Original change's description:
> Reland x3 "Drawing YUVA images does not flatten for bicubic."
> 
> Fixes:
> 
> Workaround GL_ALPHA texture issue in GM.
> 
> Don't crash in GM on null image.
> 
> Snap both coords in 1D bicubic (restores old behavior).
> 
> This reverts commit 97c98f9596.
> 
> Change-Id: I14bf0f8c6acf87cac0a13b9166fac73a2f3520b0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278862
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Iac414c19658f9bb26d116926825e57f42893b785
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279049
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-25 15:19:56 +00:00
Brian Salomon
367374894a Reland x3 "Drawing YUVA images does not flatten for bicubic."
Fixes:

Workaround GL_ALPHA texture issue in GM.

Don't crash in GM on null image.

Snap both coords in 1D bicubic (restores old behavior).

This reverts commit 97c98f9596.

Change-Id: I14bf0f8c6acf87cac0a13b9166fac73a2f3520b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278862
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-25 12:26:18 +00:00
Mike Reed
6e9b179d20 move ducky images into images
Change-Id: I819c23d38989f81d2e493ad8eea0c22cfd364284
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279036
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-25 12:19:56 +00:00
Brian Salomon
97c98f9596 Revert "Reland x2 "Drawing YUVA images does not flatten for bicubic.""
This reverts commit 9b22838da3.

Reason for revert: bad GM results.

Original change's description:
> Reland x2 "Drawing YUVA images does not flatten for bicubic."
> 
> With fix for dumb coord mistake.
> 
> This reverts commit 6cb8168c2b.
> 
> Change-Id: If5385d16339c2b2b03eeff4ddd65c601e672d3dc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278783
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I1143413f841182d39f5dc3eb4593fa98edf1bed4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278858
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-24 18:59:43 +00:00
Brian Salomon
9b22838da3 Reland x2 "Drawing YUVA images does not flatten for bicubic."
With fix for dumb coord mistake.

This reverts commit 6cb8168c2b.

Change-Id: If5385d16339c2b2b03eeff4ddd65c601e672d3dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278783
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-24 17:32:13 +00:00
Brian Salomon
6cb8168c2b Reland "Revert "Drawing YUVA images does not flatten for bicubic.""
This reverts commit 0bfb7a5206.

Reason for revert: bad async_rescale_and_read_dog_up results

Original change's description:
> Revert "Revert "Drawing YUVA images does not flatten for bicubic.""
> 
> This reverts commit d198821906.
> 
> Change-Id: I53c8d7dd783130266cb5a3e96586baf62896f82c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278676
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: Ic400ddf273d747eaeea39a104fde3cb456ba9d17
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278678
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-24 02:50:14 +00:00
Brian Salomon
0bfb7a5206 Revert "Revert "Drawing YUVA images does not flatten for bicubic.""
This reverts commit d198821906.

Change-Id: I53c8d7dd783130266cb5a3e96586baf62896f82c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278676
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-23 23:46:34 +00:00
Brian Salomon
d198821906 Revert "Drawing YUVA images does not flatten for bicubic."
This reverts commit ecd58077b2.

Reason for revert: red

Original change's description:
> Drawing YUVA images does not flatten for bicubic.
> 
> Simplifies bicubic relationship with child FP. Does not propagate coord
> transform up. It does not need a uniform to control offsetting and
> normalization.
> 
> Modifies imagefromyuvtextures GM to test all filter qualities with
> drawImage, drawImageRect, and image shader for YUVA and pre-flattened
> image for comparison.
> 
> Change-Id: Ic07cfdaac8a0fd1968314afe151dc218db862705
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278472
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com,michaelludwig@google.com

Change-Id: I237c7965af00dece40d0d7ef3f3e93db7b2b3c02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-23 22:32:24 +00:00
Brian Salomon
ecd58077b2 Drawing YUVA images does not flatten for bicubic.
Simplifies bicubic relationship with child FP. Does not propagate coord
transform up. It does not need a uniform to control offsetting and
normalization.

Modifies imagefromyuvtextures GM to test all filter qualities with
drawImage, drawImageRect, and image shader for YUVA and pre-flattened
image for comparison.

Change-Id: Ic07cfdaac8a0fd1968314afe151dc218db862705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278472
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-23 21:22:43 +00:00
Brian Osman
3c358420df Support for custom vertex data in SkSL and drawVertices
Adds a 'varying' modifier to the SkSL frontend. Only valid
for pipeline stage (runtime effect) SkSL programs, and only
on variables that are float, or float[2-4].

Runtime effect SkSL can declare varyings. The effect gathers
and reflects them. The GPU backend uses SkShader_Base's new
asRuntimeEffect() to get this data.

GrDrawVerticesOp and its GP get the shader's effect, if any.
They use this to add vertex attributes, varyings, and global
variables (in the fragment shader) of the appropriate width.
The globals have procedurally generated names, based on
their index in the list ("_vtx_attr_%d"). The GP's fragment
code copies the varyings to the globals.

When PipelineStageCodeGenerator sees a varying reference,
it just replaces that with the procedurally generated name
that matches the logic in the op.

Change-Id: I0effbc4f3425d452cb7d62e51e268f3b48fa3c74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275962
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-23 19:52:53 +00:00
Robert Phillips
709e2408fe Revert "Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time"
This reverts commit bc0fe058f8.

Reason for revert: red

Original change's description:
> Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time
> 
> These aren't high priority but it would be nice to have all the ops go through the same system.
> 
> Bug: skia:9455
> Change-Id: Idbd8b0829faf12703c82f5a016f5b0e7c3efb762
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277757
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I579ad16f144d17afaec9ee1b9000eaaa5c04228c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278508
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 18:29:33 +00:00
Robert Phillips
bc0fe058f8 Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time
These aren't high priority but it would be nice to have all the ops go through the same system.

Bug: skia:9455
Change-Id: Idbd8b0829faf12703c82f5a016f5b0e7c3efb762
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277757
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 17:39:23 +00:00
Mike Reed
bd1db41bd8 Add gm to test HSL modes, esp. with src-alpha
Note: the results (esp. Saturation) don't exactly match the reference
images in the W3 spec. However, if I tell viewer to be in P3 colorspace,
then the gm looks (nearly) identical to florin's codepen (when viewed
on a P3 iMac).

Change-Id: Iecf21b3078f079eb30af59d697b97b64091c585c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278416
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-21 18:10:11 +00:00
Brian Osman
e41fa2d5e4 Add vertices_perspective GM to demonstrate skbug/10069
Bug: skia:10069
Change-Id: I08814be483a630b0583347793e96ac628fe77bc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278316
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-20 20:30:30 +00:00