Commit Graph

24219 Commits

Author SHA1 Message Date
Chris Dalton
c096654fa7 ccpr: Don't assign inverse fill types to fan tessellations
Bug: skia:9453
Change-Id: Iabbd1089975efff4e89687e990128c075bf0ab9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243432
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-09-24 02:44:17 +00:00
Chris Dalton
b795ab7372 Abolish absClear
Change-Id: Iec1eba6a3e54b06685ca637e9950b3e8f95a4ae6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243176
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-23 21:13:36 +00:00
Jim Van Verth
4dd7c01ca8 Use safe computation for adding up YUVASizeInfo total bytes
Bug: skia:8757
Change-Id: Idc521302d0a2b677f6b5cd2e5ef9cf20a51607b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243427
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-23 20:55:28 +00:00
Leon Scroggins III
b3542d95da Rename SkOrientationMarker.cpp
Bug: skia:8046

The only method it has in it is SkParseEncodedOrigin, so rename to
match. As with the original file, this is here so we can update
Chromium's build file, then land the CL which makes it do something.

Change-Id: Idc8bf44ea3d3f251bd122858e10313c31d0eeec6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243426
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-09-23 19:08:13 +00:00
Brian Osman
801dd1bb0d Minor SkSL cleanup
- Fix a tiny documentation bug in the README: layout(key) needs to be on
  an 'in' variable (not just a 'uniform').
- Remove an unused list of key variables from GrSkSLFP. Guessing that
  this was planned to be used, but the key calculation requires a running
  offset through all input variables, so doesn't refer to this.

Bug: skia:9451
Change-Id: I0f32a742c14c0ba70a2c3373b92438093cd62216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243423
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-23 18:55:43 +00:00
Nigel Tao
26499bdbd1 Update Wuffs version
The primary purpose of this commit is to track upstream Wuffs more
closely.

A side effect is to pull in the Wuffs commit
ca9015bd2d
"Have std/gif replicate interlaced rows", which lessens a difference
between the old third_party/gif decoder and the new third_party/wuffs
decoder.

Bug: skia:8235
Change-Id: I8f42423e0e931ce32c49b791b325d50f83dd7eac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243336
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2019-09-23 18:17:02 +00:00
Brian Osman
e5bbce209c Interpreter: Add bitwise operators
Also, negation is unary, not binary.

Change-Id: Ic7c5a6f2ee0b2bbda89eef62999e4ebbc97dca12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243161
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-23 17:10:01 +00:00
Ethan Nicholas
d166d2e62f SkSL interpreter now properly short-circuits boolean operators
Bug: skia:
Change-Id: If7acf4107498cabc049ad130814a3814383bd14b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243418
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-23 16:21:04 +00:00
Robert Phillips
57ef680775 Create a GrGpu::createBackendTexture choke point
This also makes createBackendTexture take SkPixmaps (instead of a raw pixels pointer)

Change-Id: I5d8a5a58fa7b15862fbf46a3c232cb6ea7f58976
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243158
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-23 16:01:25 +00:00
Brian Salomon
e4bce01613 Remove a few GrSurfaceProxy::config() usages
Change-Id: I9da9e1dadea71701c97994f8df1e7b5912989672
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243159
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-23 15:43:34 +00:00
Brian Salomon
8660eb0df1 Check for scratch textures in GrResourceProvider.
Restores scratch pool checks that were accidentally removed here:
https://skia.googlesource.com/skia/+/a90382fcf6759d4e13c20cf542ab5440ffd4f02d

Also enables checking scratch pool for mip-mapped textures, which was not
previously done.

Consolidates level prep and write-pixels code.

Bug: chromium:1005237
Change-Id: I6f23ce15299290ca5b666f910dc5fc85541ec316
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243038
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-20 19:55:27 +00:00
Brian Osman
c248659c19 Use makeRenderTargetContextWithFallback when creating devices for layers
Fixes the case where someone uses the kF16ColorType flag to saveLayer
but the GPU doesn't support F16 render targets.

Follow-up to https://skia-review.googlesource.com/c/skia/+/243041,
which improved the quality of the savelayer_f16 GM on most GPUs, but
removed the final draw on the GPUs that can't respect the flag.

