Commit Graph

4807 Commits

Author SHA1 Message Date
Brian Salomon
c85bce8ea6 Revert "Make textures used with alpha-only color-types produce 0s for RGB"
This reverts commit 16d86135b7.

No-Tree-Checks: true
Change-Id: Ia5ba78259a3a406c4c0f8ddca9aaf495d29b34f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348176
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-29 15:18:07 +00:00
Mike Reed
52130b0909 Pass samplingoptions to GrArgs
Also, add control over kMedium mapping

Seems like a loss that GrInterpret throws away the cubic coefficients...

A step towards https://skia-review.googlesource.com/c/skia/+/347022

Bug: skia:11105, skia:7650
Change-Id: I2564c29b0eeffd4df92c0baa78e2c04f6348d7d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347636
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-28 21:19:21 +00:00
Brian Salomon
16d86135b7 Make textures used with alpha-only color-types produce 0s for RGB
channels in shader.

This matches how CPU backend and 3D APIs do things.

Change-Id: I455e89e5782f6653ccd4e29e0f23ec087687aac0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317763
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-28 19:13:19 +00:00
Brian Osman
30b6729352 Add/test integer versions of vector-relational intrinsics
These are part of the GLSL ES 1.0 spec.

Bug: skia:10913
Change-Id: I61bfcadc92209fb3a6aa07b3d6ad579460ad2ecd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347049
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-12-28 15:46:51 +00:00
Florin Malita
ce613004a2 Add rsx_blob_shader GM
TBR=reed
Bug: skia:11113
Change-Id: I8165f9667f20d76c0af8469fb2a278f5581853ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347044
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-12-23 17:47:19 +00:00
Brian Salomon
8f7d95382e Remove public getter for GrSurfaceDrawContext on SkSCanvas.
Made it private and accessible internally via SkCanvasPriv.

Update SkGpuDevice methods/variables after rename of GrDrawSurfaceContext.

Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3,Canary-Flutter,Canary-Android
Change-Id: I3da64cee1de03c201243ee6c7ccd4b4c44cad8c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346498
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-23 16:13:07 +00:00
Mike Reed
ac9f0c9e27 Bitmap.asImage()
... and lots and lots of IWYU

Change-Id: Ie5157dcdd2e6d29b95c71b39153278ab48ef4eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346778
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-23 15:54:57 +00:00
Leon Scroggins III
e42716032b SkAnimatedImage: Always respect exif orientation
No known clients (CanvasKit, Android) want to ignore the exif
orientation in an animation.

A follow-on CL will deprecate SkAndroidCodec::ExifOrientation, leaving
it up to the client (e.g. SkAnimatedImage, hwui/ImageDecoder) to
handle the orientation. Add SkEncodedOriginSwapsWidthHeight to assist
clients to do so.

Update stoplight_animated_image GM. It previously showed using
SkAnimatedImage without respecting the orientation, which is no longer
supported. The new version replaces the left half of the image with the
right.

Remove assert that is no longer true. Originally, an SkAnimatedImage was
"simple" if it did not have a crop or postProcessor. This is no longer
true if has an exif orientation. Add a test that calls the simple
constructor and verifies it does not crash.

Change-Id: I421fd02700f220fb90458cd03c4431dee7daf399
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344762
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-12-21 16:39:12 +00:00
Brian Salomon
7bfdb10449 Revert "Enable GrTessellationPathRenderer by default"
This reverts commit 6ea387e7c7.

Reason for revert: valgrind failing

Original change's description:
> Enable GrTessellationPathRenderer by default
>
> Moves GrTessellationPathRenderer to the end of the chain and enables
> it by default.
>
> Also updates nvpr to not draw volatile paths. The tessellator is much
> faster at these.
>
> Bug: skia:10419
> Change-Id: I97ca7d4d1dff65fc9d4040c267f9808c8c33b548
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344377
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I3718ae210ebc403959d187160214cf0df895e4f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345718
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-18 15:46:30 +00:00
Chris Dalton
6ea387e7c7 Enable GrTessellationPathRenderer by default
Moves GrTessellationPathRenderer to the end of the chain and enables
it by default.

Also updates nvpr to not draw volatile paths. The tessellator is much
faster at these.

Bug: skia:10419
Change-Id: I97ca7d4d1dff65fc9d4040c267f9808c8c33b548
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344377
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-17 19:33:56 +00:00
Jim Van Verth
a8682204dc Fix shadow directional light bounds.
The shadowRec bounds code didn't handle directional lights, that's now
fixed. Also fixes normalization of the light direction -- it was only
using two components, it should use all three.

