Commit Graph

53581 Commits

Author SHA1 Message Date
Dominik Röttsches
691a794bee Support COLRv1 color fonts
Implement support for COLRv1 color gradient vector forms. COLR v1 is an
extension to the OpenType COLR tables that introduces support for
gradients, transforms and compositing. [1]

COLRv1 fonts contain an OpenType COLR table with format v1. In a COLR v1
table, glyphs are defined by a directed, acyclic graph of Paint
operations. The task for the Skia implementation is to extract the COLR
v1 information from the font using FreeType's COLRv1 API, then traverse
the glyph graph and translate information from the font into Skia
operations on SkCanvas.

Care needs to be taken for transformations to work correctly. FreeType
sends a top level transform that includes the scaling from font units to
actual glyph size, as well as optional transforms configured on FreeType
using FT_Set_Transform. This is set up as the starting transform at the
beginning of drawing a COLRv1 glyph. At the stage of setting a clip for
a PaintGlyph operation, the glyph outline is retrieved from FreeType
unscaled and untransformed. Since the starting transformation is applied
to the SkCanvas, the unscaled glyph is properly scaled and positioned.

Similarly, computing the initial bounding box for the COLRv1 glyph needs
to consider transformations. COLRv1 glyphs have a base glyph entry in
the glyf table which can use a minimum of two points for defining a
bounding box. This bounding box is an imaged rectangle enclosing those
two points at the identity transform. We need to compute the bounding
box scaled, but at identity transform, then make a rectangle from it,
that we then transform so that we get a large enough area to paint
in. If those two points from the glyf table would be transformed first,
then we would compute the bounding box, the resulting bounding box ends
up too small.

As a test font, add a version of the samples-glyf_colr_1.ttf from [2]
with one glyph added for testing PaintColrGlyph functionality and
compositions.

Add a basic GM test that produces color glyphs untransformed, with
skew and with rotation and combinations of those.

[1] https://github.com/googlefonts/colr-gradients-spec/
[2] https://github.com/googlefonts/color-fonts

Bug: skia:11264
Change-Id: I8357cd0c7ac0039bb2eac18f21fa343bf61871eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300558
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-02-11 22:51:13 +00:00
Ethan Nicholas
11a15b1181 added SkSL DSL uniform support
Change-Id: I42c9aa76318ed744ba1390733bb0bd33413ebf29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362499
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-11 22:03:56 +00:00
Greg Daniel
9408a6170b Final bits of vulkan buffer memory optimizations.
This moves transfer upload buffers to the new better specific memory
usage and removes the CPU buffer used on android for writing to gpu
buffers. The later will hopefully have some perf wins.

Bug: skia:11207
Change-Id: I581e179b155bdadcae5d3f881b5a479338e01240
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369479
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-11 21:52:12 +00:00
John Stiles
d6a5f449d8 Migrate PermitInvalidStaticTests flag to Program::Settings.
This will make it accessible from the IR generator (in a future CL) and
is more in line with how we typically manage settings.

Change-Id: I478d617119cba079d1124b2b9c26d5573c7d6ae3
Bug: skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369480
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-11 21:41:33 +00:00
Ethan Nicholas
bf79dff9d8 SkSL DSL struct support
Change-Id: I68eb7be8e46454d95bb4a6a9743c923d093c9ba2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368857
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-11 21:36:42 +00:00
Mike Klein
2af98b2822 high-contrast filter as runtime
I think this is good to go.

Originally I had been careful to treat nullptr dst as gamma=2, but then
seeing the GPU impl treating all colorspaces as gamma=2 made me realize
it's can't be that important to preserve pixel-exact results here.  It's
not possible with a single codebase... in many situations the existing
CPU and GPU backends draw differently with identical settings.

Beyond that sort of obvious intentional difference, I've also tried to
port as few bugs forward from the old implementations as possible.  The
one I notice most clearly is in the GPU code,

    @if (invertBrightness) {
        color = half4(1) - color;
    }