Change-Id: I03dac6b2370bc9117c082f6c5c9b14e84b631339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243156
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-20 18:02:57 +00:00
Brian Osman
2e29ab5b03 added support for user-defined functions to GrSKSLFP
Bug: skia:
Change-Id: I1483cdf7229b7234be41d21407e2b4abf99fff76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239925
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 17:13:57 +00:00
Robert Phillips
40b05c390c Remove a usage of GrPixelConfig in SkGpuBlurUtils::GaussianBlur (take 2)
Bug: skia:6718
Change-Id: I6a0be1cab5543c3d76a041fcdc9ae9be4a3b179b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242822
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-20 17:11:27 +00:00
Ethan Nicholas
5a9a9b8d5b Revert "added support for SkSL unpremul function"
This reverts commit ffdc3e6680.

Reason for revert: breaking Chrome roll

Original change's description:
> added support for SkSL unpremul function
> 
> Change-Id: I970f1ad0dd0859448c874498fe02342f8abc3aa3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242897
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I72dacea82b1f4ea2aa6cd600122a4810657aa32e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243117
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 16:59:58 +00:00
Vasiliy Telezhnikov
6934d75b55 Added missed ETC2 case to GrVkFormatColorTypePairIsValid
Bug: skia: none
Change-Id: Ie4613a018db42040cc2450b25f14007e3199cff6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243098
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-20 16:54:07 +00:00
Brian Osman
d7a5975e05 Reland "Use saveLayer-determined CT in SkGpuDevice::onCreateDevice"
This reverts commit 80c1f093cd.

Updated make_layer_info to avoid swizzling when the previous layer
was either version of 8888. Fixes all of the ANGLE MSAA failures.

Change-Id: Iedd410988882f3dce05bb5ec18bcd84363e3591a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243041
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-20 15:48:44 +00:00
Ethan Nicholas
57d0c985a3 regenerated fragment processors to make bot happy
Change-Id: I573b966bc8ad599adfe81008d053bfbbcefd42b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243040
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 15:18:10 +00:00
Brian Osman
80c1f093cd Revert "Use saveLayer-determined CT in SkGpuDevice::onCreateDevice"
This reverts commit 16559a1f9f.

Reason for revert: ANGLE images look bad

