Commit Graph

4400 Commits

Author SHA1 Message Date
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
Brian Salomon
f4ba4ec796 Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots""""
Updated to use sentinel GL context even when GL backend is not built.

This reverts commit 1171d314ef.

Change-Id: Ia94bbe4865ddd4e898446c13886877c539f0eb0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-20 17:11:58 +00:00
Brian Salomon
1171d314ef Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""
This reverts commit fb27c9a25f.

Revert "Remove MoltenVK support"

Reason: TSAN Vulkan bots hanging.

This reverts commit 6cafe73da9.

Change-Id: I8ec9db35c112f3c8da8636dab2065e6f18de7d0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-19 13:10:59 +00:00
Brian Salomon
7c94d1891f Use SkColorMatrix_RGB2YUV in image_from_yuv_textures
Change-Id: I22ce21a7d217c6929cd3a3de6525290fafa91f55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277816
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-19 12:22:43 +00:00
Brian Salomon
fb27c9a25f Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots""
This reverts commit 00ba5ef4a6.

Bug: skia:10051

Change-Id: I13fd5494b7e7e64159e6330f168ab8c16a2db149
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277609
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-18 18:12:11 +00:00
Robert Phillips
c655c3aa8b Make GrOp::onPrePrepare be pure virtual
This makes onPrePrepare match onPrepare & onExecute. Most of the new method bodies will-have-to/should be filled in anyway.

Change-Id: Ifc897feaeb2d8fe6eec3ac3a8e91f99393ad6758
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277542
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-18 18:06:02 +00:00
Brian Salomon
bc074a68df Add SkBudgeted parameter to SkImage::makeTextureImage().
Also strengthens/adds some guarantees about this function:
* Always returns the same image if the original is texture-backed and
compatible with GrMipMapped (WRT HW MIP support)
* If a new texture backed image is returned it is always an uncached
texture that is not shared with another image or owned by an image
generator.

Adds a GrImageTexGenPolicy that allows control through image/bitmap
GrTextureProducers of whether a new texture must be made and whether
that texture should be budgeted or not.

Increases unit test coverage of this API.

Bug: skia:8669

Change-Id: Ifc0681856114a08fc8cfc57ca83d22efb1c1f166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274938
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-18 17:27:41 +00:00
Brian Salomon
00ba5ef4a6 Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"
This reverts commit f6784a8c84.

Reason for revert: breakage of builds

Original change's description:
> Don't build GL on Metal, Vulkan, Dawn, Direct3D bots
> 
> Misc fixes to omit GL-dependent targets and fix assumptions that
> SK_SUPPORT_GPU implies SK_GL.
> 
> Bug: skia:10051
> Change-Id: Ida88ac3f1bf4d9e23f66d0700c2bce18b938ed6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277456
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I4e02f675fd8820ed3c8efee192c64e570a23c3e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10051
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-18 14:42:28 +00:00
Robert Phillips
4f93c573e2 Update AAHairlineOp to surface its programInfos at record time
This CL is interesting bc the AAHairlineOp is the first one that requires multiple programInfos.
Correspondingly, it is also the first one that shares a pipeline between said multiple programInfos.

Bug: skia:9455
Change-Id: I2369abbdeaf4eac2bc9547ad36631beba29bd641
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277203
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-18 14:36:18 +00:00
Brian Salomon
f6784a8c84 Don't build GL on Metal, Vulkan, Dawn, Direct3D bots
Misc fixes to omit GL-dependent targets and fix assumptions that
SK_SUPPORT_GPU implies SK_GL.

Bug: skia:10051
Change-Id: Ida88ac3f1bf4d9e23f66d0700c2bce18b938ed6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277456
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-18 14:26:28 +00:00
Chris Dalton
304e14d883 Remove FixedDynamicState from GrProgramInfo and GrPipeline
Everybody uses explicit binding now.

Change-Id: Idb6f64104eddd31d28dd2ba19f9743520a4e5170
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277541
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-17 23:09:08 +00:00
Chris Dalton
3bf2f3a9da Remove DynamicStateArrays from GrProgramInfo and GrPipeline
Every op that updates dynamic state between draws has now been
migrated to explicit binding.

Change-Id: Ibd13c9c0ffb16a205c073dfb4fd21d93f496dc52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277493
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-17 19:12:18 +00:00
Chris Dalton
765ed36ad4 Delete GrOpsRenderPass::drawMeshes
Everyone is responsible to set up their own scissor and textures now.

Change-Id: Ic3547f00c0e7908409631951de4b7237b9bce23b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277177
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-17 15:05:54 +00:00
Chris Dalton
aa0e45c232 Add pass-through helper methods from GrOpFlushState to GrOpsRenderPass
Change-Id: Ifa18e909978367a4502dbf6b35a62a437e83b5c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276842
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-16 19:53:26 +00:00