which I think probably should be `color.rgb = 1 - color.rgb`, leaving
alpha alone.

Change-Id: I098cdced4772445c70ce4577bdd1c93c2e42824c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368276
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-02-11 21:18:08 +00:00
Brian Osman
8e756f379c Support structs in runtime effects
Uses the pipeline-stage callback mechanism. It mangles the type name
(with a test to verify that this works), and then calls defineStruct
with the entire SkSL struct definition string.

Bug: skia:10939
Change-Id: If14cf1b11faaa80ad8d4086cdacf68532bac43fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368809
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-11 21:09:15 +00:00
Brian Osman
f4738966f4 Replace settings values during IR conversion
This avoids creating a Setting object (only to then
replace it during optimization). More importantly,
it makes it possible to disable optimization without
leaving un-resolved settings in the IR.

Settings in the pre-load modules are still loaded
as Setting objects, and those are resolved during
the one-time optimization pass of those modules,
whether or not per-program optimization is run.

Change-Id: Idf560a49f936edc683463dc8a60771d0624b45d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369325
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-11 21:06:05 +00:00
Chris Dalton
b41676d598 Extract a subclass for binning stroke instances
This will make it easier to add "dynamic" attribs like stroke width or
color.

Bug: chromium:1172543
Bug: skia:10419
Change-Id: Ia8326c80fb2fe3ab630b03e9bfdc6368385176b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368956
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-11 20:50:50 +00:00
Michael Ludwig
820921e542 Rename SkXfermodeImageFilter to SkBlendImageFilter
Also deletes the old header under the deprecated name.

Bug: skia:11230
Change-Id: Iac42d2b980d3306a544077719ca62903a673210a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368242
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-11 20:39:25 +00:00
Ethan Nicholas
570506db41 Added DSL FP codeAppend function.
This also adds the relevant Start() / End() calls so that the DSL
is put into the correct state.

Change-Id: I844b0ab5dff06e3f7b0a69458bf4442a5da0f33e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364857
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-11 20:37:24 +00:00
Mike Klein
cb92744d3d SkColorFilters::WithWorkingFormat
https://docs.google.com/document/d/1z9ZODlZX4XXbfOjh2t1-1Z7FJcCCcOfbrEjiFzPE4vg/edit?usp=sharing&resourcekey=0-Io-07D1zm1yKMQN2UAiYBw

This approach lets us write color filters that want to work in
particular color spaces and alpha formats and adapt them to our normal
pipeline.  It should work with pre-canned and runtime effects, and we
can do the same sort of thing for shaders too.