Original change's description:
> Use saveLayer-determined CT in SkGpuDevice::onCreateDevice
> 
> Currently Ganesh always uses the prev render target CT, but saveLayer
> may force a different CT, depending on flags.
> 
> This fixes handling of saveLayer/kF16ColorType (added in
> https://skia-review.googlesource.com/c/skia/+/227066).
> 
> Change-Id: Iab476c4afa4c70e25c452b2c430cbded5adb25e9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241876
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=bsalomon@google.com,brianosman@google.com,fmalita@chromium.org

Change-Id: I1e8eafbfdd7391c18eda4942cbdf0046a4ee2b53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243039
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-20 14:44:43 +00:00
Brian Osman
16559a1f9f Use saveLayer-determined CT in SkGpuDevice::onCreateDevice
Currently Ganesh always uses the prev render target CT, but saveLayer
may force a different CT, depending on flags.

This fixes handling of saveLayer/kF16ColorType (added in
https://skia-review.googlesource.com/c/skia/+/227066).

Change-Id: Iab476c4afa4c70e25c452b2c430cbded5adb25e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241876
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-20 13:52:50 +00:00
Ethan Nicholas
ffdc3e6680 added support for SkSL unpremul function
Change-Id: I970f1ad0dd0859448c874498fe02342f8abc3aa3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242897
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 13:41:10 +00:00
Robert Phillips
ea1b30b57b New proposed syntax for SkColorTypes
Everything except for SkImageInfo.h is mechanical

Change-Id: I2d775c79467fb15f6022e80d21b4a9151272fe2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242896
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 20:42:55 +00:00
Robert Phillips
a5d96bcc51 Remove "experimental" comments regarding RG_F16 and RGBA_16161616
These two formats are now exercised in the wacky_yuv_formats GM

Change-Id: I07a5649401b7928e8c4666e39793915ac1d45646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 18:05:38 +00:00
Mike Klein
72d2f571ff stifle warning in tValue2Scalar()
Spun off from https://skia-review.googlesource.com/c/skia/+/242776.

I was worried there that this indicated a bug, that we're actually
working with a slightly-wrong denominator, but thanks to the wonders of
float rounding, turns out everything's probably ok.  This is the same as
that CL above with unit tests that the important boundary conditions
work correctly.

Change-Id: I1df469daf48df12f0e72778e6af58f5e733452ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242841
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-09-19 17:40:58 +00:00
Jim Van Verth
b2f55532bb Set up prototype interface for MakeFromCAMetalLayer
Change-Id: I87b0fc76ef48c1a21498e576853a6c3b4a6a98f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242563
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-19 17:37:00 +00:00
Robert Phillips
c766d7fe3d Revert "Remove a usage of GrPixelConfig in SkGpuBlurUtils::GaussianBlur"
This reverts commit f580721e11.

Reason for revert: maybe angle bots

Original change's description:
> Remove a usage of GrPixelConfig in SkGpuBlurUtils::GaussianBlur
> 
> Bug: skia:6718
> Change-Id: Ia8a96cf6907ffaafd989f1e5bb1443d1ef51b9e6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242142
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ifcd22699ed64c7020c5d33781062c267595e246e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242820
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 16:16:23 +00:00
Chris Dalton
0493fbd6e2 Use GrResourceProvider::MakeApprox for mask filter proxy sizes
This allows us to demand exact matches in size and eliminate our
dependence on absClear.

In the future we can take this a step further and offset the mask to
leave a transparent border on all sides, thereby creating a "decal"
effect.

Bug: skia:
Change-Id: I8cd02ba1365ace0ccaae250a7195f51d0c77ce8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242720
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-19 15:40:43 +00:00
Robert Phillips
f580721e11 Remove a usage of GrPixelConfig in SkGpuBlurUtils::GaussianBlur
Bug: skia:6718
Change-Id: Ia8a96cf6907ffaafd989f1e5bb1443d1ef51b9e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242142
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 15:26:56 +00:00
Mike Klein
12f8680a1e fold srcover coverage with SkVMBlitter
This optimization also decreases register pressure, making it possible
to JIT where we couldn't before, in particular, srcover through an A8
mask into 8888.

These programs could use fewer registers still if skvm weren't so
literal minded about running things in the order you asked, and if it
weren't so much easier to express code as [r,g,b,a] = load_dst() than to
unpack one at a time as they're needed...  we sometimes have a bunch of
registers holding temporary values where we really only need one or two
if reordered.  This might be an area where it's better to explore
backing SkVM to a more powerful code generator, like LLVM, cranelift,
subzero, V8, etc.  But it's possible I can come up with some sort of
register-pressure-reducing code reorderer?

Add more debugging tools that helped pointed to this:
   - tack on debug names to JITted routines so I can tell what's what
   - when debugging is enabled, dump out programs that fail to JIT

Change-Id: I56f1288d830f85d5fce7c59ca0ec3360069665ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242559
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-19 03:44:11 +00:00
Chris Dalton
e2a903e18b Reland "Reorder msaa and mipmap resolves to happen all at once"
This is a reland of fd1414608b

Original change's description:
> Reorder msaa and mipmap resolves to happen all at once
> 
> Makes it so every renderTask has only one textureResolveTask, and
> modifies GrTextureResolveTask to perform multiple resolves
> back-to-back.
> 
> Bug: skia:9406
> Change-Id: I93566cf4b23764bd846a1e0a0848642c9b3a507a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: skia:9406
Change-Id: I0e98ec6749e88628f8c1bae34351f5ff95cd2066
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242519
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-18 21:00:01 +00:00
Brian Salomon
f19f9caab2 Handle F16Norm clamping in SkPaint->GrPaint conversion.
Previously this clamping was inserted by the program builder.

Adds GrSaturateProcessor to handle saturating in the fragment shader.

Clamp the GrPaint color rather than using a fp when possible.

Has to be plumbed through GrTextureOp because that skips SkPaint
conversion.

Removes a usage of GrPixelConfig.

Bug: skia:6718
Change-Id: Ifa6544496d34677f17e797433e6ef3a97be5c2b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242558
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-18 20:53:01 +00:00
Mike Klein
6b4143e11f move skvm debug tools back to core
I happened to have this on when profiling skottie_tool and got curious
why I was seeing the interpreter run and not JIT code.  Mostly this
moves the code in bulk out of SkVMTest.cpp to SkVM.cpp so that code in
SkVM.cpp can call dump() on itself.

Also this CL has the skvm::Program hang onto the original value-based
builder program (in addition to its own interpreter program and JIT
program if we can).  This is entirely so that when JIT bails out I
can have it dump out both the builder and interpreter programs for
more debugging aid.

I'm still going to need more debug tools somewhere to figure out
what the program that needs 17 registers is, and what to do about
it.

Finally, remove skvmtool.  It's annoying to maintain its build
rules, and I don't use it much if ever anymore.

Change-Id: I995d15d04bda79ddfc4d68bda8aaa3b5b9261f08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242520
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-09-18 19:41:11 +00:00
Herb Derby
c44ee1a263 Reland "SkZip - synchronized indexing of several pointers"
This is a reland of f3c4a829c6

Original change's description:
> SkZip - synchronized indexing of several pointers
>
> This is the mechanism for syncing a bunch of things with
> contiguous memory like vector<>, array<> and SkSpan<>.
>
> In a following CL, a convenience function SkMakeZip will
> easily convert most containers into a zip.
>
> Change-Id: Icda5b1774ae21c4c163a663f6d2b0f119f63ccba
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240200
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

Change-Id: I7d1a91a9c35dde721147bb3c1f23c9b3a8d59d04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-09-18 19:16:32 +00:00
Robert Phillips
17a3a0bda9 Last tranche of new SkColorTypes
This CL adds:
    kAlpha_F16_SkColorType
    kRG_F16_SkColorType
    kRGBA_16161616_SkColorType,

which should be it for a while.

Bug: skia:9121
Change-Id: I81b9d46a202a76e9b7d7ca86495d72dbdae32576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241357
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-18 18:23:29 +00:00
Chris Dalton
dc9a74f640 Weed out duplicates from the proxy version of addDependency
Change-Id: Ic1c8e0cf2a72c1cac8dadcfb7359dd1356671b11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242389
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-18 16:59:55 +00:00
Chris Dalton
b618b77180 Revert "Use a "decal" domain for filterMaskGPU"
This reverts commit a37ea9246e.

Reason for revert: Perf regressions

Original change's description:
> Use a "decal" domain for filterMaskGPU
> 
> In addition to requiring absClear, the old approach yielded
> asymmetrical blurs where the top and left edges got a "clamp" mode,
> and the right and bottom edges effectively got a "decal" mode.
> 
> Bug: skia:
> Change-Id: If72da4374eb2f0475acae59e269d44cb72c5ce95
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240759
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=robertphillips@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I653fd59401c06914cbe85bca77175e3fb182bc73
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242502
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-18 15:45:35 +00:00
Chris Dalton
6937103881 Revert "Abolish absClear"
This reverts commit f948db6228.

Reason for revert: Vulkan assertion on Nexus5

Original change's description:
> Abolish absClear
> 
> Bug: skia:
> Change-Id: Ic4a0e640623677c06112d0735ffc5682049baf11
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240771
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I071c9878d26ce0f1d91473ada48e9a702bb472de
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242480
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-18 15:44:34 +00:00
Brian Salomon
14cb4139eb Use mipmapping/protected to lookup scratch textures.
Include protected in scratch key.

Change-Id: I0dfc58c9f54e8279a39adf4bad808b7e0e72cba2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241397
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-18 15:35:05 +00:00
Jim Van Verth
e3671013e5 Reland "Add ETC2 support to Metal backend."
This is a reland of c25802db30

Original change's description:
> Add ETC2 support to Metal backend.
> 
> Fills out onCreateCompressedTexture and sets iOS caps to support ETC2.
> Skia supports no compressed texture formats on MacOS as yet.
> 
> Bug: skia:8243
> Change-Id: I2ce20f601c035a8822e658c88b815fdd8587aa98
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240692
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:8243
Change-Id: Idebc46f29f4b75d216cf877606af290b0b3b8318
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242080
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-09-18 15:19:02 +00:00
Chris Dalton
f948db6228 Abolish absClear
Bug: skia:
Change-Id: Ic4a0e640623677c06112d0735ffc5682049baf11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240771
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-09-18 08:54:02 +00:00
Chris Dalton
fac91963fc Revert "Reorder msaa and mipmap resolves to happen all at once"
This reverts commit fd1414608b.

Reason for revert: red bots

Original change's description:
> Reorder msaa and mipmap resolves to happen all at once
> 
> Makes it so every renderTask has only one textureResolveTask, and
> modifies GrTextureResolveTask to perform multiple resolves
> back-to-back.
> 
> Bug: skia:9406
> Change-Id: I93566cf4b23764bd846a1e0a0848642c9b3a507a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I12f340da3dfec81477ceeab806ca76ce2b3c397b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9406
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242390
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-18 08:24:01 +00:00
Chris Dalton
fd1414608b Reorder msaa and mipmap resolves to happen all at once
Makes it so every renderTask has only one textureResolveTask, and
modifies GrTextureResolveTask to perform multiple resolves
back-to-back.

Bug: skia:9406
Change-Id: I93566cf4b23764bd846a1e0a0848642c9b3a507a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-18 06:38:59 +00:00
Herb Derby
a9d44b61f2 Revert "SkZip - synchronized indexing of several pointers"
This reverts commit f3c4a829c6.

Reason for revert: std::get<T> is a c++14 std library call

Original change's description:
> SkZip - synchronized indexing of several pointers
> 
> This is the mechanism for syncing a bunch of things with
> contiguous memory like vector<>, array<> and SkSpan<>.
> 
> In a following CL, a convenience function SkMakeZip will
> easily convert most containers into a zip.
> 
> Change-Id: Icda5b1774ae21c4c163a663f6d2b0f119f63ccba
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240200
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=bungeman@google.com,herb@google.com

Change-Id: Idc52b0552cd01b163357a45d43d9531e62694dda
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242356
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-09-18 04:29:19 +00:00
Chris Dalton
a37ea9246e Use a "decal" domain for filterMaskGPU
In addition to requiring absClear, the old approach yielded
asymmetrical blurs where the top and left edges got a "clamp" mode,
and the right and bottom edges effectively got a "decal" mode.

Bug: skia:
Change-Id: If72da4374eb2f0475acae59e269d44cb72c5ce95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240759
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-18 04:04:38 +00:00
Herb Derby
f3c4a829c6 SkZip - synchronized indexing of several pointers
This is the mechanism for syncing a bunch of things with
contiguous memory like vector<>, array<> and SkSpan<>.

In a following CL, a convenience function SkMakeZip will
easily convert most containers into a zip.

Change-Id: Icda5b1774ae21c4c163a663f6d2b0f119f63ccba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240200
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-09-17 23:01:50 +00:00
Ethan Nicholas
5a9a0b388e fixed an SkSL parse issue
Change-Id: Icc44b10184c7be564fe7d759075a9c87c53af712
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242141
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-17 21:25:06 +00:00
Chris Dalton
6ff0613abc Reland "Use "clamp" when reexpanding gaussian blurs"
This is a reland of f19510e320

Original change's description:
> Use "clamp" when reexpanding gaussian blurs
> 
> Bug: skia:
> Change-Id: Ib0a59a56b38eb743f0c78de2cf717d04c775c8df
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240666
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Bug: skia:
Change-Id: Ie2bb23e1c0def395b5af88bd42745627e9e9b05a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242075
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-09-17 18:56:15 +00:00
Ethan Nicholas
409f6f0dec Additional SkSL swizzle optimizations
Now optimizes away identity swizzles and collapses swizzles of swizzles
down to a single swizzle.

Bug: skia:9180
Change-Id: I259ff4b316ec3479647abf9615a0e4c61c0f34c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241880
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-17 18:39:41 +00:00
Brian Salomon
db151e073f Respect ImageSetEntry alpha in one-at-a-time code path
Previously it was ignored. Update GM with test case that covers this.

Change-Id: I93e7de285a9d4020dd48e14e09e55fdfb346fff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242083
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-17 17:07:54 +00:00
Brian Osman
3257dda627 Fix standalone SkSL build after adding SkOnce to SkSLByteCode
Also trim includes in SkSLCompiler while I'm there

Change-Id: I87b27199b84e5e856e0a914f44368313a6f226e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242085
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-17 16:51:37 +00:00