Bug: skia:10781
Change-Id: Ia7d39c5187f976627d017ac4abecbe1d1dc62712
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345126
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-12-17 18:04:15 +00:00
Brian Salomon
72068174f2 Fix images used in orientation GMs
Previous approach using magick's -orient tool didn't actually change the
stored JPEG's orientation (they were all tagged Undefined and the data
was top-left).

Regenerate the images using new method where the PNGs are generated with
transformations that the EXIF tag will undo. The script converts to JPEG
using magick and then modifies the TAG using exiftool.

Change-Id: Ic2276711c0f4faa26620c93b24f4f0e58d658ae3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345127
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-12-17 15:48:25 +00:00
Mike Reed
85fa75616d Add filtermode to drawnine
Bug: skia:7650, skia:11099
Change-Id: I1e603099d30bd4672cbb6783209bacf4678fa0f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345156
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-16 22:05:43 +00:00
Brian Salomon
590f567291 Add GrSurfaceFillContext
This is a new base class for GrSurfaceDrawContext. It allows any
alpha-type but is restricted to non-blending fills of irects using FPs,
clears,and discards.

Bug: skia:11019

Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341680
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I696df3617719fcd8303faa73fb44b32b3fb4f71c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344896
2020-12-16 20:48:43 +00:00
Jim Van Verth
63f0354b6d Add support for directional lights.
Adds a new kDirectionLight_ShadowFlag which indicates that lightPosition
is a vector pointing towards the light, and lightRadius is the blur
radius when the occluder is at z == 1. For other values of z it will
scale linearly. The direction is specified in device space.

Bug: skia:10781
Change-Id: I14d530f006e5541ed6e22bfbeb29c7441c21fb8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321792
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-16 16:58:26 +00:00
Brian Salomon
0263bff0d2 Revert "Add GrSurfaceFillContext"
This reverts commit b339bbe9dc.


Revert "Make backend allocation tests avoid alphatype conversions"

This reverts commit 177af6f410.

Bug: skia:11019
Change-Id: Id80aa7df4a15c8530a609c49ca6264bce7831852
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344569
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-16 14:49:56 +00:00
Brian Salomon
b339bbe9dc Add GrSurfaceFillContext
This is a new base class for GrSurfaceDrawContext. It allows any
alpha-type but is restricted to non-blending fills of irects using FPs,
clears,and discards.

Bug: skia:11019

Change-Id: I229ce5f452e66796e2fa5c0e7a6ddccbf23bef5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341680
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-15 19:31:44 +00:00
John Stiles
bead7e324a Remove GrFragmentProcessor::usesExplicitReturn.
All fragment processors now use explicit returns; sk_OutColor no longer
exists at all.

Change-Id: Ic5cf566a916c1d616edcc56ba84b6780776f8515
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344300
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-15 18:06:12 +00:00
Chris Dalton
06b52ada19 Add first class hairline support to tessellated stroking
Bug: skia:10419
Change-Id: I63f000e7b3c5623c1e40c3ce6950c8f5565bc11c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343477
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-12-15 18:05:32 +00:00
Ethan Nicholas
1ad5445100 Revert "Add integer relational ops to sksl_public."
This reverts commit b476981949.

Reason for revert: https://logs.chromium.org/logs/skia/507fb79e5cf79811/+/steps/dm/0/stdout

Original change's description:
> Add integer relational ops to sksl_public.
>
> These aren't implemented yet in the software rasterizer, but work
> properly on GPU and serve as a good end-to-end test for skia:10999.
>
> Change-Id: I1dac66cd5762ebde828e819c1b6890016599672e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344036
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: Ic9ace24c3f0ea764b2720bffa50792a136d452ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344558
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-12-15 15:07:31 +00:00
John Stiles
b476981949 Add integer relational ops to sksl_public.
These aren't implemented yet in the software rasterizer, but work
properly on GPU and serve as a good end-to-end test for skia:10999.

Change-Id: I1dac66cd5762ebde828e819c1b6890016599672e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344036
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-12-15 14:43:59 +00:00
John Stiles
4bdc12142a Use explicit return statements in more fragment processors.
Change-Id: I9c059ec562f981fdd5a2ac78d40aec204af2a5f9
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344160
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-15 14:03:59 +00:00
Mike Klein
f124108e23 how to use SkArenaAlloc with no friends
No more

    friend class ::SkArenaAlloc; // for access to ctor

