Bug: skia:10205
Change-Id: I4dfb5b69009a41cf44ae1a2a06b71c067071a964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325665
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Declaring max_vertices before invocations fails to adjust max_vertices
when invocation support is not present. (It should be 4, not 2 in this
case).
Bug: skia:10827
Change-Id: Ief7af97eabf5414ea8363808fc1ad2e9c480fe10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325664
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:10205
Change-Id: I9d9ead1d40c34cd31ce0235e773de20f36f93e32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325816
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This golden verifies that when the inline threshold is zero, inlining is
not performed.
Change-Id: Icad6e1faed569dd1b2469874be3b9e635ad0b9ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325656
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
These aren't allowed in GLSL, and typically don't make sense.
Change-Id: I0afca0df638590466922a809e91ef0be35b13ca8
Bug: skia:10765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324816
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This is a reland of 6bbf026b54
Original change's description:
> Add sk_Caps.builtinDeterminantSupport and use it in cross().
>
> This CL partially relands http://review.skia.org/321790.
>
> Change-Id: I26a1aefda8a01167783e6e7fa15a51aa35ee5d82
> Bug: skia:10819, skia:10810
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323784
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:10819
Bug: skia:10810
Change-Id: I7731f93db07bc917707cbbe1daca2e5ce0f763d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324620
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Ib1374e1dce1a654a83813dbe341774bd91729796
Bug: skia:10694, skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324356
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This CL also alphabetizes the various factories in ShaderCapsFactory.
Change-Id: I0378ceb821678173e72690d5563d2a9a92d90201
Bug: skia:10694, skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324257
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This is a reland of 6113d50ec4
Original change's description:
> Rename GrStencilAttachment class to generic GrAttachment
>
> Additional this adds a UsageFlags member to the new GrAttachment
> class.
>
> Bug: skia:10727
> Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:10727
Change-Id: Ie0ff0885e01c9f0666fb0cfaa765e463dcc6d0a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324277
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 6bbf026b54.
Reason for revert: Breaking Metal bot.
Original change's description:
> Add sk_Caps.builtinDeterminantSupport and use it in cross().
>
> This CL partially relands http://review.skia.org/321790.
>
> Change-Id: I26a1aefda8a01167783e6e7fa15a51aa35ee5d82
> Bug: skia:10819, skia:10810
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323784
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=csmartdalton@google.com,johnstiles@google.com
Change-Id: I4a6c1a63dc38682dd965f78f0c1da98f35b6dbad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10819
Bug: skia:10810
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324264
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit 6113d50ec4.
Reason for revert: Breaking MSAN bot
Original change's description:
> Rename GrStencilAttachment class to generic GrAttachment
>
> Additional this adds a UsageFlags member to the new GrAttachment
> class.
>
> Bug: skia:10727
> Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com
Change-Id: I2ee2a1fcabd75bc24d3b7c3f76d971a3adb370a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10727
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324276
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
SkImageFilters::Paint did not use every slot of the SkPaint, with only
its color, alpha, color filter, and shader having a meaningful effect on
the image filter result. It was always blended into a transparent dst,
so blend mode wasn't very relevant, and it was always filled to whatever
required geometry, so stroke style, path effect, and mask filters were
ignored or not well specified.
Color, alpha, and color filter can all be combined into an SkShader, so
a more constrained SkImageFilters::Shader provides the same useful
capabilities without as many surprises.
SkImageFilters::Paint still exists, but is deprecated to be removed
once I've confirmed clients aren't depending on it.
Bug: skia:9310
Change-Id: I11a82bda1a5d440726cf4e2b5bfaae4929568679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323680
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Additional this adds a UsageFlags member to the new GrAttachment
class.
Bug: skia:10727
Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Once triangulated paths are added this will no longer just be storing proxy views.
Bug: 1108408
Change-Id: I82fa47b0b85f738d9a25330c29bc2892c9bfeda4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323999
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The benchmarks show a negligible performance decrease over the bespoke
TinyUnorderedMap class, but it's well within the margin of error, and
a real hash map will scale better in pathological cases.
Nanobench: http://screen/537ETJivpGdVJpk
Change-Id: I21279c47742a5dac81d57c7e9f7da4bfc595fdc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323114
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This removes VarDeclarationsStatement entirely. VarDeclaration instances
appear directly as statements in Programs. SkSL that declares multiple
variables in a single declaration is transformed to represent that as a
series of VarDeclaration statements.
Similarly, global variable declarations are represented by
GlobalVarDeclaration program elements, one per variable.
Bug: skia:10806
Change-Id: Idd8a2d971a8217733ed57f0dd2249d62f2f0e9c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323102
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This reverts commit 57c37ad0e4.
Reason for revert: Breaking the Mali400 bots.
Original change's description:
> Add a 2d cross product intrinsic to sksl
>
> Change-Id: Iebaf4616665547d6ca4900e1247d5b68e0f3512a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321790
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,csmartdalton@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I3e1aa251e883e3d2a1170b0fc6cdc84ea06e784a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323556
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Iebaf4616665547d6ca4900e1247d5b68e0f3512a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321790
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
SymbolTable::addAlias can be used to create a Symbol that's an alias for
an existing symbol, but uses a different name. (e.g. in Runtime Effects,
a `fragmentProcessor` is a `shader` and `float4` is also `vec4`.)
SymbolTable::addWithoutOwnership will now assert if an attempt is made
to add a Symbol with the wrong name. In a followup CL, the name argument
will be removed entirely and it will simply use the Symbol's name.
Change-Id: I9aee7717e2600a6d84ebe4c3ab7fca40229faa5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323106
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Identical to https://skia-review.googlesource.com/c/skia/+/286070.
Bug: skia:10165
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-arm-Debug-Chromebook_GLES;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Release-All-TSAN,Build-Debian10-Clang-arm64-Debug-Android_ASAN
Change-Id: I0ec9d5f6875768e665f444e1ada211d3da537678
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322976
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This fixes includes like <cxxabi.h> in Android ASAN builds.
Bug: skia:10165
Change-Id: Ieeff45b29cd527dd0a60ed21422378f5aa610cc7
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-arm64-Debug-Android_ASAN,Build-Debian10-Clang-arm-Debug-Android_ASAN
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322906
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Our code relies on std::unordered_map for storage of unordered data.
Unfortunately, while unordered_map is algorithmically quite efficient,
in many real-world scenarios--particularly with small amounts of data--
a simple vector with linear search runs rings around it.
This CL doubles the performance of `nanobench -m sksl_large`:
http://screen/7uGYGLCaTtaHU4j
Change-Id: Ia2f6cedfac338876c2da57642e9b34addd85b683
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322320
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Just a typo fix.
Change-Id: I2fe1f6ae1c99d7f20a4fa5f49eefea514e224652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321977
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Part of this change is to move some of this static format information
off of GrCaps since it is not cap dependent in anyway. This allows us
to the need for caps in many places. Also changes the low level format
query to be based off of bytes per block so it can be shared for
compressed and non compressed formats.
This change will also make it easier to add stencil/depth formats in
follow on change since we don't have to fill in a whole caps
FormatInfo block just so we can get the bytesPerPixel which is all
they need.
Bug: skia:10727
Change-Id: I2e6fdabf3ed699b4145ef9e6f0a73078d32a0444
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321463
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I9568deca0031d32bc1c6bdf1f11f6da76de6d07f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320075
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
ninja 1.9.0+ exposes a bug in python shutil.copy2 where a copied file's
date is the src's date but rounded. This can cause ninja to think the
copied file is slightly older than the src and trigger unnecessary work
when building.
https://github.com/ninja-build/ninja/issues/1554
Change-Id: I53247453f38a1c98c5d832bdda0f68effbe786c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320261
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This was adapted from a test in SkSLInterpreterOutParams and presents a
challenging double swizzle.
Change-Id: Icb7b3bbb18d4b3cfa0c26acb524c08812ba88096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319920
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
SkGlyphRect is a rectangle encoding specialized for
union and intersect. It will be used for calculating
the bounding boxes of glyph runs, and clipping glyphs
for GPU.
Change-Id: Icab826b51dc2254ee4006ada84f7fc09e112a933
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319697
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
GLSL does not support assigning to ternaries, and will fail to compile
and/or generate non-functional shaders if we pass in a shader that tries
to assign into a ternary expression.
If SkSL is able to completely eliminate the ternary (e.g. if it boils
down to a simple `true ? x : y` or `false ? x : y`), SkSL can strip out
the ternary entirely and generate valid GLSL. This case is harmless and
so it is still allowed.
Change-Id: I960f119fb9934f998697634e6c4e519cd77d3780
Bug: skia:10767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319679
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This was unused and did not work on non-GLSL backends.
Change-Id: I6bd314d43cfefa64871b5c0e964b5ae52e494164
Bug: skia:10757
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319778
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This will allow the inliner to use IsAssignable.
Change-Id: Ic94f71002779b53d0b3dc97f37fbe4bb98b026d8
Bug: skia:10756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319414
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
These tests will also be used for Metal and SPIR-V testing. A small
handful of GLSL-specific stragglers (#version-specific or type-precision
related) will remain in /glsl/.
Change-Id: I7f2b2bd92825c327922c8ce74e438d2daa440dff
Bug: skia:10649
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319408
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Now uses a GN template to avoid copy-pasting the same logic for each
type of test we want to perform, and the same file to be compiled in
more than one way at a time via an extra flag to compile_sksl_tests.py.
Change-Id: I8aadedeb140d78d58a345a2bac0da3d9c77e9a19
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319347
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This reverts commit b61c3a9a01.
Change-Id: I42d93bdc6455c8ef941a6cbe1339df2ba916bb3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318697
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Adds base class GrD3DAlloc and GrD3DMemoryAllocator, and a reference
to a GrD3DMemoryAllocator in GrBackendContext and a reference to a
GrD3DAlloc in GrD3DTextureResourceInfo. Internally, we override this
base class to define the AMD memory allocator.
Change-Id: I033924b0247ea330969b1398f25985e7a84aec11
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317243
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
If the blob is empty, then try to regenerate it. Using
this method caused a slowdown in Skia perf, so we
added an extra check to allow some empty blobs through
for perf performance. The perf problem was caused by
SKPs generate empty blobs because of font mismatches.
Flutter has shown that scaling from very small to
normal size is not correctly handled by the existing
check. This CL favors correctness over optimizing empty
text blob and always regenerates empty blobs.
https://github.com/flutter/flutter/issues/64936
Change-Id: Ib18ecb684b0af5cf6dce274b6dc09a9c61b17c77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319031
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
These cover:
- Properly configured out-params
- Invalid/non-lvalue out-params, which currently cause an SkSL crash
- Interactions between the inliner and variable swizzles
Change-Id: I4874101236084f273e704d8717149b431d813883
Bug: skia:10753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The code here is resuscitated from the GLSL testing harness at
http://review.skia.org/317771 . Testing and debugging in dm is simpler
than debugging skslc when we encounter compiler issues.
Change-Id: I492dd0bbd2f0ee0b3b6a1b5253da54d72dc1eb3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319032
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
(Removed one test, SkSLFPSwitchWithMultipleReturnsInside, because it was
redundant with existing tests.)
Change-Id: I1bfc069babdb5eb0cc515f195c3a2e307bb5871a
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319029
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This test currently crashes skslc, but will be fixed in the followup CL.
Change-Id: I3683d94a310242e8ca67560296518fd1223b28d0
Bug: oss-fuzz:25781
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318656
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
I realized that "DefaultSettings" as a name suffix was unclear, because
"Default" is a different settings mode from skslc running with
--nosettings.
In --nosettings mode, skslc uses "standalone" settings.
Change-Id: I1f5d80df0a21cec55948c4ad146169bcb34f4999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318210
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Several blend functions generate a surprisingly large amount of code,
and appear to have opportunities for further optimization. At any rate,
if we make compiler changes that would affect the output of a blend
function, I think we would want to see the changes reflected in our
golden outputs.
Change-Id: Iff612dcd4bad8824b5e6e97413ffce19e5ea1c0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318336
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit 910845fac1.
Reason for revert: IRGenerator inline change reverted
Original change's description:
> Add program-settings flag to disable the inliner.
>
> Change-Id: I6c4e7f6a2aab6710221029022a3a5f3ec323c5e2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317856
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Ie38a29495ea8497f9db26d2603df179e696ac5ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317977
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This resolves the following TODO block:
TODO(johnstiles): the skslc standalone caps bits do not enable
do-while support, so this test does not actually perform as
described; the `returny` function is not inlined at all. This will
be fixed when customizable caps-bit support is added to the golden
tests.
Change-Id: I3495e4813b9be37264a8fda978453594c1f5fa13
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317859
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Ideally the optimizer should be able to detect and remove this loop.
This CL establishes a baseline.
Change-Id: I6aba0b52fe49552f170fca25d81c29c515044ef5
Bug: skia:10737
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317861
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I6c4e7f6a2aab6710221029022a3a5f3ec323c5e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317856
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: I72fd3083f75ca5bf74fb2c3b032465864a13aed5
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317771
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I01c150d6bfcdd1500033521a87c058c7428c3521
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317769
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I35ff25c4cc394c1a4a964207ece87095a9ba84cf
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317767
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: Ic8f4730d035981c32b4ddb48e5e919b0396b6d93
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317578
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We were allowing these ops on floating point types. The resulting GLSL
would fail to compile. We also allowed >>= and <<= on vectors (but not
any of the other bitwise ops).
The newly added unit tests were failing (eg, not catching errors). New
results are correct.
Bug: skia:10707
Change-Id: I97b769f1ce59261361109a71061b42dc8ef3c74b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317393
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I83a38f2c953a560fea3483e95e31df532b90773e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317456
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
We now support building an SkSL golden output twice, once honoring the
custom #pragma settings, and once more ignoring the settings. This
allows us to see the output of the workaround technique, alongside the
"default-settings" output which should not contain a workaround.
To implement this, skslc now supports a flag: --[no]settings.
When it's set, /*#pragma settings*/ comments are honored. When it's not
set, skslc ignores the comments. compile_sksl_tests.py passes this flag
along to skslc.
This approach is not strictly limited to workarounds; the
"TypePrecision" GLSL test was also updated to use this technique.
Change-Id: I79204df047b024533ed6bc1f4c088e0e878d5bb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317246
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Trying to run Chrome trybots on changes to SkVx.h,
but it's deciding to skip the build...
Change-Id: Ic40cc2eec5db00c4f6eacc72e0e50101a8478e99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317596
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 1d3e0e0054.
Reason for revert: possibly causing https://task-scheduler.skia.org/task/F1DoniJAddPuEkH9ETTE
Original change's description:
> Revert "Revert "moved BinaryExpression's data into IRNode""
>
> This reverts commit b61c3a9a01.
>
> Change-Id: I4689e1f4977fab3233ff492cee06fbc301b5c689
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317386
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
# Not skipping CQ checks because this is a reland.
Change-Id: Id0f3f211f09fbf31b626c648ed141fc6154a450c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317395
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This will allow us to write skslc-based golden tests that deviate from
the standalone skslc settings.
This CL provides six options; more will be added as necessary.
- Default (caps)
- UsesPrecisionModifiers (caps)
- Version110 (caps)
- Version450Core (caps)
- ForceHighPrecision (settings flag bit)
- Sharpen (settings flag bit)
Change-Id: I9b779e039b2f0c0ccf43dca226fb4844aff3526b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317237
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I41402dc04d4388217d7f7cd8de9aff8fbb4a3765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317391
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
A handful of simplifications were made, but these hew very close to the
original tests and are intended to cover the exact same ground. The
remaining unconverted tests depend on non-default caps bits and will
be updated once caps handling in skslc is fully landed.
Change-Id: I3f3c29bf87f73e501561d7bfcdaabe8acc14b89f
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317390
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>
This reverts commit f6e0f58b2e.
Reason for revert: benches and tests updated here: https://skia-review.googlesource.com/c/skia/+/317380
Original change's description:
> Revert "Enable novel GrClipStack on bots, disable elsewhere"
>
> This reverts commit e1ade2ac4a.
>
> Reason for revert: Need to remove benchmarks that use deprecated SkClipOps first.
>
> Original change's description:
> > Enable novel GrClipStack on bots, disable elsewhere
> >
> > As a result of this change, the new GrClipStack will run on all of our
> > default bots. However, the SK_DISABLE_NEW_GR_CLICK_STACK define is used
> > to explicitly disable the clip stack when we build for the Android
> > Framework, Google3, Flutter, and Fuchsia. These projects can have staging
> > controlled from within the skia repo. This CL in chromium also disables
> > the new clip stack: https://chromium-review.googlesource.com/c/chromium/src/+/2412768
> > and must land before this CL does in Skia.
> >
> > When GrClipStack originally landed, I had it disabled by checking the
> > value of the define SK_USE_NEW_GR_CLICK_STACK for 0 or 1. To be a little
> > simpler, and work with the flutter and fuchsia gn defines, this CL
> > switches GrClipStack control over to SK_DISABLE_NEW_GR_CLICK_STACK and
> > it just checks for whether or not it's defined.
> >
> > Bug: skia:10205
> > Change-Id: I6b8bd18290844c02839fe99fdf629b48ffd86f27
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317209
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I14fddccfdea8e91ebad92e55193b0034f8bb28af
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10205
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317377
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
# Not skipping CQ checks because this is a reland.
Bug: skia:10205
Change-Id: I1f26496437ed04a79e9c1058428cdc867ae3be39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317385
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit efc8797880.
Reason for revert: breakage due to std::max initializer list
Original change's description:
> moved BinaryExpression's data into IRNode
>
> This is another step in the process of merging the various IRNodes' data
> into the base class.
>
> Change-Id: Ide39c240e6178e23bb6fe317dd56addf2ffefcbb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317102
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Ib8ef629ffa0ff8bb0aeddfa4f42b824e79ce72b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317384
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This simplifies life when revising the swizzle logic.
Change-Id: I7fc63c0cc845c4741c17c82b3078040264b61ba0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317379
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is another step in the process of merging the various IRNodes' data
into the base class.
Change-Id: Ide39c240e6178e23bb6fe317dd56addf2ffefcbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317102
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This reverts commit e1ade2ac4a.
Reason for revert: Need to remove benchmarks that use deprecated SkClipOps first.
Original change's description:
> Enable novel GrClipStack on bots, disable elsewhere
>
> As a result of this change, the new GrClipStack will run on all of our
> default bots. However, the SK_DISABLE_NEW_GR_CLICK_STACK define is used
> to explicitly disable the clip stack when we build for the Android
> Framework, Google3, Flutter, and Fuchsia. These projects can have staging
> controlled from within the skia repo. This CL in chromium also disables
> the new clip stack: https://chromium-review.googlesource.com/c/chromium/src/+/2412768
> and must land before this CL does in Skia.
>
> When GrClipStack originally landed, I had it disabled by checking the
> value of the define SK_USE_NEW_GR_CLICK_STACK for 0 or 1. To be a little
> simpler, and work with the flutter and fuchsia gn defines, this CL
> switches GrClipStack control over to SK_DISABLE_NEW_GR_CLICK_STACK and
> it just checks for whether or not it's defined.
>
> Bug: skia:10205
> Change-Id: I6b8bd18290844c02839fe99fdf629b48ffd86f27
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317209
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I14fddccfdea8e91ebad92e55193b0034f8bb28af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317377
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
As a result of this change, the new GrClipStack will run on all of our
default bots. However, the SK_DISABLE_NEW_GR_CLICK_STACK define is used
to explicitly disable the clip stack when we build for the Android
Framework, Google3, Flutter, and Fuchsia. These projects can have staging
controlled from within the skia repo. This CL in chromium also disables
the new clip stack: https://chromium-review.googlesource.com/c/chromium/src/+/2412768
and must land before this CL does in Skia.
When GrClipStack originally landed, I had it disabled by checking the
value of the define SK_USE_NEW_GR_CLICK_STACK for 0 or 1. To be a little
simpler, and work with the flutter and fuchsia gn defines, this CL
switches GrClipStack control over to SK_DISABLE_NEW_GR_CLICK_STACK and
it just checks for whether or not it's defined.
Bug: skia:10205
Change-Id: I6b8bd18290844c02839fe99fdf629b48ffd86f27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317209
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is by no means perfect or complete but does break up the review.
Bug: 1108408
Change-Id: Ib1826cd40975c7e84b5fdfc16d1ecbec97dab237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317201
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Overview doc: https://docs.google.com/document/d/1ddIk74A1rL5Kj5kGcnInOYKVAXs3J2IsSgU5BLit0Ng/edit?usp=sharing
This is the new clip stack that will replace GrClipStackClip. The doc
link in the CL description has a much more detailed overview of what the
strategy of the new clip stack is, but at a very high level:
1. Add a temporary #define that lets SkGpuDevice switch between the old
stack and the new stack. For the new GrClipStack, it extends SkBaseDevice
directly and has to implement all of the device clipping virtuals.
- If you look from patchset 5 and earlier, the define defaults to on
so I can test it on the bots, etc. but the plan will be for it to
default to off when this lands so it's only running on unit tests.
Then in a follow up, I'll turn it on for our bots but keep it off in
chrome and android. If everything looks good, chrome can then be
turned on. There is a more extensive migration plan for android
because of the expanding clip ops, but that is covered at the end of
the overview doc.
2. GrClipStack manages save/restore logic of the stack and extends GrClip,
so the cpp file also includes code to apply a GrAppliedClip. At the moment
the apply strategy is as close to that in GrReducedClip and
GrClipStackClip as I could make it. Down the road, I think we can explore
other analytic coverage options and a clip atlas that replaces the unified
SW mask.
- Once GrClipStack is enabled everywhere, it means GrReducedClip and
GrClipStackClip can be deleted, so I'm not too worried about sharing
code between the two. A lot is already shared through the use of
GrSWMaskHelper and GrStencilMaskHelper.
- SkClipStack and SkClipStackDevice are still used by the PDF and SVG
backends, so they aren't necessarily deletable.
3. The GrClipStack only handles intersect and difference ops. It
represents all geometric clip operations as an element. The stack itself
is controlled by the "save record", which tracks aggregate bounds, valid
elements, and the non-geometric clip shader.
- When a new save record is pushed on the stack, older elements are
inactive. This means they cannot be modified, since they may need to
be activated again when the current save is popped off the stack.
However, they can still affect the clip during application.
- When a new element is pushed on the stack, older elements may be
invalidated. This means they don't need to be considered any more
because they are redundant with the new clip shape (e.g. nested round
rect clips only have to keep the innermost valid).
Bug: skia:10205
Change-Id: I68ccfd414033aa9014b102efaee3ad50a806f793
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308283
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
fuzzers can't build there, but I don't really care.
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86-Debug
Change-Id: Icb729e8802ccd3cdd1e1384d006d46bd7dc2cd08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317150
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
GN lists both the .cpp and the .h as generated outputs, so if they don't
exist, Ninja assumes we need to rebuild the tests every time we compile.
Change-Id: I37b8b3d9e7aef1b0cb8d5c70530c2542a6c0087a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317108
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
On Windows, the process output contains CRLF sequences. Calling
splitlines() recognizes those (Python universal line endings), so we get
a list of the output lines. Joining those with '\n' produces a string
that just has LF. (We add another one, so we still end the file with a
newline). Because we've opened the file in binary mode, the resulting
files now look the same, regardless of OS.
Change-Id: I1f032aa6e0f82057f593c25ce0676983733b9e56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317105
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Our lack of proper caps-bits controls in skslc affects the outcome of
one test: "InlinerWrapsEarlyReturnsWithDoWhileBlock" does not actually
emit the do-while block because the standalone caps bits don't enable
do-while support. This will be fixed in a followup CL that adds caps-bit
support to our tests.
A few tests were renamed for consistency, a few were simplified slightly
and one test was removed because it was simply redundant (there was a
second test that covered the exact same ground as
`ForWithReturnInsideCannotBeInlined`).
Change-Id: I2e3b97cb3aea331b6d806bdb865aa78c35c7a6b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316997
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
For the longest time, the libfuzzer binaries used by oss-fuzz
were just hacked onto the BUILD.gn file. This removes that patch
and makes them buildable from Skia proper.
After this, there should not be any modifications oss-fuzz needs
to do to a Skia checkout before it builds and runs.
Of note, oss-fuzz will define skia_use_libfuzzer_defaults to be
false so it can control those flags with more finesse (e.g.
fuzz with ASAN, fuzz with hong fuzz instead of libfuzzer). I
added on skia_use_libfuzzer_defaults so that a normal developer
gets something that works by default.
Bug: skia:10713
Change-Id: I024f5805060cba8f8560e1c2569b9309fb49a564
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316536
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
The following conditions lead to the error:
- A pair of nested functions, both of which must be inlined.
- Both inlined functions create a variable with the same name.
- The outer function passes its variable to the inner function.
- The initialization of the inner variable uses the value from the outer
variable.
- The inner function does not mutate the variable, use it as an out-
parameter, or otherwise cause it to receive a temporary copy.
When all these conditions are met, both variable declarations are
inlined as-is without performing any name salting, because it's
seemingly safe to do so. The name overlap issue is not considered in the
safety checks. Inlined variable declarations are not subject to name
salting but they should be; I suspect other adversarial examples could
be crafted as well where unhandled name overlap leads to errors.
Change-Id: Ia754bee8e45c8a5c7548436594bbf04abc7a8396
Bug: skia:10722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316945
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The new test files are intended to be identical to the unit tests in
every meaningful way. (Comments and formatting are not preserved
exactly.) In cases where a unit-test method contained more than one
test, multiple test files were created; in these cases, new names were
invented to match the apparent intent of each invocation.
Followup CLs will continue to migrate additional tests.
Change-Id: I785c6761ba7ee2b25b5ddc0108321734be23b77c
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316678
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: I56e19153597e2c4393c5821314b82937828c0d50
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316569
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Golden SkSL outputs are intended to eventually replace the majority of
our unit tests, since they can automatically update themselves when we
change implementation details of the compiler.
If you change the compiler output without updating the Golden files, the
CheckGeneratedFiles housekeeper will be triggered. Set
`skia_compile_processors` or `skia_compile_sksl_tests` to true in your
GN args to regenerate them.
Almost all of the tests from SkSLFPTests.cpp and SkSLGLSLTests.cpp can
be migrated into separate unit-test .fp/.sksl files in a followup CL.
hcm@ has signed off on removing the copyright boilerplate preamble from
our unit test files.
Change-Id: I9e24a944bbac8f8efd62c92481b022a0b1ecdd0b
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316336
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This will be leveraged in followup CLs to avoid recursive inlining death
spirals.
Change-Id: Icf99c88c4acaaa766e0dc0971830329e24d70509
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
All tests are now GLSL-based instead of .fp based, for ease of
readability. DEF_TESTs which called test() more than once have been
split up into a separate individual DEF_TEST for each test() call, to
simplify fixups going forward.
Change-Id: I9202e95e9cafff3efc0c32aa3f3ca2eea04719fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314886
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
We've been stifling this on Clang builds but not GCC,
for no good reason.
Change-Id: I49d6059dcf7547d25ec83c507c92f115ab199b79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314677
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
The functional changes needed to make this migration possible have
already been submitted in prior CLs, so although this is large, it is
almost entirely a mechanical migration of code from one file to another.
Change-Id: I54380b52e38ebcec40ffbca7cb254f9655cb1865
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313909
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This sample attempts to re-create an image's alpha channel by drawing it
one pixel at a time and timing how long each pixel takes to draw.
The "abc" text should appear twice normally, and the third and fourth
versions are reconstructed from timing, one by timing 1:1 pixel draws,
the other by timing 1x1:1024x1024 upscale into an offscreen. It's not
meant to be an exact reconstruction, but you can easily see the shapes,
particularly at -O0, -O1, and -Os. Auto-vectorization from -O2/-O3 do
a good amount to cover up the problem.
The legacy CPU backend is the main place to look. I haven't been able
to reconstruct any images using SkRasterPipelineBlitter or SkVMBlitter,
and while on the GPU I do see non-random patterns in the timing, it
appears to be the same single pattern across devices, OSes, GPUs, GPU
APIs and content... I assume it's something like our resource caching
policy.
This can't really be a GM, given how it draws non-deterministically.
Bug: chromium:1088224
Change-Id: I2ec79c8dd407ecb104fd9bf0c8039cb6dd1fe436
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313466
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
SkYUVAPixmapInfo is a SkYUVAInfo with per-plane color types and row
bytes. It describes a set of pixmaps that make up a planar image.
Consolidates validity checks of the SkYUVAInfo with the color types
and row bytes. It can provide SkImageInfos for each plane and also
assist with configuring planes to share a common allocation.
SkYUVAPixmaps is a collection of SkPixmaps that are valid for a
SkYUVAInfo. It can either wrap existing SkPixmaps or allocate and
own the memory. It consolidates validity checking of SkPixmaps with
the SkYUVAInfo. Replaces sk_gpu_test::YUVAPixmaps.
Minor tweaks to SkYUVAInfo naming, parameter order consistency, adds a
hasAlpha() method.
Bug: skia:10632
Change-Id: Ib0f48b8448fff22805fd0c04e07887d0b7338b76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312886
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
With the removal of the unused set call, I really don't see a reason to
have the Priv class just for glRTFBOIDIs0 getter. Especially since all
other similar getters related to surface flags are exposed on the main
class. So I've removed the priv class since I don't think it really
adds much to hide such a function from ourselves.
Change-Id: I834fae036b63cc66732d32d7c74b0ed08438f870
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313419
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
I think this new slice will run on the iPhone11 but
none of the older iOS devices, including the iPad bots.
Bug: skia:10663
Change-Id: I99edeccdd4adc845d3a79d7960b932bff374e77f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313073
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Tunnels through SkImageGenerator as well.
The new SkCodec interface doesn't assume three 8 bit planes.
New SkYUVASpec more clearly defines chroma subsampling and siting of
the planes.
The intent is to use this for other YUVA APIs as well, in particular
SkImage factories in the future.
In this change we convert to the SkYUVASpec to SkYUVASizeInfo
and SkYUVAIndex[4] representation. But the intent is to use
the SkYUVASpec representation throughout the pipeline once
legacy APIs are removed.
orientation GM is replicated to test a variety of chroma
subsampling configs.
Bug: skia:10632
Change-Id: I3fad35752b87cac16c51b24824331f2ae7d458d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309658
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
It is on skia_sksl_gpu_sources list already.
Bug: skia:10650
Change-Id: I1e4bb0b2346ad8a74ddbdb3d3ff44ea7de6c0cd3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312736
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: Id2f3ed80c76c4c409afdd2fa86c9b8e7fd1266ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312485
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This removes about 5 kb of wasm code size (2 kb gzipped),
20 kb of js code size (4kb gzipped).
I think I can remove getproc (which is a somewhat large
function made up of a lot of string data) with some clever
adjustments of macros in a follow-on CL.
Change-Id: If3a4b30681e13abddea8e84d62297e90316ed7cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311817
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This reverts commit 7f1117e886.
Reason for revert: Seems like Clang gets stuck allocating registers on ARM,
[2477/38027] CXX obj/skia/skia/SkSLByteCode.o
FAILED: obj/skia/skia/SkSLByteCode.o
/b/s/w/ir/cache/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF...(too long)
fatal error: error in backend: Error while trying to spill LR from class GPR: Cannot scavenge register without an emergency spill slot!
PLEASE submit a bug report to https://crbug.com and run tools/clang/scripts/process_crashreports.py (only works inside Google) which will upload a report and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/skia/ski...(too long)
Original change's description:
> remove sksl interpreter guards
>
> This is only used by particles, benchmarks, and tests,
> and should be swept away by dead code elimination otherwise.
>
> Change-Id: I10462d6ae0a08dd8219fc49325160ec6790632af
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311759
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,brianosman@google.com
Change-Id: I1b6370d39285210267425f090235a4d80aebe4fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312034
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is only used by particles, benchmarks, and tests,
and should be swept away by dead code elimination otherwise.
Change-Id: I10462d6ae0a08dd8219fc49325160ec6790632af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311759
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Allow the user of SkCustomTypefaceBuilder to set the SkFontStyle of the
resulting SkTypeface. This allows users to build font families.
Fix the Font_flatten test to actually work (instead of relying on the
magic behavior of nullptr for SkTypeface), add a test with the custom
typeface, and reduce the number of times the inner loop runs from
302,400 times to 4,032 times so that the test finishes in a reasonable
amount of time.
Bug: skia:10630
Change-Id: I0b5e939552ee4a9a1249eefbb7a7279a59b38e5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311596
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Xiao Yu <xster@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
For now this relies on system libs and requires explicit opt-in
(skia_use_sfml=true).
[1] https://www.sfml-dev.org/
TBR=
Change-Id: Iff89efdb4494f79530d0d41dee80ff38d4e75671
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310065
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This is a reland of 166cd52cee
with iOS simulator builds disabled.
Original change's description:
> move conditions for JIT into SkVM.h
>
> This makes it easier to keep in sync with the implementation in
> SkVM.cpp, and it's easier to handle here once than in each build system.
>
> Change-Id: I429f90cfc16f35a0d7e0b0fde176bc013aa7db18
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310263
> Commit-Queue: Mike Klein <mtklein@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
Change-Id: I82837c3d959769f26197f2402d3b911e71a35675
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310465
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 166cd52cee.
Reason for revert: iOS simulator was on unintentionally
Original change's description:
> move conditions for JIT into SkVM.h
>
> This makes it easier to keep in sync with the implementation in
> SkVM.cpp, and it's easier to handle here once than in each build system.
>
> Change-Id: I429f90cfc16f35a0d7e0b0fde176bc013aa7db18
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310263
> Commit-Queue: Mike Klein <mtklein@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
TBR=mtklein@google.com,herb@google.com,reed@google.com
Change-Id: I1ae283be09906603c207079cbf6f1e296a4835f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310462
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This makes it easier to keep in sync with the implementation in
SkVM.cpp, and it's easier to handle here once than in each build system.
Change-Id: I429f90cfc16f35a0d7e0b0fde176bc013aa7db18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310263
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Change-Id: I7ba287b5d8e34571b5ca3e502413b2aafa27acc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310059
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:10369
Add SkEncodeImageWithNDK, mirroring the CG and WIC versions, for
encoding with the NDK APIs added to R.
Rename SK_ENABLE_NDK_DECODING to SK_ENABLE_NDK_IMAGES and use it for
both encoding and decoding.
Move code for converting to/from NDK types into a common location.
Update encode_platform.cpp to use NDK encoding APIs when available and
to use both types of webp (lossy and lossless). Add tests specifically
for the new implementation.
Update NdkDecodeTest to use ToolUtils::equal_pixels for comparing
pixels.
Change-Id: Ic62f89af27372ccce90b8e028e01c388a135a68c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308800
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
I created this problem with my fix to crbug.com/1108475
Bug: 1112259
Change-Id: Ieb001fa61bd9ed68dcae43e7d511b4581f16ef0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308638
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I5b06691d4f0383957b4031b3fd3e96bdfad94521
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Flutter
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309665
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is a reland of a1df23c8b7
Original change's description:
> Implement `dumpInfo` for .fp files.
>
> Change-Id: I40f6c1a02e194f090e67a0e3f2d7d83cd2317efd
> Bug: skia:8434
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309139
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
Bug: skia:8434
Change-Id: If485635440b800f8a282c871a1c5f2801608d3c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309660
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit a1df23c8b7.
Reason for revert: Needs c++17 library as written
Original change's description:
> Implement `dumpInfo` for .fp files.
>
> Change-Id: I40f6c1a02e194f090e67a0e3f2d7d83cd2317efd
> Bug: skia:8434
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309139
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: I09b98e83735bc30ec8a2e313e4b76a9eb6a7631a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8434
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309656
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The 'pts' coordinates should be transformed by the view matrix. We could
instead apply the inverse src rotation to ptsRot when determining the
perpendicular and parallel scales, but this is valid and straight
forward.
When determining the device segment lengths in onPrepare, we do need to
transform the ptsRot by fSrcInvRot (which includes the view matrix),
instead of just the view matrix.
This fixes the linked chromium bug, which drew a wider stroked dash
because on a perfect vertical, the rotation to a canonical x-axis
geometry would end up swapping perpendicular and parallel scale factors.
Bug: chromium:1113794
Change-Id: Ibc37f8a24688a76e0d0947b0c53c8bd13cd769cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309443
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I40f6c1a02e194f090e67a0e3f2d7d83cd2317efd
Bug: skia:8434
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309139
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This adds an error variable that keeps track of the total distance from
the simplified line, and includes it when determining if we should
keep the next point. Using a sum of line distance is just a heuristic
but seems to address the current case of over simplification while
allowing us to keep a greedy strategy.
Bug: chromium:1086705
Change-Id: I29e21724db6b30495c2934e376a5e4d787c846a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309328
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This refactoring was requested during an earlier code review.
Change-Id: I93184e2bc936b3c8c69f84e475be2c234845ee81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309120
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
There are no intentional behavioral changes in this CL. It should
purely be cut, paste, re-shuffle & get re-compiling.
Bug: 1108408
Change-Id: Ic8457d0af76861f2ea881177f2b2c0fe0bf85146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309040
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Explanation: The sksl standalone compiler is used to convert the raw
(text) SkSL pre-includes into a "dehydrated" binary format. It also
(previously) depended on those files, as they were #included and used,
unless a special #define was changed. This created a dependency cycle
that we hid from GN (by lying about the outputs of the dehydrate step).
As a result, builds would never reach steady-state, because the compiler
would be rebuilt (due to the newer dehydrated files), and then the
dehydrated files would be rebuilt (due to the newer compiler).
This CL changes the logic so that the standalone compiler always uses
the textual pre-includes, and no longer depends on the dehydrated binary
files. Thus, to make any kind of change to the dehydrated files (whether
due to pre-include changes, or the encoding format itself), you just
need skia_compile_processors enabled. The dependencies are now honestly
communicated to GN, and we reach steady state after one build.
The NOTE above is because GN/ninja cache the dependencies of each
target, and will still think that the SkSLCompiler.obj linked into the
standalone compiler depends on the dehydrated files, at least until one
successful build, when it will realize that's no longer true.
Reland notes:
The bots originally rejected this CL, because SkSLCompiler was
hard-coded to load the text files from a relative path that assumed the
executable was in "<skia_checkout>/out/<some_dir>". That's not true for
bots, and it was fragile, even for users. Now, we use GN to directly
generate sksl_fp.sksl, and copy all of the other pre-includes to the
root out dir (working directory when running skslc). This means we
no longer need to generate the sksl_fp.sksl file into the src tree, and
the compiler can more safely assume that the files will be in the
working directory.
Bug: skia:10571
Change-Id: Id7837a9aba7ee0c3f7fa82eb84f7761e24b9c705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308896
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit a1ed0dc9f8.
Reason for revert: Bots will need some guidance to ingest this CL
Original change's description:
> Untangle dependency cycle in sksl dehydration
>
> NOTE: If you have any out directories with skia_compile_processors
> enabled, you will likely need to run `gn clean <dir>`
>
> Explanation: The sksl standalone compiler is used to convert the raw
> (text) SkSL pre-includes into a "dehydrated" binary format. It also
> (previously) depended on those files, as they were #included and used,
> unless a special #define was changed. This created a dependency cycle
> that we hid from GN (by lying about the outputs of the dehydrate step).
> As a result, builds would never reach steady-state, because the compiler
> would be rebuilt (due to the newer dehydrated files), and then the
> dehydrated files would be rebuilt (due to the newer compiler).
>
> This CL changes the logic so that the standalone compiler always uses
> the textual pre-includes, and no longer depends on the dehydrated binary
> files. Thus, to make any kind of change to the dehydrated files (whether
> due to pre-include changes, or the encoding format itself), you just
> need skia_compile_processors enabled. The dependencies are now honestly
> communicated to GN, and we reach steady state after one build.
>
> The NOTE above is because GN/ninja cache the dependencies of each
> target, and will still think that the SkSLCompiler.obj linked into the
> standalone compiler depends on the dehydrated files, at least until one
> successful build, when it will realize that's no longer true.
>
> Bug: skia:10571
> Change-Id: I246360cec387b17d017805ed42ab6424329e32e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308760
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Id0f3f6e18474f7531b8531cfa481031c26b88d51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10571
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308802
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
NOTE: If you have any out directories with skia_compile_processors
enabled, you will likely need to run `gn clean <dir>`
Explanation: The sksl standalone compiler is used to convert the raw
(text) SkSL pre-includes into a "dehydrated" binary format. It also
(previously) depended on those files, as they were #included and used,
unless a special #define was changed. This created a dependency cycle
that we hid from GN (by lying about the outputs of the dehydrate step).
As a result, builds would never reach steady-state, because the compiler
would be rebuilt (due to the newer dehydrated files), and then the
dehydrated files would be rebuilt (due to the newer compiler).
This CL changes the logic so that the standalone compiler always uses
the textual pre-includes, and no longer depends on the dehydrated binary
files. Thus, to make any kind of change to the dehydrated files (whether
due to pre-include changes, or the encoding format itself), you just
need skia_compile_processors enabled. The dependencies are now honestly
communicated to GN, and we reach steady state after one build.
The NOTE above is because GN/ninja cache the dependencies of each
target, and will still think that the SkSLCompiler.obj linked into the
standalone compiler depends on the dehydrated files, at least until one
successful build, when it will realize that's no longer true.
Bug: skia:10571
Change-Id: I246360cec387b17d017805ed42ab6424329e32e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308760
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 943463f60e.
Reason for revert: Flutter
Original change's description:
> Reland "Switch GN defs on Mac and iOS to use frameworks, take 2."
>
> This is a reland of c5f8e7df81
>
> Original change's description:
> > Switch GN defs on Mac and iOS to use frameworks, take 2.
> >
> > GN will be removing support for frameworks in the libs variable, so
> > might as well get ahead of it.
> >
> > Change-Id: I990ffdb945c85a9868883d0cab1c2bdcdbdf545c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308189
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
> Change-Id: Ie93c4b6a5e82bd61738367c68c2a2bac7bdf23f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308199
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=mtklein@google.com,jvanverth@google.com,herb@google.com,senorblanco@google.com
Change-Id: Iee06d5e787643643b0f2b206a7cfa2643de25f8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308597
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I653716df5e93dc5c520309729712a78e750a2790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307696
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This is a reland of c5f8e7df81
Original change's description:
> Switch GN defs on Mac and iOS to use frameworks, take 2.
>
> GN will be removing support for frameworks in the libs variable, so
> might as well get ahead of it.
>
> Change-Id: I990ffdb945c85a9868883d0cab1c2bdcdbdf545c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308189
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ie93c4b6a5e82bd61738367c68c2a2bac7bdf23f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308199
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This is just a mechanical cut & paste.
When the atlasing is separate from the small path renderer both the
atlas manager and the path renderer need to share these objects.
This is pulled out of the omnibus CL:
https://skia-review.googlesource.com/c/skia/+/307776 (Split the small path renderer into record-time and flush-time pieces)
Change-Id: Ibae9d785fa8a3934fa81f9e98d7e1027d48dc5a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308276
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 07438b0cda.
Bug: skia:10369
Bug: skia:10371
This will allow Skia clients developing for Android 11+ to rely on
Android's NDK APIs for decoding, which will allow them to decode
without including their own decoding libraries (e.g. libjpeg-turbo).
Using these APIs also provides support for static HEIF images.
Run ImageGenSrc in kPlatform_Mode on Android to verify decoding
visually.
Add tests and a grayscale png.
Update some test bots running Android R to specify ndk_api so they will
run the new code.
Change-Id: I4ca07d832dbd6a9d8cff0faea975fd70da00718f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308185
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This reverts commit cfef980939.
Reason for revert: Breaking Google3 roll
Original change's description:
> Add an SkImageGenerator that uses NDK APIs
>
> Bug: skia:10369
> Bug: skia:10371
>
> This will allow Skia clients developing for Android 11+ to rely on
> Android's NDK APIs for decoding, which will allow them to decode
> without including their own decoding libraries (e.g. libjpeg-turbo).
> Using these APIs also provides support for static HEIF images.
>
> Run ImageGenSrc in kPlatform_Mode on Android to verify decoding
> visually.
>
> Add tests and a grayscale png.
>
> Update some test bots running Android R to specify ndk_api so they will
> run the new code.
>
> Change-Id: Ica782339b2414d472ede0b61729a127ce41892a5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305689
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
TBR=djsollen@google.com,mtklein@google.com,scroggo@google.com,brianosman@google.com,reed@google.com
Change-Id: Ifed506a76a0ff5903d101c1bf7330d319b8376a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10369
Bug: skia:10371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308180
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Bug: skia:10369
Bug: skia:10371
This will allow Skia clients developing for Android 11+ to rely on
Android's NDK APIs for decoding, which will allow them to decode
without including their own decoding libraries (e.g. libjpeg-turbo).
Using these APIs also provides support for static HEIF images.
Run ImageGenSrc in kPlatform_Mode on Android to verify decoding
visually.
Add tests and a grayscale png.
Update some test bots running Android R to specify ndk_api so they will
run the new code.
Change-Id: Ica782339b2414d472ede0b61729a127ce41892a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305689
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
It simplifies things to always build this way, to mimic how we're built
by clients, and to better approximate MSVC defaults. I'm not sure I
believe my old note about making stack traces worse on Linux.
Change-Id: I0554a58573074fc6ae030fa09e11976a718645b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307834
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a recent addition to GN that Dawn takes advantages of but which
Skia's GN toolchain didn't implement yet.
Bug:
Change-Id: I7a592bd4663db5c9726767bedf46c38d9c86ed2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307576
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Putting the entire body of the function into a header risks an ODR
violation.
Change-Id: I6d32df195049058f781defc2aace23a2bbd66150
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307559
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Gradient colorizers are now sampled via explicit coordinates instead of
by passing coordinate data in a color channel. This change caused the
GrTextureGradientColorizer to become a no-op/passthrough effect.
Change-Id: I5233c93914716cac186b0ea8f5a3698746a89742
Bug: skia:10548
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307298
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Prevents spurious diffs when rebuilding on Windows
Change-Id: Id5320e2ef492e7856fe10500ee8a3d19f6726219
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307196
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This speeds up compiler construction, because we no longer have to parse
and process a bunch of SkSL source code during startup.
Change-Id: I6d6bd9b5ce78b1661be691708ab84bf399c6df8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305717
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
The ClangTidy check `bugprone-unused-raii` has been enabled at
review.skia.org/306838; this check provides equivalent protection.
Change-Id: I9f3858bfd2bede107d509a5a206a08293d5f914c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306953
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Almost half the files in src/gpu/tessellate were beginning with
"GrTessellat*". This CL reorders the camel case words for more
efficient tab completion and better grouping of related files.
Bug: skia:10419
Change-Id: I3df0ddbb2367cdbd880807a8aef2dd88ec12f830
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306659
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The oss-fuzz build of Skia seems to have difficulty when it does too
many linker steps at a time. Ninja will generally not launch new build
steps if the load is too high, but the oss-fuzz builder machines are
slow enough that the load doesn't seem to rise fast enough to prevent
too many linkers from be started at a time.
By default this change does not request a linker pool at all and the
user must request one by setting the link_pool_depth. Negative values
disable the linker pool, zero sets the number to the number of cpus, and
positive values set the pool size. This should allow for some
experimentation while testing what pool size is appropriate for the fuzz
builders while not changing current default behavior.
Bug: oss-fuzz:23438,oss-fuzz:24345
Change-Id: Iba62adac3bea4d968441aa08e33918b5ae962c7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306646
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Use $shell prefix invoking python for cp.py.
Change-Id: Ic4b40337255a91fe6f9729eb58ecb6d47c559001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306334
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
No longer needed as GrSurface and GrRenderTarget are private.
Change-Id: I2ec653b2d9daa115233bb7eaa1f2b7f880772c0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305730
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
These missing items were discovered when attempting a refactor.
Change-Id: Ibf905dacba14ebf5d3174f11c557741c7ab7848f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306061
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This is a reland of b6d4ad92ad
Original change's description:
> Make GrRingBuffer more generic so it can be used over all backends
>
> * Removes the spinlock (should no longer be necessary)
> * Uses GrGpuBuffer and creation through GrResourceProvider
> instead of internal native creation
> * Changes the SubmitData to pass up all buffers used over a given submit
> so the backend can track that better
>
> Bug: skia:10530
> Change-Id: I0d3a686b950dd5cb5f720f827b573238386b9524
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305567
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:10530
Change-Id: If75ef583fbed65617cd5be56ee40c937e7325b21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305722
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
No real way around using -fsanitize-blacklist,
but we can change the rest.
Bug: 1101491
Change-Id: I3ec84bd2911b6cf6e77eac1c9d565a398bfcde77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305754
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This abstraction had one subclass. That subclass was used only as
an implementation detail of SkImage_Lazy. Move the functionality
into SkImage_Lazy.
Change-Id: Icd8754114dc33ae957e542b372086e8caa0408a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305724
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit b6d4ad92ad.
Reason for revert: Breaking the bots
Original change's description:
> Make GrRingBuffer more generic so it can be used over all backends
>
> * Removes the spinlock (should no longer be necessary)
> * Uses GrGpuBuffer and creation through GrResourceProvider
> instead of internal native creation
> * Changes the SubmitData to pass up all buffers used over a given submit
> so the backend can track that better
>
> Bug: skia:10530
> Change-Id: I0d3a686b950dd5cb5f720f827b573238386b9524
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305567
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=egdaniel@google.com,jvanverth@google.com
Change-Id: Ief7df521f66e85d9bfb85508e5a5f8223d7d6725
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10530
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305720
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Iaa0829d72d0da1469df2da23102ff0e3572b641b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305556
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This existed because GrTexture used to be public.
Change-Id: I5e507084ae12058a20481b517b9130b41c793d29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305521
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
* Removes the spinlock (should no longer be necessary)
* Uses GrGpuBuffer and creation through GrResourceProvider
instead of internal native creation
* Changes the SubmitData to pass up all buffers used over a given submit
so the backend can track that better
Bug: skia:10530
Change-Id: I0d3a686b950dd5cb5f720f827b573238386b9524
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305567
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:10419
Change-Id: Iffd139c2d489deb9d57fa860c20158ee398b7c11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305561
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: Ia6f93673de9b4cb76c4b0655c55b374aef362cfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305405
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
GrTAllocator implies relatively limited use cases, while GrTBlockLinkedList
helps clarify the underlying data structure (and its associated advantages
and disadvantages). I am not beholden to the name, so am happy to have
a discussion on alternatives like GrTLinkedList or GrTBlockList or
GrTBlockArray.
Change-Id: I5b10801d8593991d5e804c4074a81efb1dd110ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304396
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
I figure we can use this as an area for prototyping new/different
stroker ideas.
Currently the sample does line segments with butt caps. Miter joins
aren't correct, as it's not adding the inner loop geometry that
SkPathStroker does. On the sample slide, any red pixels are ones that
Skia filled but the toy stroker didn't.
Change-Id: Iea5eb320d88dd1dc5c60fbb2a997f56eec4f4f1f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303588
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
and related changes. This is another CL in the series that is replacing
GrContext with the GrDirectContext/GrRecordingContext pair.
Change-Id: Id0a3cfd5a5f92f7680d9c58f3a1753322311221c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302637
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
With this change if a backend Gr*Gpu wants to using staging buffers
they just add a generic GrStagingBufferManager member object. This
object can be used to get slices of upload buffers. Then they just need
to implement the virtual for taking ownership of buffers during submit.
We rely on our GrResourceCache to handle caching and reuse of these
buffers.
This change allows us to remove all other virtuals on GrGpu around
managing staging buffers.
Change-Id: I5db9a3c52133978ea89d6c0de440f434fbf91a51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300226
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
We now rely on GrTextureEffect and GrBicbicEffect
to determine if shader-based tiling is required.
GrTextureProducer is still responsible for noticing that
the proxy is approximate because GrTextureEffect doesn't
consider that in its basic Make() factory (as opposed to
MakeSubset()).
Change-Id: I8e1aeb9edbcfa73ea0bf80b5256ee1ca21fe9c81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301985
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 70474c1cb0.
Reason for revert: bot build failure
Original change's description:
> Remove custom SkSort algorithms.
>
> SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
> The difference is small on randomized inputs, but quite significant for
> semi-ordered inputs (forward/backward/repeated). There doesn't seem to
> to be any compelling advantage to SkTQSort.
>
> Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u
>
> (These performance numbers are from an optimized build my local machine;
> it's possible that we might see different results on the test bots.)
>
> Change-Id: Iaf19563041547eae7de2953be249129108f093b1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com
Change-Id: I1126dd4cda95716dac225ad32d5b0e5cf3f09421
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302447
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
The difference is small on randomized inputs, but quite significant for
semi-ordered inputs (forward/backward/repeated). There doesn't seem to
to be any compelling advantage to SkTQSort.
Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u
(These performance numbers are from an optimized build my local machine;
it's possible that we might see different results on the test bots.)
Change-Id: Iaf19563041547eae7de2953be249129108f093b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reduces our code size by reusing existing components to perform
the same blend, and generates a shader that should be conceptually
equivalent (although it gives the inliner a bit more work to do).
Change-Id: Ie2203f7613503476fa9d045aba58d9ef39f3ea26
Bug: skia:10457
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302264
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reduces our code size by reusing existing components to perform
the same blend, and generates a shader that should be conceptually
equivalent (although it gives the inliner a bit more work to do).
Change-Id: Ie81e8b82d9b9c441533760d4e9f7e149bc0d969d
Bug: skia:10457
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302262
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
ConstColorProcessor contained three separate InputModes with their own
unique behaviors, but every (non-test) call site simply hardcoded one of
the InputModes.
This change also allows the actual const-color processor to remove the
inputFP entirely; it is never sampled.
The GM slide has been split into three separate slides as well.
Change-Id: I2b77f4eab4d655f06e3704fb6fde8d4f8c70a075
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301987
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is part of a larger effort to force users to provide a context
when manipulating GPU images which may be shared, instead of having
images themselves retain powerful context pointers.
Chrome flag landed in Chrome CL 2292800
Bug: skia:10466
Change-Id: Ic530a2c5eb1f4399db899d243ea944760fdf2055
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300707
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The fuzzer detected a bug in our handling of null child processors.
Rather than attempt to further tweak a hand-rolled effect, it seemed
more productive to convert it into a full-fledged .fp file. This
provides a very high degree of confidence that the basics are done
properly, for a relatively low amount of effort.
Contrast calculation has also been optimized slightly. The original
shader calculated (1+c/1-c) separately for every pixel. This is now done
once, in Make(). Also, if contrast adjustment is set to zero, the
contrast block is fully omitted.
Change-Id: I2af4708536b249e03c3ebede9b10fc1125eadb7b
Bug: oss-fuzz:24039
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301942
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
I spent a little time working on adding the --dylib JIT
mode to Windows where we'd shell out to Clang to make a .dll,
but then I remembered this VTune JIT API.
That dylib approach is nice for working with a wide range
of tools (perf, Instruments, gdb, etc.), but when your only
need is Vtune, this API is actually the best option. You
get your profiler aware of your JIT'd code with way less
overhead than the shell-then-dlopen approach.
If we need to expand to more tools I'll go make the dylib
mode work, but I think this is good enough to make me happy
on Windows for now.
This should look really similar to
https://skia-review.googlesource.com/c/skia/+/255124.
Change-Id: I9e283cdf9bdfeb11c647a2315a7916dc68ef73c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301935
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
The .fp effect has support for passing values to a child processor.
Runtime effects do not support passing a color to a processor, which is
needed to properly implement `ArithmeticImageFilterImpl` without relying
on multiple `addColorFragmentProcesor` calls and/or `RunInSeries`.
Change-Id: I47446897f857ce849a8e734ab81ee7aec80734e7
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301657
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Maintains the old and new code-paths:
- if the shader was made with explicit filteroptions, use those
- if not, infer the filteroptions from the filterquality enum
(and the legacy heuristics of sniffing/snapping the ctm)
In either case, the bulk of the onProgram() is shared, driving off
the (possibly computed locally) filteroptions.
bench looks sort like we expect:
509.28 filteroptions_sampling_0_mipmap_0 8888
495.76 filteroptions_sampling_0_mipmap_1 8888
642.52 filteroptions_sampling_0_mipmap_2 8888
942.40 filteroptions_sampling_1_mipmap_0 8888
976.94 filteroptions_sampling_1_mipmap_1 8888
1686.34 filteroptions_sampling_1_mipmap_2 8888
Bug: skia:10344
Change-Id: I77a79f79f640986fdd6b14f163c1a03462c55dc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297561
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Not important, and the constructors for these six benchmarks were
allocating a total of 3 GB of RAM.
Change-Id: I03db4d21fe9755902e1b642eb2b6315f697b955e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301656
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Adds GrD3D12CommandSignature, needed to pass to ExecuteIndirect().
Change-Id: I24aa395d710414eba0464aa4e2cb0a87721bcb12
Bug: skia:10482
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301378
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This was previously implemented as a runtime effect in order to dogfood
runtime effects when they were new. However, runtime effects do not
support passing a color to a FP via `sample(fp, inputColor)`, which
is needed to properly implement SkPaintToGrPaint.
Change-Id: Ic826860ab06038f13633be677d79a9138d41db85
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301547
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I9fa9f8785f48e884cf296a638347003d1687e7c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301536
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:10416
Change-Id: I0ca7535a0e6507e6b2a9f4682788826972c5f3b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300296
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:10419
Change-Id: Ifd93b6cd8acffa78675b3e45134dfa52062b4f7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300102
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit c61e35dbc6.
Reason for revert: Breaking builds
Original change's description:
> Switch GN defs on Mac and iOS to use frameworks instead of libs.
>
> GN will be removing support for frameworks in the libs variable, so
> might as well get ahead of it.
>
> Change-Id: I67b118457721975ac2408308438d71172be66592
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300181
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,jvanverth@google.com
Change-Id: I7b81a92a67181e08ee57bcb184768794281cd37a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300228
Reviewed-by: Jim Van Verth <jvanverth@google.com>
GN will be removing support for frameworks in the libs variable, so
might as well get ahead of it.
Change-Id: I67b118457721975ac2408308438d71172be66592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300181
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
External clients will need access to these classes once GrContext
goes away.
This is a purely mechanical CL.
Bug: skia:10441
Change-Id: I7ffeb29d88bcc0f012412fba911e8362d046e24a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300206
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It now tracks all sample calls of a child (matrix, explicit coords,
pass through). There is now just one registerChild() call, and the
sampling pattern of that child is fully determined by the SampleUsage
parameter.
Change-Id: Iaadcd325fca64a59f24192aadd06923c66362181
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299875
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
- Replacement for in-memory JIT mmap,mprotect,munmap.
- dylib feature disabled (for now, but could be done
with LoadLibrary/GetProcAddress)
- Mostly share impl with __x86_64__, but with enter
and exit updated for the MS ABI.
I "rediscovered" along the way that r12 has the same low three
bits as rsp, and that means the assembler needs to handle it
specially in at least one place it's not today. No big deal;
we can easily avoid using r12. GP registers are all statically
allocated. Left a warning and a TODO.
Still need to investigate 17 GMs that are triggering asserts.
Change-Id: I0f543b0efab968e805e89dcf1f068eac1cafea38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298530
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This change relies on the Xfermode updates in the prior CL
(http://review.skia.org/299703) to render properly, and requires
slightly different blending behavior in the compose FP which
necessitated a new ComposeBehavior enum.
Eventually we would like to settle on a universal ComposeBehavior which
works well for all call sites, but that will be its own fairly
disruptive change. This work will be tracked at skia:10457.
Change-Id: I3cc0ea5e016fbef82bc63d653d60d0505efaa66f
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298821
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bootstraps tessellated stroking using GrStrokeGeometry mostly as
written. Strokes get decomposed into tessellation patches that
represent either a "cubic" (single stroked bezier curve with butt
caps) or a "join". The patches get drawn directly to the canvas
without any intermediate stencil steps. For the first revision, only
opaque, constant-color strokes are supported.
Bug: skia:10419
Change-Id: I601289189b93ebdf2f1efecd08628a6e0d9acb01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299142
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is somewhat of a departure from the original context refactoring
plan (i.e., keep GrLegacyDirectContext hidden and switch GrContext over
to be the GrDirectContext at some point). Having a GrDirectContext
earlier will allow us to change some important signatures earlier
(e.g., asDirectContext) and, hopefully, clarify some of the confusion
about the context class hierarchy.
Additionally, this will let us make onGpuSetup take a direct context -
clarifying its purpose vis a vis onDraw (which now takes a recording
context).
Change-Id: I8298a0649bc95843d20bee33ba7fe1d7e73bb839
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299768
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This was originally added to reduce the size of the large skp set by
reducing the number of fonts fully serialized. At the time all fonts
were fully serialized into all skps. Oddly enough this was actually a
blacklist of fonts which should never be fully serialized. The list was
easy to get out of date (it needed to be regenerated whenever the
container the Chromium html to skp conversion ran in was updated) and
unclear how to use well (the user would need to replay the skps in said
container to get mostly correct playback).
Since that time, it is now possible for the user to specify how to
serialize typefaces. In addition, further flexibility is now provided
though serialization and deserialization procs provided to the recorder
so that the user can have even greater control over individual
recordings, so if this is needed again there are cleaner ways to write
it without globals. Also, Cluster Telemetry doesn't really capture skps
this way anymore so this code isn't really being used.
In the future should such a mechanism be required, it would probably be
best to first create a base image of fonts to use as system fonts and
then set up the container which captures the skps to use exactly those
system fonts. Then all system fonts can avoid serialization and the font
collection and setup (or possibly just base container) can be shared for
playback.
Change-Id: I27412a8fd35b89af293b4151ea8cecc2b1bc7226
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299838
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Besides moving the existing coord-overrides and sample matrix merging
logic on to a shared visitor pattern, this updates the sample coord
reference detection to actually look for references to that built-in.
Previously, we only had this behavior in the CPP code generator. The
.h generator just did a string search for sk_TransformedCoords2D, and
runtime effects just looked at the main signature. Now, the .h generator
is more robust, and runtime effects that declare the main coords parameter
but never use it will not be marked as using the sample coords directly.
Change-Id: I802d610dbda512cf3823c58f349307b3926aa58f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299458
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
In 75626e4b1a "Regularize selection of fontmgr." a clever change was
made which allowed the skia_fontmgr_factory to be specified as a source
file to allow the user to specify which factory to use. Unfortunately
this implies that the Skia target which uses this source does not know
which other targets (like fontmgr targets) to depend on. A factory
target must generally depend on the target which provides the widget the
factory makes.
This change puts all the current factories into targets of their own so
that they can depend on whatever they need. The skia_fontmgr_factory is
now the name of a target which is the sole public member of the
:fontmgr_factory target. Users can now specify a particular fontmgr
target to build into Skia as the default instead of simply specifying a
source file.
The fontmgr_fontconfig target now also properly publicly depends on the
fontconfig target since it has a public header which includes
fontconfig.h.
Bug: b/160133836
Change-Id: I212d842b8e07c4e99ab53e32310642d18eeb7cb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299677
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit ca5b36c474.
Reason for revert: This may be blocking the Chrome roll
Original change's description:
> Add storage on the surface for its last render task
>
> Let's land this and see if it gets us back to baseline on the
> lastRenderTask regression from the bug. If it doesn't, we'll revert it
> since the extra complexity won't have been worth it.
>
> Bug: skia:10372
> Change-Id: I9d5ae93435b833d575afdc7f219dc8e7c453c92b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297836
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>
TBR=robertphillips@google.com,adlai@google.com
Change-Id: Id418d042d1123d946cd99b7b1ba438211cb628ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10372
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299763
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Let's land this and see if it gets us back to baseline on the
lastRenderTask regression from the bug. If it doesn't, we'll revert it
since the extra complexity won't have been worth it.
Bug: skia:10372
Change-Id: I9d5ae93435b833d575afdc7f219dc8e7c453c92b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
python 2.7 subprocess.check_output:
"Run command with arguments and return its output as a byte string."
python 3 ubprocess.check_output:
"By default, this function will return the data as encoded bytes."
Using a 'b' prefix seems to cover both cases.
Change-Id: Ie2d90bc93d0e98a723a262fae63fe538137812c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299382
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit 1caf3789f8.
Makes the image GMs detect an abandoned context just like the surface
GMs.
Bug: skia:10431
Change-Id: I56a3631a75e6b0383f96a73f461cfa314ee29afa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299379
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 7ac9b5fdb6.
Reason for revert: abandon context bots breaking
Original change's description:
> Add async rescale and read APIs to SkImage.
>
> These function the same as the already existing
> SkSurface APIs.
>
> Bug: skia:10431
>
> Change-Id: I4f1e842d8d4b72ee27bae5f8a85e499e130d420c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299281
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I351795274245fc9f553cd210d82178f497f22660
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10431
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
These function the same as the already existing
SkSurface APIs.
Bug: skia:10431
Change-Id: I4f1e842d8d4b72ee27bae5f8a85e499e130d420c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299281
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: Iadfa14965bbe11cfea556ade5d46e264f0ace61a
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298752
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Switch it to use std::string (not SkSL::String). Along these lines,
remove SkSL::String's operator SkString, and instead add an explicit
SkString constructor from std::string.
Other changes aren't strictly necessary, but I wanted to clean up some
of the other SkSL vs. Skia code barriers. VS (since 2015) has had
vsnprintf that conforms to the C99 standard, the only difference with
_vsnprintf is a different (nonstandard) return value for overflowing
calls. Remove the special-case (the only use of SKSL_BUILD_FOR_WIN).
Change-Id: I8826af10c8e78a8d935c601d00b8ae9ba0640041
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298816
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This removes the kMixed type of SkSL::SampleMatrix. All analysis of FP
sampling due to parent-child relationships is tracked in flags on
GrFragmentProcessor now.
The sample strategy is tracked as follows:
- An FP marks itself as using the local coordinate builtin directly (automatically done for .fp code based on reference to sk_TransformedCoords2D[0]).
- This state propagates up the parent towards the root, marking FPs as using coordinates indirectly. We stop the propagation when we hit a parent FP that explicitly samples the child because it becomes the source of the child's coordinates.
- If that parent references its local coordinates directly, that kicks off its own upwards propagation.
- Being sampled explicitly propagates down to all children, and effectively disables vertex-shader evaluation of transforms.
- A variable matrix automatically marks this flag as well, since it's essentially a shortcut to (matrix expression) * coords.
- The matrix type also propagates down, but right now that's only for whether or not there's perspective.
- This doesn't affect FS coord evaluation since each FP applies its action independently.
- But for VS-promoted transforms, the child's varying may inherit perspective (or other more general matrix types) from the parent and switch from a float2 to a float3.
- A SampleMatrix no longer tracks a base or owner, GrFragmentProcessor exposes its parent FP. An FP's sample matrix is always owned by its immediate parent.
- This means that you can have a hierarchy from root to leaf like: [uniform, none, none, uses local coords], and that leaf will have a SampleMatrix of kNone type. However, because of parent tracking, the coordinate generation can walk up to the root and detect the proper transform expression it needs to produce, and automatically de-duplicate across children.
Currently, all FP's that are explicitly sampled have a signature of (color, float2 coord). FP's that don't use local coords, or whose coords are promoted to a varying have a signature of (color).
- In this case, the shader builder either updates args.fLocalCoords to point to the varying directly, or adds a float2 local to the function body that includes the perspective divide.
GrFragmentProcessor automatically pretends it has an identity coord transform if the FP is marked as referencing the local coord builtin. This allows these FPs to still be processed as part of GrGLSLGeometryProcessor::collectTransforms, but removes the need for FP implementations to declare an identity GrCoordTransform.
- To test this theory, GrTextureEffect and GrSkSLFP no longer have coord transforms explicitly.
- Later CLs can trivially remove them from a lot of the other effects.
- The coord generation should not change because it detects in both cases that the coord transform matrices were identity.
GrGLSLGeometryProcessor's collectTransforms and emitTransformCode has been completely overhauled to recurse up an FP's parent pointers and collect the expressions that affect the result. It de-duplicates expressions between siblings, and is able to produce a single varying for the base local coord (either when there are no intervening transforms, or the root FP needs an explicit coordinate to start off with).
This also adds the fp_sample_chaining GM from Brian, with a few more configurations to fill out the cells.
Bug: skia:10396
Change-Id: I86acc0c34c9f29d6371b34370bee9a18c2acf1c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297868
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Surfaces to client whether GrContext has seen a GL_OUT_MEMORY,
VK_ERROR_OUT_OF_HOST_MEMORY, or VK_ERROR_OUT_OF_DEVICE_MEMORY error.
Bug: chromium:1093997
Change-Id: I8e9799a0f7d8a74df056629d7d1d07c0d0a0fe30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298216
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 9eb89bac85.
Reason for revert: Repeated Android trybot failures
Encountering ASAN failures of the form:
=================================================================
==10276==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0xc3d2c5c0 in thread T5
#0 0xf0e43b58 (/system/lib/libclang_rt.asan-arm-android.so+0xbeb58)
#1 0xb2157736 (/data/local/tmp/dm+0x2df4736)
#2 0xb0de3b3c (/data/local/tmp/dm+0x1a80b3c)
#3 0xb0e0d036 (/data/local/tmp/dm+0x1aaa036)
#4 0xb0e0983e (/data/local/tmp/dm+0x1aa683e)
#5 0xb0e093ba (/data/local/tmp/dm+0x1aa63ba)
#6 0xb0e0cf6a (/data/local/tmp/dm+0x1aa9f6a)
#7 0xb0e09ca8 (/data/local/tmp/dm+0x1aa6ca8)
#8 0xb0e09420 (/data/local/tmp/dm+0x1aa6420)
#9 0xb0e0cf6a (/data/local/tmp/dm+0x1aa9f6a)
#10 0xb0e0983e (/data/local/tmp/dm+0x1aa683e)
#11 0xb0e14416 (/data/local/tmp/dm+0x1ab1416)
#12 0xb0e259a6 (/data/local/tmp/dm+0x1ac29a6)
#13 0xb0dcd37e (/data/local/tmp/dm+0x1a6a37e)
#14 0xb0dcc004 (/data/local/tmp/dm+0x1a69004)
#15 0xb02030ec (/data/local/tmp/dm+0xea00ec)
#16 0xaff381a8 (/data/local/tmp/dm+0xbd51a8)
#17 0xaff1eade (/data/local/tmp/dm+0xbbbade)
#18 0xaff255f4 (/data/local/tmp/dm+0xbc25f4)
#19 0xb0bea1e4 (/data/local/tmp/dm+0x18871e4)
#20 0xb0a46c30 (/data/local/tmp/dm+0x16e3c30)
#21 0xb0a45c9e (/data/local/tmp/dm+0x16e2c9e)
#22 0xb0a467b0 (/data/local/tmp/dm+0x16e37b0)
#23 0xf0e2cf8c (/system/lib/libclang_rt.asan-arm-android.so+0xa7f8c)
#24 0xf0c6f502 (/system/lib/libc.so+0x63502)
#25 0xf0c29f26 (/system/lib/libc.so+0x1df26)
Address 0xc3d2c5c0 is a wild pointer.
SUMMARY: AddressSanitizer: bad-free (/system/lib/libclang_rt.asan-arm-android.so+0xbeb58)
Thread T5 created by T0 here:
#0 0xf0e2cdc8 (/system/lib/libclang_rt.asan-arm-android.so+0xa7dc8)
#1 0xb0a4651a (/data/local/tmp/dm+0x16e351a)
==10276==ABORTING
Caught signal 6 [Aborted] (173MB RAM, peak 180MB), was running:
unit test Codec_PngRoundTrip
unit test AAClip
unit test Codec_Dimensions
unit test Codec_raw
unit test crbug_ossfuzz_21688_interfaceblock
unit test crbug_ossfuzz_21688_interfaceblock
Caught signal 6 [Aborted] (173MB RAM, peak 180MB), was running:
unit test Codec_PngRoundTrip
unit test AAClip
unit test Codec_Dimensions
unit test Codec_raw
unit test crbug_ossfuzz_21688_interfaceblock
Likely culprit:
unit test crbug_ossfuzz_21688_interfaceblock
+ >/data/local/tmp/rc
+ echo 1
Original change's description:
> Enable _LIBCPP_DEBUG in Clang for non-Xcode-based debug builds.
>
> Unlike _GLIBCXX_DEBUG, this is meant to not break the ABI.
> The libc++ bundled with Xcode does not contain debug symbols so we need
> to disable these checks on Mac/iOS.
>
> Change-Id: Ie4f18e247db9c405b2ce45f388c41dcac8104815
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297874
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,bsalomon@google.com,johnstiles@google.com
Change-Id: I3f717de26428abf9cb26f983b1e82379924419c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297840
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Unlike _GLIBCXX_DEBUG, this is meant to not break the ABI.
The libc++ bundled with Xcode does not contain debug symbols so we need
to disable these checks on Mac/iOS.
Change-Id: Ie4f18e247db9c405b2ce45f388c41dcac8104815
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297874
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Some users of Skia want to build these with -I instead of -isystem, and
until now we've piggybacked it on werror, but it's still kind of
annoying to see warnings even if they're not fatal.
Change-Id: I5a349b2571adc2f94c75dc17317666ddc2dec373
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297788
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
If skia_use_fonthost_mac is set, use SkFontMgr_mac_ct_factory.cpp on
both macOS and iOS. Previously, this was only used on macOS, causing iOS
Flutter builds to default to SkFontMgr_empty_factory.cpp on that
platform.
Patch that introduced the Flutter iOS issue:
https://skia-review.googlesource.com/c/skia/+/295437
Change-Id: If2f1e7db47a55245de6c2658ad564e79134d3e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297194
Commit-Queue: Chris Bracken <cbracken@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Plus some minor cleanup and asserts.
Bug: oss-fuzz:23395
Change-Id: I667bee2d7f21864defe2fd97df9eb4e99d69d9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296451
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Change-Id: I5c1e6d8fd52ecfe628a78569b4665a64e1499fa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296938
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This tests the case where the stroke has butt caps and its width
significantly larger than the path itself. There seems to be some
uncertainty over what should actually be drawn in some of these cases,
as evidenced by the variable results from different path renderers
here.
Change-Id: I5b62ec446bfbba73d09ddb4eac710e338bedfc6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296114
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
We also fix getReadSwizzle with this change.
Change-Id: I1989d8347dc97d7a4c75aa9094a0146419c6d8fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295819
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This table is really hot during drawing and we saw a regression when
it was introduced. This change provides wins locally but I don't have
the regressed hardware handy.
Additionally, we change from SkGoodHash to the MixCheap function used by
some other small tables in the library.
Bug: skia:10372
Change-Id: Ic2dfbf41649515245e82cbcc9765cb29270eb5cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295878
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is a reland of a25422faa4
Original change's description:
> Fetch clang-format automatically when compiling .fp files.
>
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
>
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Ib397716771f742f192ebd6ed7ec0a9915b2400c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295956
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
CCPR stroking is not enabled by default and will eventually be
removed. This CL is a step toward migrating it to an MSAA version.
Change-Id: I565bea1c91c51bcd1ea3766aee6e4702adf3b09e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295608
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This will also expose the Vulkan precompilation path to immutable samplers.
Change-Id: Ida31bd70455299fbcc8f4d728aa15179f7685311
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295799
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit a25422faa4.
Reason for revert: breaks Windows build
Original change's description:
> Fetch clang-format automatically when compiling .fp files.
>
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
>
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=mtklein@google.com,johnstiles@google.com
Change-Id: If6412e74a16aa515c223d5d4f326780c8a69766f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295832
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.
This is similar to what Chromium currently does in gcc_toolchain.gni.
However, we cannot always just use 'rm' because of the build for Android
on Windows, so this introduces 'rm.py' which is just like 'cp.py' but
without the copy part.
Bug: skia:10363
Change-Id: Icc0c3d18dab1e48ccfec47386662c7b4d2dc8811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295569
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
On a freshly fetched repo, setting `skia_compile_processors = true` will
fail to compile because clang-format is missing from the bin directory.
This CL automatically runs fetch-clang-format for you when clang-format
is absent.
Change-Id: Ieeb359176072e92ca235316c820310333732f608
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Id7c51504450c1c7c9421eba3838bd6bc3440ca4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295437
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
After removing all unused API from SkReader32, it only had a handful
of functions, and it was (rightly) only used by SkReadBuffer. Remove
the temptation to use it by just folding it into SkReadBuffer.
SkWriter32 had some unnecessary functions as well (only used in unit
tests), so those are gone. There is still a strange relationship:
SkWriteBuffer is just an interface - SkReadBuffer is actually the
complement of SkBinaryWriteBuffer/SkWriter32. Those two classes produce
data in the exact same format, but with slightly different interfaces.
(The choice about which one is used is mostly about high-level
serialization vs. low-level helpers).
Change-Id: I1e823755febecd2e053ea732b21295d8f4d9d832
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295557
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 3b035e0417.
Reason for revert: Build-Win-Clang-arm64-Release-Android runs on
Windows and uses llvm-ar.
Original change's description:
> Delete .a file before writing static library.
>
> The ar utility only adds symbols. As a result removed symbols are
> sometimes still present in later builds, leading to great confusion.
> Delete the .a file before recreating it with ar.
>
> This is similar to what Chromium currently does in gcc_toolchain.gni.
>
> Bug: skia:10363
> Change-Id: I133deb6da570ca38a539b4f0bb486b61d6a664bf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295217
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=mtklein@google.com,bungeman@google.com
Change-Id: I02ba93ce26eedb2b2362e96d2ebfcacbfb8e0902
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10363
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295445
Reviewed-by: Ben Wagner <bungeman@google.com>
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.
This is similar to what Chromium currently does in gcc_toolchain.gni.
Bug: skia:10363
Change-Id: I133deb6da570ca38a539b4f0bb486b61d6a664bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295217
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This CL adds a new descriptor heap manager that handles creation of
descriptor tables, or ranges of shader-visible descriptors. These
are used to set the descriptors that match the setup of the root
signature. Data from non-shader-visible descriptors are copied into
these tables, and then they are bound to the command list.
Change-Id: Ia9fc24cae602244525a196025c044df3c2435d9f
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Fits a cubic to an arc on the unit circle using the following
constraints:
1) The endpoints and tangent directions at the endpoints must match
the arc.
2) The cubic must be symmetric (length(p1 - p0) == length(p3 - p2)).
3) The height of the cubic must match the height of the arc.
Using the above constraints, we arrive at the following formula for the
control length (c) (i.e., lengths of (p1 - p0) and (p3 - p2)):
d = x0*x1 + y0*y1
c = (sqrt(1 + d) * kM + kA) * rsqrt(1 - d)
(Where x0,y0,x1,y1 are the endpoints, kM = -4/3, and kA = 4/3 * sqrt(2).)
The sample also comes with a root finder that finds the max error value
of the curve, which ends up serving as a semi-formal proof that:
1) Max error always occurs at T=0.21132486540519, regardless of
endpoints.
2) Error is reduced by exactly 64x each time we halve the arc angle
Change-Id: I29ad60dda06743d79f71275c38ffdd97261159ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295303
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Its effect is small and we want to rely on SkReadBuffer being available.
Size changes:
- canvaskit uncompressed: 6,864,481 --> 6,864,481 ( no change )
- canvaskit compressed: 2,667,117 --> 2,667,117 ( no change )
- pathkit uncompressed: 329,187 --> 330,679 (+ 1.5K, +0.5%)
- pathkit compressed: 134,158 --> 134,672 (+ 0.5K, +0.4%)
- flutter : 1,302,108 --> 1,322,568 (+20.0K, +1.6%)
The Flutter change is the biggest mystery, as bloaty only pegs
SkReadBuffer as 3.9K. The rest must come from other files including
SkReadBuffer.h not being able to see and inline away SkReadBuffer
routines? Feels like SK_DISABLE_EFFECT_DESERIALIZATION isn't trimming
enough?
PS 4-6 have an idea to push SK_DISABLE_EFFECT_DESERIALIZATION further.
Change-Id: Ifda3ccb82dd0636cfed6bb826fb185a7bca2cbe0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295061
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This FP was unused and not referenced anywhere in the codebase.
Change-Id: I27f963d7c26382101b585f356a75d84cef5ab237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295080
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
With prior changes, it became "clear" that GrClearOp and
GrClearStencilClipOp behaved very similarly, except that the stencil
op did not have any onCombine logic.
This just combines them in to a single clear op that will call the
render pass's clear and stencil clear functions as needed. I also
implemented combine logic to apply color and stencil clears in a single
op if the scissor state was compatible (although there's no render pass
API to combine the two clears into a single GPU function).
Change-Id: I8aa749fe64cc487d187854fd0acf6b03b86f1356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290822
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
There can be only one SkFontMgr::Factory, so each should go in its own
translation unit. In addition, the name SkFontHost_mac is now rather out
of date and should now be SkFontMgr_mac_ct. Since the additional burden
of additional build changes after the first is minimal, also split out
SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
which are replacing it. Once references to it are removed from all
builds it can be removed.
This is intended to be a reorganization without much code change. Most
changes are simple renaming of functions which are now shared between
translation units. However, there are a few behavior changes here.
* Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
* SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
* SkFontMgr_New_CoreText takes a CTFontCollectionRef.
Change-Id: Iac548f9fd920c426ea5c6dcdefe8da0a9b89ec90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294704
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294714
Reviewed-by: Ben Wagner <bungeman@google.com>
This reverts commit 2c628340f4.
Reason for revert: ios-simulator chrome bot:
FAILED: obj/skia/x64/skia_unittests
TOOL_VERSION=1591394828 ../../build/toolchain/mac/linker_driver.py -Wcrl,strippath,/opt/s/w/ir/cache/xcode_ios_11e146.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip ../../third_party/llvm-build/Release+Asserts/bin/clang++ -B /opt/s/w/ir/cache/xcode_ios_11e146.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker obj/skia/skia_unittests.xcent -Wl,-fatal_warnings -arch x86_64 -Werror -nostdlib++ -isysroot sdk/xcode_links/iPhoneSimulator13.4.sdk -mios-simulator-version-min=12.0 -Wl,-ObjC -o "obj/skia/x64/skia_unittests" -Wl,-filelist,"obj/skia/x64/skia_unittests.rsp" -framework UIKit -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework UIKit -framework Security
Undefined symbols for architecture x86_64:
"SkCTFontGetSmoothBehavior()", referenced from:
SkTypeface_Mac::onFilterRec(SkScalerContextRec*) const in libskia.a(SkFontHost_mac.o)
SkScalerContext_Mac::generateImage(SkGlyph const&) in libskia.a(SkFontHost_mac.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Original change's description:
> Split out coretext fontmgr factory.
>
> There can be only one SkFontMgr::Factory, so each should go in its own
> translation unit. In addition, the name SkFontHost_mac is now rather out
> of date and should now be SkFontMgr_mac_ct. Since the additional burden
> of additional build changes after the first is minimal, also split out
> SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
> SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
> which are replacing it. Once references to it are removed from all
> builds it can be removed.
>
> This is intended to be a reorganization without much code change. Most
> changes are simple renaming of functions which are now shared between
> translation units. However, there are a few behavior changes here.
> * Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
> * SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
> * SkFontMgr_New_CoreText takes a CTFontCollectionRef.
>
> Change-Id: I897f69f2f5ea06819f5daa964c09cdd36490af85
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294704TBR=mtklein@google.com,bungeman@google.com
Change-Id: I5abeb7598c7f533477b4a4af5b568f7cbe6e8644
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294734
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
There can be only one SkFontMgr::Factory, so each should go in its own
translation unit. In addition, the name SkFontHost_mac is now rather out
of date and should now be SkFontMgr_mac_ct. Since the additional burden
of additional build changes after the first is minimal, also split out
SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
which are replacing it. Once references to it are removed from all
builds it can be removed.
This is intended to be a reorganization without much code change. Most
changes are simple renaming of functions which are now shared between
translation units. However, there are a few behavior changes here.
* Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
* SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
* SkFontMgr_New_CoreText takes a CTFontCollectionRef.
Change-Id: I897f69f2f5ea06819f5daa964c09cdd36490af85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294704
Change-Id: I364365455cc3580f38ddd189f00050ea9e2238a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294565
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This reverts commit 5c14d63297.
Reason for revert: chromium 'analyze' doesn't do a good job
Original change's description:
> Split out coretext fontmgr factory.
>
> There can be only one SkFontMgr::Factory, so each should go in its own
> translation unit. In addition, the name SkFontHost_mac is now rather out
> of date and should now be SkFontMgr_mac_ct. Since the additional burden
> of additional build changes after the first is minimal, also split out
> SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
> SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
> which are replacing it. Once references to it are removed from all
> builds it can be removed.
>
> This is intended to be a reorganization without much code change. Most
> changes are simple renaming of functions which are now shared between
> translation units. However, there are a few behavior changes here.
> * Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
> * SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
> * SkFontMgr_New_CoreText takes a CTFontCollectionRef.
>
> Change-Id: Iaf58a0371667f266ada20c918941fab6bc27d9df
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=mtklein@google.com,bungeman@google.com
Change-Id: I469084efbfc71bba60e5fbfb4eb7152d57324d0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294703
Reviewed-by: Ben Wagner <bungeman@google.com>
There can be only one SkFontMgr::Factory, so each should go in its own
translation unit. In addition, the name SkFontHost_mac is now rather out
of date and should now be SkFontMgr_mac_ct. Since the additional burden
of additional build changes after the first is minimal, also split out
SkTypeface_mac_ct and SkScalerContext_mac_ct. The original
SkFontHost_mac.cpp is kept as a shell which #includes the cpp files
which are replacing it. Once references to it are removed from all
builds it can be removed.
This is intended to be a reorganization without much code change. Most
changes are simple renaming of functions which are now shared between
translation units. However, there are a few behavior changes here.
* Drop SkTypefaceCache global for SkTypeface_Mac 'local' global.
* SkCTFontCTWidthForCSSWidth returns CGFloat instead of 'int'.
* SkFontMgr_New_CoreText takes a CTFontCollectionRef.
Change-Id: Iaf58a0371667f266ada20c918941fab6bc27d9df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294456
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
My experience porting the old opts over to the current SKX opts setup
was so bad that I don't want to try any more, and think it's probably
safer to port the SKX code to the old setup.
Need to hook up dependents (Chromium and Google3 I think) before we can
move the actual SXK opts code over.
Change-Id: Ibb8bc4a083cb104cd39f27cbfbc16e9eedd9bd46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294495
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
We are updating FPs to receive their input via a child FP where
possible, instead of relying on the input color.
This CL also adds a GM test for SwizzleOutput, since this did not appear
to be covered by existing unit tests.
Change-Id: I3d8176395bb42eab7ff471c9137597402b5b3a69
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293884
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Move SkFontHost_mac.cpp into an 'optional' like the other fontmgr build
rules. This allows building with other fontmgrs on Mac and makes the lib
dependencies explicit. In the future this helps with splitting the out
the default factory.
Change-Id: Iecef9e428acb69f89b54afa00b4e779f5858c61a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294076
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 08a39c2b5f.
Reason for revert: Flutter roll?
Original change's description:
> apply SkOpts_skx approach to SkOpts_hsw
>
> Very slightly different build flags, switching from -march=haswell to
> -mavx2 -mfma -mf16c, but there are no diffs.
>
> Left some TODOs for the next ones, but _hsw being so common I figured
> I'd do this one stand alone and make sure it shakes down before doing
> the rest.
>
> clang-cl (but not clang) barfs when we've got a lambda using an AVX
> intrinsic inside a templated static helper function. Luckily they're
> all non-type template parameters, so we can just pass them as normal
> arguments, and it'll optimize the same as the templated code anyway.
>
> This was weird, but since we're covering almost all the SkFoo_opts.h
> headers with HSW here, I don't anticipate this being a problem in the
> future. (And I'm sure I'll never look back on this statement as naive.)
>
> Change-Id: I2f84db356cafa5e158bcc3724fb1c3f58aca7f1e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293599
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,herb@google.com,reed@google.com
Change-Id: If3a75158d6e017f180d9e38d9ba296a0d72e1384
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294281
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 4272d071d9.
Reason for revert: Flutter roll?
Original change's description:
> finish new-style opts
>
> Nothing super interesting.
>
> SkOpts_crc32.cpp is worth looking at
> as the only non-x86 code.
>
> I marked a few places I think we can
> trim to save code size as follow ups.
>
> Change-Id: Ifdc8f4d1495ff56df5d2cdde39f7e9a6ac2b1277
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294019
> Auto-Submit: Mike Klein <mtklein@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
TBR=mtklein@google.com,herb@google.com
Change-Id: Idbb914788489bdc5941f7fed23bf26d35d90dca4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294280
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I can find no references to SkAtlasTextTarget in AOSP or in Chromium.
With google3 CL/314226466 there are no more uses in Google3.
Change-Id: I60b5f06fc17c0e4f8d008886c96645475e3d48e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293839
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Nothing super interesting.
SkOpts_crc32.cpp is worth looking at
as the only non-x86 code.
I marked a few places I think we can
trim to save code size as follow ups.
Change-Id: Ifdc8f4d1495ff56df5d2cdde39f7e9a6ac2b1277
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294019
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Very slightly different build flags, switching from -march=haswell to
-mavx2 -mfma -mf16c, but there are no diffs.
Left some TODOs for the next ones, but _hsw being so common I figured
I'd do this one stand alone and make sure it shakes down before doing
the rest.
clang-cl (but not clang) barfs when we've got a lambda using an AVX
intrinsic inside a templated static helper function. Luckily they're
all non-type template parameters, so we can just pass them as normal
arguments, and it'll optimize the same as the templated code anyway.
This was weird, but since we're covering almost all the SkFoo_opts.h
headers with HSW here, I don't anticipate this being a problem in the
future. (And I'm sure I'll never look back on this statement as naive.)
Change-Id: I2f84db356cafa5e158bcc3724fb1c3f58aca7f1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293599
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Enable shaper and paragraph tests to run on Android builds.
Change-Id: Ib1685653ac4432a04998aed56dc76b9020253e75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293244
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: Ifb47c6be05bffad4a42030f4375dcbe0fe313ae0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293656
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I was hoping this might fix the issues I'm seeing in the dependent CL.
It doesn't, but it's probably worth rolling every few months anyway.
Change-Id: I6d748d9e1a5bf908df78e989a624f2dccb1bd189
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293604
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This makes it easier to work with SkSL files when using an IDE.
Change-Id: I30665478a9cde63b4c9ba7e5a9948e9647f7ef81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293571
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:10178
These functions can be performed generically using SkRasterPipeline
or skcms. Further, the reason we used a function pointer anyway was
so that we could call the same function on each row separately. But
libwebp's API doesn't let us do a single row at a time anyway.
Simplify this method by using readPixels when necessary and
skipping conversion entirely when possible.
Add support for encoding from unpremul 4444. It is simpler to support
it, and it's not obvious why we didn't support it before.
Keep the behavior of not supporting A8, and apply the same to the
other alpha-only formats. Note that we could support encoding such an
image to alpha, r=0, g=0, b=0, but I'd rather leave adding that
feature to a separate change, which enables it for all encoders (and
accounts for the internal use of PNGs as a round-trip for
kAlpha_8_SkColorType).
Add GMs to test the newly supported SkColorTypes.
Change-Id: I4d86c5621792fb6dc3cb68b736a1eb35d577e3a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292962
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is an Android request for our public headers,
much like warning about unused parameters. See bug.
In general I've made two kinds of source changes:
1) more commonly, explicitly cast to the type which
is being implicitly cast to at head;
2) less commonly, flip signedness of a value we're
storing to match how it's used more smoothly.
Much of this is self inflicted inconsistent use of size_t, unsigned,
int, int32_t, uint32_t, etc. SkTArray is particularly tricky because
of its std::vector half-compatibility. E.g. resize() takes size_t,
but operator[] takes int. ¯\_(ツ)_/¯
Bug: skia:9847
Change-Id: I64626a529e1662b3d3020bc03d477fc641eda544
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293436
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
* Adds a base class for the ring buffer (to be used by Metal as well),
which tracks the current available space. APIs will need to
implement creation of the buffer in the subclass.
* The API implementation will need to store SubmitData on command buffer
submit, and then pass it to finishSubmit when the command buffer
finishes.
Change-Id: I4cc5e4a72d259ee9d15dac0e964819d4562da3d7
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291936
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Prelude to adding situational optimizations
Change-Id: Ie7994a87380ba6135398c9a1d4b26cea6bf32fa8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292972
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>