Some features are designed for using this with the high-contrast filter:

   - ability to change working tf and gamut separately: as written the
     HC effect only wants to work in linear space without changing
     gamut, which is I bet will be a common desired mode.  But other
     effects may want to fully change the working color space, e.g. to
     sRGB or XYZ.

   - adapting the alpha type to unpremul is mostly a flourish: you could
     do it yourself in sksl, but we might as well do it if doing other
     transforms anyway (it's cheaper this way than doing it yourself),
     and this may make it easier to adapt non-runtime effects.
     (I bet most color filters actually want to be unpremul.)

I briefly also included a knob to control how this effect treats a
nullptr dst color space, but I've come back around to that not being a
parameter.  I think this is a situation where we know best.

New GM to demo.

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I420e3a2aa648f314c019a98bfdcd44e810a3dac6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368336
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-02-11 19:44:33 +00:00
Chris Dalton
dfa91793f8 Remove GrStrokeIndirectTessellator::fResolveLevelForCircles
Stores it on the ResolveLevelCounter instead. This will allow
different paths to have different stroke widths.

Bug: chromium:1172543
Bug: skia:10419
Change-Id: I0ff68b7287027a22d9374826b3c57290192489bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368937
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-11 19:14:59 +00:00
Mike Klein
ae8ba01835 further refine reruns
On batch failure we're rerunning every source in the batch, while we
really only need to rerun sources that we don't know succeeded.

If for example we run sources "foo", "bar", and "baz", and foo produces
a known hash, then bar crashes, we only need to rerun bar and baz.  The
batch run was enough to demonstrate foo's good.

Change-Id: I17634a6095906bcc2ad0bd33bb78eba000654b5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369456
Reviewed-by: Eric Boren <borenet@google.com>
2021-02-11 18:29:45 +00:00
Brian Salomon
a1e5f58cb0 Revert "Flush rather than copy pixels in GrSurfaceContext::writePixels."
This reverts commit 3b7a12bd66.

Reason for revert: metal command buffer assert?

Original change's description:
> Flush rather than copy pixels in GrSurfaceContext::writePixels.
>
> Speculative fix for:
>
> Bug: chromium:1171141
> Bug: chromium:1171188
> Change-Id: Ic9762f17652172e620c6bb59aa89e3bb6bc97659
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369318
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I5db0cfabb1396db3d4fe9f9c6809d5de72d6572f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1171141
Bug: chromium:1171188
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369476
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-11 18:06:42 +00:00
John Stiles
1b91c0e29b Fix use-after-free discovered by the fuzzer.
The optimization which replaces unnecessarily nested constructors is
creating a new constructor from whole cloth, obliterating the original
constructor and its arguments. This can invalidate the definition map.
For now, this is fixed by forcing a rescan when this optimization is
applied.

Change-Id: I8a46bccf3b6422282eaf95409cd4fa50b8ad3187
Bug: oss-fuzz:29994
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369324
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-11 17:52:43 +00:00
Chris Dalton
53ab360418 Don't forget to call putBackVertices from the stroke tessellator
Change-Id: I80652861841ec4f049336f1759c1c26a934c309a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-11 17:40:20 +00:00
Mike Klein
510e45c223 minor fm_driver tweaks
Move definition of Work struct until just before it's used,
and show one of the sources as an example at kickoff-level step.

These are just cosmetic/refactors.

Change-Id: Ib23b9379683b9867e097c8d68ef8736013719cee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369356
Reviewed-by: Eric Boren <borenet@google.com>
2021-02-11 17:33:06 +00:00
Mike Klein
0ebdb37b55 plumb errors up to mid-level steps
As is, on failure the top-level task fails correctly,
then the next level steps all confusingly look green,
then the next two levels down are correctly failed and red.

I think this is because worker(ctx) fails `ctx`, which we make like
this,

    ctx := startStep(w.Ctx, td.Props(strings.Join(w.Sources, " ")))

but nothing ever fails that `w.Ctx`.  This should fix that.

Compare trybot runs here with https://task-driver.skia.org/td/BMCjZbc5ki1cXbkM0oZp?ifNotFound=https%3A%2F%2Fchromium-swarm.appspot.com%2Ftask%3Fid%3D51aa8032a90a8810

Change-Id: Idfbd933b9027cac423a3a2cc5b0513c894d60e63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369265
Reviewed-by: Eric Boren <borenet@google.com>
2021-02-11 17:24:21 +00:00
Jorge Betancourt
1352d0e47d [canvaskit] perform audio asset lookup by layer id
Change-Id: Iac56d11a76be8d90df1159631a02f1713ece1bd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368938
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-02-11 17:11:00 +00:00
Florin Malita
80aa5b1365 [skottie] Add threshold effect
https://helpx.adobe.com/lv/after-effects/user-guide.html/lv/after-effects/using/stylize-effects.ug.html#threshold_effect

Bug: skia:11311
Change-Id: I9d726b4526f2bbe584f11c77ee2e6829e5148956
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369156
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-11 16:35:32 +00:00
Dominik Röttsches
eff697a78b Roll FreeType
60ba8fe9e7..54c5ad5c92

Includes changes required for COLR v1 support.

No changes to ftoption.h or ftmodule.h.

Change-Id: Id7fff0437144ad4e8318d8b462470bb0c4d6c02d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369336
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-02-11 16:26:52 +00:00
Brian Salomon
650dd08590 SkImage::textureSize replacement for GrDirectContext::ComputeImageSize.
Bug: skia:11208
Change-Id: I7ee1084c17b0d9a0ba82eed0ac69d0fa51f2cecf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369317
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-11 16:08:55 +00:00
Brian Salomon
3b7a12bd66 Flush rather than copy pixels in GrSurfaceContext::writePixels.
Speculative fix for:

Bug: chromium:1171141
Bug: chromium:1171188
Change-Id: Ic9762f17652172e620c6bb59aa89e3bb6bc97659
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369318
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-11 15:52:17 +00:00
Tyler Denniston
bc2fa2b526 Use GrWangsFormula::conic in indirect tessellator
Previously we were ignoring the conic weight and using the regular
quadratic Wang's formula for conic segments. This CL uses the new
specialized formula for conics.

Bug: skia:10419
Change-Id: I2929135decc539b9ecf27516a0d9d231be3f7494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366405
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-02-11 15:28:39 +00:00
Jim Van Verth
abf4d50c41 Derive GrMtlPipelineStateDataManager from GrUniformDataManager.
Fixes some bugs in both classes as well.

Bug: skia:10585
Change-Id: I97c4cf0a7eeb9dff8262909a4c5ef25b1e3e0d4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368817
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-02-11 15:20:33 +00:00
Michael Ludwig
d2fded8f6c Delete deprecated arithmetic filter header
Bug: skia:11230
Change-Id: I966d9511d6124627308146f1b5f9e18f5d7fb4d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368241
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-11 14:47:05 +00:00
John Stiles
9cfcb07d7a Fix alpha channel in SelfAssignment test.
This was being set to zero instead of one by mistake. Interestingly,
this was undetected by the CPU backend, but appears to matter sometimes
on the GPU side.

Change-Id: If827863f69c140f933696c6ff55c8a7095620c29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368858
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-11 14:41:15 +00:00
Jose Dapena Paz
69b27b55d1 GOLD: workaround static constexpr linking problem with SkImageFilters::CropRect::kNoCropRect
Skia linking fails in GOLD because of missing instanciation of kNoCropRect
in SkImageFilters::CropRect. This breaks compilation of skia_renderer
service. More details of this kind of issue in GOLD can be seen in
https://chromium-review.googlesource.com/c/chromium/src/+/2436824

To workaround this, we move the declaration from being a member of
a struct to a namespace constexpr.

bug: chromium:819294
Change-Id: I52e98be440d05236df886b6ff83b84f29cbe7edd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335537
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-11 14:27:26 +00:00
Brian Salomon
441b33fe0e rm pow2 arg to GrDirectContext::ComputeImagesize
Bug: skia:11208
Change-Id: I573be306e168adbd1c521626b2d1e4a303f8d5d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368621
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-11 13:44:52 +00:00
Michael Ludwig
5693e5c4ae Reland "Delete deprecated alpha threshold header"
This reverts commit 140adc6762.

Reason for revert: sksl issue addressed in https://skia-review.googlesource.com/c/skia/+/368813

Original change's description:
> Revert "Delete deprecated alpha threshold header"
>
> This reverts commit 5441188637.
>
> Reason for revert: this couldn't really be breaking angle-only sksl compilation, right? Let's find out!
>
> Original change's description:
> > Delete deprecated alpha threshold header
> >
> > Bug: skia:11230
> > Change-Id: Icd927cfdcca71a48dce16bcd6c40489dad92a259
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368238
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,michaelludwig@google.com
>
> Change-Id: Ie5b51e6cca39acb34dbf7b1e702209aba69ea437
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11230
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368798
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

# Not skipping CQ checks because this is a reland.

Bug: skia:11230
Change-Id: I6d5bb2f42edd73f5ee4e121aaaff2f348661cf18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369056
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-11 13:41:23 +00:00
Kevin Lubick
966d795af9 [canvaskit] Fix perf timeout in Puppeteer + SKPs
Change-Id: I3ee30bbb764291b1a4b0c0c5d77cbac2f11ac415
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368877
Reviewed-by: Eric Boren <borenet@google.com>
2021-02-11 13:29:45 +00:00
skia-autoroll
9d171b6302 Roll Dawn from 02fd17c75403 to 7e80cce1a906 (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/02fd17c75403..7e80cce1a906

2021-02-10 jrprice@google.com Remove explicit storage class from samplers/textures
2021-02-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 7b7d69854d8d to c2118b0dcb2a (12 revisions)
2021-02-10 cwallez@chromium.org Lower the maxVertexBuffer limit to 8.
2021-02-10 senorblanco@chromium.org Fix bug ID in a couple comments.
2021-02-10 hao.x.li@intel.com Fix timestamp writing and resolving from different encoders

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 7b7d69854d8d to c2118b0dcb2a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC kainino@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: kainino@google.com
Change-Id: Iafa932268bcf6c03610235072c5a763e5f2cee5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369277
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-11 05:28:45 +00:00
skia-autoroll
f5fd4785ef Roll ANGLE from 0f74ae58ed18 to cffe90b44a51 (12 revisions)
0f74ae58ed..cffe90b44a

2021-02-11 ianelliott@google.com Vulkan: Update documentation for enabling debug markers
2021-02-11 ianelliott@google.com Android: Create a new ANGLE APK package name for AGI
2021-02-11 syoussefi@chromium.org Vulkan: Use a dirty bit to start the render pass
2021-02-11 timvp@google.com Vulkan: Clear mCurrentGraphicsPipeline after createPipelineLayout()
2021-02-10 geofflang@google.com EGL: Trim requested config parameters to EGL.
2021-02-10 jmadill@chromium.org infra: Add trace tests to CQ conditionally.
2021-02-10 penghuang@chromium.org Fix crash in gl::Context::unMakeCurrent()
2021-02-10 jmadill@chromium.org Move Frame Capture to capture/ folder.
2021-02-10 jmadill@chromium.org infra: Fixes to main.star.
2021-02-10 jonahr@google.com GL: Cache the results of glGetString
2021-02-10 jmadill@chromium.org Vulkan: Support y-flip with no driver support.
2021-02-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9d35d544ce96 to 673a7fe5c3ff (10 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC borenet@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: borenet@google.com
Change-Id: If5cb80252bddc01edd3ad49bb01c55b5444da5b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369259
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-11 05:20:58 +00:00
skia-autoroll
e70d8ae3e7 Roll Chromium from 8cbe693bd2e0 to 897c00073839 (525 revisions)
8cbe693bd2..897c000738

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC borenet@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: borenet@google.com
Change-Id: Iab68ecf3d75cf3e10dff88772642f12639213b36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369276
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-11 05:10:35 +00:00
skia-autoroll
997df84ac1 Roll SwiftShader from 9677c6d28278 to 673a7fe5c3ff (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/9677c6d28278..673a7fe5c3ff

2021-02-10 capn@google.com Unify load/store operand accessors
2021-02-10 capn@google.com Discern between load and store addresses
2021-02-10 capn@google.com Rename InstIntrinsicCall to InstIntrinsic
2021-02-10 capn@google.com Eliminate the InstIntrinsicCall Target parameter
2021-02-10 capn@google.com Eliminate Subzero profiling support

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC borenet@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: borenet@google.com
Change-Id: I7799dc3cb0b81195525d06b2abe574c9c5efec24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369258
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-11 05:03:34 +00:00
Mike Reed
6284b3152a Remove dead code for
- non-sampling-optionsd drawImage (and drawAtlas, etc.)
- drawBitmap calls

Bug: skia:7650
Bug: skia:11216
Change-Id: Ib6dff1ae0fb909d42d37a845d6e7881af4ba12f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369036
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-02-11 01:19:21 +00:00
Mike Klein
ff4decc35e add fast_mul(F32,F32)
This is just like mul(F32,F32) but optimizes 0*x == 0.
Use it in SkSLVMGenerator; sksl already applies this optimization.

PS2 has a sneaky version using % as a fast_mul() operator, and
PS3 has a sneakier version using ** instead.

We could of course write this all out using fast_mul() the long way,
but I found that quickly became difficult to read.

Change-Id: Iae35ce54411abc00e7729e178eb6a10f151a5304
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368838
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-11 01:13:01 +00:00
Chris Dalton
b849f7a791 Remove shims for reordering indirect draw command signatures
Change-Id: I0eb48cc8a7721cc0fbdfa579b36db5e6ed0aa695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368917
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-11 00:19:35 +00:00
Brian Salomon
9374617a4c Disable caching of GrTextures in promise images.
Leave the code to support it in place until we know if this causes
a regression.

Change-Id: Ic9f6a42cb83cc82a33a534d3f98cb9aaf11f813f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356998
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-10 23:53:54 +00:00
Greg Daniel
84b0233bb3 Rename vulkan memory allocator buffer usage enum values to be more specific.
These renames need to be staged so we can update chrome which has their
own implementation of GrVkMemoryAllocator.

Bug: skia:11207
Change-Id: Ic68927217fe0314cdba1b1aa7ffd80261cb5e646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368856
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-10 23:03:44 +00:00
Julia Lavrova
8d5ccce163 Glyph positioning in RTL empty lines
Bug: skia:11258
Change-Id: Icbb34e571ba53e893b2887c963a46677b16b43e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368754
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-10 22:27:18 +00:00
Brian Osman
73122aa45f Use guarded_divide in more blend functions
Fixes another instance of anglebug.com/2098 with advanced blend
functions.

Change-Id: I91863723d8b4c33ab2f5a527fe0374e8947bba16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368813
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-10 21:59:26 +00:00
Florin Malita
792c2cb44e [skottie] Sphere effect lighting
Plumb lighting props and implement a Phong lighting model.

This is ~40% slower with the SW backend - to mitigate, construct two
runtime effects and only apply fancy lighting when needed.

Change-Id: If6f71253e7adc148f6d5cf5fbde2c1dff977f669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368246
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-02-10 21:34:57 +00:00
Julia Lavrova
39caaac7fd RTL Glyph positioning
Bug: skia:11257
Change-Id: I297763c9585b988f5f89fd87b596c39220115f6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368537
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-10 20:00:14 +00:00
John Stiles
0ac6c15075 Reduce self-assignment expressions (x = x) into just x.
Change-Id: I44356aa781f208f4941dbeb617a30318e36c1081
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367062
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 20:00:05 +00:00
Robert Phillips
2735837989 Handle degenerate viewMatrix in draw_shape_with_mask_filter
For the specific fuzz in question the viewMatrix is:

0 0 0
0 0 0
0 0 1

Bug:1174637
Change-Id: Ia07fe7255de7aff3df0c8cc11da7e90434392f29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368668
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-10 19:41:08 +00:00
James Clarke
b8c0dab90b Add UWP support
Bug: skia:11102
Change-Id: I4ed9e44099cd780c5cdede3eb179c0e6a92d3ce5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345219
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Chris Bracken <cbracken@google.com>
2021-02-10 19:04:42 +00:00
John Stiles
a0e407d4b7 Add SkSL test for matrix equality/inequality operators.
Disabled on Adreno 5xx/6xx as the tests do not pass on those GPUs:
http://screen/3Dkgs9syj37cjBV

Change-Id: Ib935d01e8f06dbfe7decd5cc4e52e0688b48be08
Bug: skia:11306, skia:11308
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368805
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 18:57:22 +00:00
Robert Phillips
acc6b158ff Handle overflow of accumulated rect perimeter in SkDaskPath cull_path
The fuzzer test case was:

-15,-11  ------> huge,-11
   ^                |
   |                v
-15,5000 <------ huge,5000

where the 'huge' x-value caused the accumulated perimeter to overflow.

Bug:1175370, skia:11307

Change-Id: Ic6760d38c29c440d2d4fcb225a5c556e56a992f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368317
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-02-10 18:32:12 +00:00