Change-Id: I76fa3319498a965623e6865b75d1fb507ab845a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344236
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-12-15 01:23:18 +00:00
Mike Reed
5d8f55bfa8 Update last gm to use sampling, hide legacy api
persp_shaders_ gm expected diff (in gpu backends only), due to change
from filterquality (which gpu and cpu interpreted differently for mips)
to samplingoptions (which both backends interpret the same).

Specifically for kMedium:
- gpu treated as SkMipmapMode::kLinear
- cpu treated as SkMipmapMode::kNearest

Bug: skia: 7650
Change-Id: Idc53ad8d01d9c928b425c092b36191153714d347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343737
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-13 00:36:31 +00:00
Mike Reed
057fcbec5d Use sampling for bitmap shaders
Change-Id: Ifa656ffc83a1adb5670cff1e2ce77f2edb1d6b03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343776
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-12 20:10:41 +00:00
Mike Reed
b41bd15a4b Use samplingoptions for bitmap shader
Change-Id: I64c67ddcac29b68cdd0d25e4af4153358939b0ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343736
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-12 17:08:11 +00:00
Mike Reed
82abeceef9 Bitmap should use sampling options
Change-Id: I611969d4707009411f20b74debad7655ac364eb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343596
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-12-12 15:36:21 +00:00
Brian Salomon
1aa1f5fcba whole-word replace renderTargetContext with surfaceDrawContext
TBR:egdaniel@google.com

Change-Id: Ia471dfc1278bcbeb2b485e4deeb3e932060c50a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343576
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-11 23:24:40 +00:00
Brian Salomon
1c86b635d8 Improve clamp mode in GPU blur with downsampling.
This ensures that if the original src had transparent-black in the
border pixels that our downsampled image does as well. Otherwise,
clamp mode causes these nonzero border pixels to produce vertical
/horizontal smears at the edges of the result.

Bug: chromium:1156804

Change-Id: Id2c3a66de29724db2fcc7954abf7f14937cfb76d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343111
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-12-11 18:43:20 +00:00
Mike Reed
b86cd3d3f0 Use samplingoptions in imageshader
Change-Id: I7d94fe7aed702afd0626a40db201caaf7c2a7764
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342927
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-12-10 21:59:19 +00:00
Chris Dalton
7b80726d0e Implement indirect stroking for conics
Just like for fills, we use the normal Wang's formula on the conic's
down-projected control points until we can formalize on a better
formula.

Bug: skia:10419
Change-Id: Ifd735534a2e793f79f4f5d5b7e7acf50db81fe5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341156
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-12-10 19:02:39 +00:00
Brian Salomon
eebe735dea GrRenderTargetContext->GrSurfaceDrawContext
Just the class/files. variable names and additional comments to follow.

Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-10 18:51:19 +00:00
Mike Reed
410681932a Use explicit sampling param
Change-Id: Ifcb074365da8113fd5e0186d4afcf41041862e82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342761
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-10 14:01:58 +00:00
Brian Salomon
8670c98875 Remove SkImage::MakeFromYUVATexturesCopyToExternal
It's no longer used by Chrome.

Inline helper that draws yuva->rgba into the now single use case.

Move yuva proxy making helper from SkImage_GpuBase to SkImage_GpuYUVA
since it is only used there now.

Remove gm that tested the API and associated helper code in YUVUtils.

Bug: skia:10632
Change-Id: If6bd49befa1d1098bb6a268b9d856794f7eb80c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342077
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-09 14:50:19 +00:00
Mike Reed
b612b6cfa0 Revert "Revert "Use explicit samplingoptions""
Undo pictureshader change from prev version

This reverts commit fde98cbddd.

Change-Id: I52fe7d2753dee91fd08ae26f38e47ecd933d0c94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342378
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-09 03:08:09 +00:00
Mike Reed
fde98cbddd Revert "Use explicit samplingoptions"
This reverts commit 8b5f3ac3eb.

Reason for revert: unexpected gm changes

Original change's description:
> Use explicit samplingoptions
>
> Promoting pictureshader to linear by default
>
> Change-Id: Icd4102c3eee47558ecec845d0581ddbded981ef8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341979
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

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

Change-Id: I773b6cfd04681619283b4e879468720706d2c9fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342377
Reviewed-by: Mike Reed <reed@google.com>
2020-12-09 02:54:59 +00:00
Mike Reed
8b5f3ac3eb Use explicit samplingoptions
Promoting pictureshader to linear by default

Change-Id: Icd4102c3eee47558ecec845d0581ddbded981ef8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341979
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-12-08 23:03:43 +00:00
Mike Reed
99c944647f Add flag to hide non-sampling imageshader factories
Bug: skia:11056
Change-Id: Ic79876106c003f6061cbb50ad2f4a4bf4f446231
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341681
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-08 20:33:23 +00:00
Brian Salomon
b5f880a3f6 Take origin when creating/updating backend texture using pixmaps.
Bug: skia:11042

Change-Id: I511c7556f97f19d7f162031c245019d2da33c129
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341005
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-07 20:31:10 +00:00
Mike Reed
198e6ea3f9 add new entry-points for drawImage[rect] with samplingoptions
Change-Id: Icc2c2e4affbf4c4dba1983b069351f33487af81b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339116
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-07 19:39:30 +00:00
Michael Ludwig
e0dee01043 Remove support for deprecated kDontClipToLayer_SaveLayerFlag
This removes the conditional behavior based on #defines, and the private
flag definitions. It removes GMs and updates tests that tested the
feature. Follow-up CLs will go through and simplify the internals of
SkCanvas to take advantage of this support removal.

Bug: skia:10986
Change-Id: Id42c9e7d134dd06507fabf6577e7872942ef9077
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339988
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-12-05 00:00:13 +00:00
Mike Reed
db873dd600 add util for checker image
Change-Id: I6fcf6263a6a261016cb5971872c2f2b5a9943d8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341004
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-04 18:02:24 +00:00
Mike Reed
1a4140e598 deprecate getTotalMatrix
Change-Id: Iec7d67f4ec3fdf4d5280f3de3d6146a69a60c646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339995
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-03 17:37:35 +00:00
Brian Salomon
c7112edbe0 Fix swizzles in clear_swizzle GM
Original version swizzled the alpha value. This isn't really allowed
because of blend equations that use alpha coeffs. When doing
color+alpha drawing we have to use the format's alpha channel
as alpha in the swizzle.

TBR: michaelludwig@google.com

Bug: skia:11019
Change-Id: I38922b966d37974b250904ad5c0ea825728b8c77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-03 01:22:52 +00:00
Brian Salomon
07bc9a27f5 GPU clear values: just 4 floats
We previously represented these as SkPMColor4f. However, upcoming
changes will add limited support for clearing/drawing to unpremul
dst. Just store the clear values as four floats without assigned
interpretation.

Also, noticed a bug by code inspection: we weren't accounting for
write view swizzle in GrRTC. Fixed and added gm to test.

Bug: skia:11019
Change-Id: I1bce1f6c97a156c0377ebad1b166eb641362b67a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340098
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-02 22:04:08 +00:00
Brian Osman
540c13a791 Test & implement "vector relational intrinsics"
Add missing "not" intrinsic to SPIR-V, and several relational/logical
opcodes to runtime effect's skvm converter.

Bug: skia:10913
Change-Id: Ic349d491d980d0018134801260073414485f9059
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339316
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-12-01 16:10:43 +00:00
Brian Salomon
70fe17e12f Remove GrRenderTargetContextPriv and GrSurfaceContextPriv
I think this is vestigial from some time in the past where RTC was
public.

Also just expose the methods that add ops rather than have so many
friends + testingOnly versions.

Change-Id: I60d9fdff23b2d67039a7b37815da7ff9e73d8999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339158
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-30 20:13:25 +00:00
Mike Reed
6affa2c2e3 move SkMipmapBuilder to private
Change-Id: I77f57b175984a5e373fae951a270a883e7e4c5d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339216
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-11-30 20:13:15 +00:00
Brian Osman
9ba7a24bdd Reland "SkSL: Test/implement "geometric" intrinsics"
This is a reland of 0d5d956f7b

Original change's description:
> SkSL: Test/implement "geometric" intrinsics
>
> Bug: skia:10913
> Change-Id: Ie82354b05db141c8ab90b1a615ddfada4f71a98b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335049
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

Bug: skia:10913
Change-Id: I103dd2efbbab0efeac2be786d7e8f913d5c4b22a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338158
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-11-24 21:29:56 +00:00
Mike Reed
ce0c876ce2 hide legacy scalePixels and makeShader
Change-Id: Idae1e44aa0417adb943fd20112fb4f1fa81167f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337719
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-11-24 00:41:33 +00:00