Added changes for public.bzl
This is a reland of commit 4a375fe213
Original change's description:
> Move SkSubRun to src/text
>
> Change-Id: I5c1040b8236dc792de20495a3fea3c0be6e31c20
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549847
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I86e342a416a3c97bf972c496b93b37e35cd09c19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550496
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Includes a unit test to generate the exact failing scenario, and also
fixes the case where inputFP was nullptr to begin with (and we would
have tried to call nullptr->clone().
Change-Id: I5a03730d1217d9b1747e5ad2018100bc1c5f9e50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550714
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 9be648ad64.
Reason for revert: breaking G3 roll
Original change's description:
> set up GL sample app to build through Bazel Mac toolchain
>
> Suggested review order.
> 1) tools/sk_app/* and src/gpu/ganesh/*
> sets up the actual target to be built by the toolchain
> 2) toolchain/* and .bazelrc
> changes to the mac hermetic toolchain, including support for framework dependencies, objc compilation, and dynamic lib dependency resolution
>
> Change-Id: Ic8209b97a0d8448f984d43a579e600ba4e9118e1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549897
> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I5414b94f2c6175ea8c7dbc6cd72c7dd8d1b47892
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551236
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Also rename existing transfer buffer alignment cap for surface transfers to distinguish from new one for buffer to buffer transfers.
Bug: skia:13278
Bug: skia:12720
Change-Id: Idc4116c72fc2852a01d40feec6584d2bde9eae82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550517
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
These need to be above any helper functions.
Change-Id: I6ed580b5be8822d720a9a649324699ee227578bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550709
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Previously, glue-code helpers only allowed appending into `main` and
there was no mechanism to insert code elsewhere. Now, glue-code emitter
functions take two strings, `preamble` and `mainBody`, and can write
into either one as desired. When generation is complete, `preamble` will
be inserted directly above `mainBody`.
This will allow us to insert standalone functions, global variables,
prototypes, etc. into the finished shader code.
Change-Id: I17b545cd326605ddf032f6dadd6164bb9c9b2c69
Bug: skia:13443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550705
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Adds a parameter to SDFTControl that forces all glyphs to fail as SDF
or Direct, and sets it in the Graphite Device constructor.
Bug: skia:13118
Change-Id: I212e35e992bb14925ec66fca610bb0825ff467b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550618
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
According to https://en.cppreference.com/w/cpp/container/span/span (2),
it is undefined behavior if [first, first + count) is not a valid
range, so it is standards-conforming to assert on this span.
This caught one case in GlyphRun where we were creating an invalid
span (which was apparently harmless in practice).
Change-Id: Ia0661b3bd13c2c5773492960eea11b1a294072d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550499
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Suggested review order.
1) tools/sk_app/* and src/gpu/ganesh/*
sets up the actual target to be built by the toolchain
2) toolchain/* and .bazelrc
changes to the mac hermetic toolchain, including support for framework dependencies, objc compilation, and dynamic lib dependency resolution
Change-Id: Ic8209b97a0d8448f984d43a579e600ba4e9118e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549897
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
We can now fully round-trip pointers through a PaintParamsKey safely.
Change-Id: I1a2133b39d895996f6c94211a0c5741ad0933398
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550703
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This undoes http://review.skia.org/550018, and also eliminates the
pointer-related additions to Stack in http://review.skia.org/550179.
When this was originally added, the plan was that pointers would not be
represented in the data payload at all, so we needed a mechanism to
track whether pointers were needed for each snippet type. This is now
handled by the existence of the kPointerIndex data payload field--
you'll assert on field-type mismatch/missing field if you skip the
pointer.
Change-Id: Ie868526d8d9da47819ea08e16aab1a5566f9cff8
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550700
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Dawn headers and symbols for WASM are provided by emscripten and a
direct dependency on Dawn native leads to conflicts in those builds.
Fixed the ganesh/dawn Bazel rules to only depend on Dawn on non-wasm
builds.
Bug: skia:13427
Change-Id: Ie1fa0b2c1a6486b4db3a9adb2366645c9c8c5e7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550257
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
It has served use well, but its time to let it enjoy its life in
retirement.
Change-Id: I47213a7a74a890aa0b04e906fb236c7cc4aabb61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550621
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
* Skia GN can now build the Dawn backend without depending on Dawn
native, provided that webgpu_cpp.h/webgpu_cpp.cpp is provided by
emscripten.
* Split gpu.js into webgl.js and webgpu.js. None of the CanvasKit API
functions are wired up to WebGPU yet so it will use the CPU renderer.
* Added new macros and GN args to distinguish between WebGPU and WebGL
builds in CanvasKit, instead of relying on Skia GN args.
* Renamed CANVASKIT_NO_ALIAS_FONT macro to CK_NO_ALIAS_FONT to match
style.
Bug: skia:12512
Change-Id: Ifc4191da046bd7af73492cfba6e3ca530590d722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548603
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Previously we were overwriting the renderpassXferBarriers flag on
ProgramInfo to set it to kNone. This flag is meant to say whether or not
the entire render pass uses barriers or not. This is needed in Vulkan
because all pipelines in a render pass that has an input attachment
must bind the input attachment regardless if it is used or not. So the
pipeline must be created with a layout for an input attachment
descriptor set.
This change just removes to performance optimization to only use the
barrier on the stencil and not fill draw. This use case shouldn't
come up too often and also shouldn't be a big perf hit regardless.
The way GrAppliedClip is created/used it is hard for us to create
multiple different Pipeline objects: one for stencil and one for the
fill.
Bug: skia:13402
Change-Id: I15ce74b4d41b90d3dd4169a1f4fb77ed87c8b26d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549898
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This was added during a refactor to detect behavior regressions and
in anticipation of removing kStream_GrAccessPattern. That removal
wasn't completed because of skbug.com/11297. Given the advent of
Graphite it likely will never be fixed.
The assert is only detecting whether our behavior conforms to what
is effectively a hint and is making it harder to modify
GrGpuBuffer. It's also a bit of heavy hammer in that for some backends the writes to the buffer are effectively gpu->gpu and so
don't violate the spirit of the hint.
Bug: skia:12720
Change-Id: I27e8d89b63df54a667879f2f7e4452e3c37da264
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550620
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The API for keys containing colors was unfinished--there was a way to
add a single color to a key, but there were was no support in
BlockReader to read the color back out, and only fCount == 1 was
supported.
This CL fills in these gaps, and adds a test verifying that SkColor4f
data can round-trip through a PaintParamsKey successfully.
Change-Id: I9586fbd59e1a091970f44751322c03ad493888f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550698
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:13118
Change-Id: I37fa38012ba752026c03266466a713221bd746be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550616
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Using a switch lets the compiler flag an error if we add a
DataPayloadType and forget to update this function.
Despite initial appearances it's quite efficient when compiled:
https://godbolt.org/z/vqoaddGn4
Change-Id: I5f650afdf81205942966fb318643ff4af5a29252
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550501
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Will be used in SkMesh buffer update API and likely for unit testing of changes related to Issue 13427.
Bug: skia:13427
Bug: skia:12720
Change-Id: I487ee512d4b8bb61c533c7047bdbffcde9779885
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549570
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This will give us stable data in the payload, so that the key itself
will match with operator== regardless of the pointer value. We can
extract pointers from the pointer-data block efficiently, even in the
case of multiple/nested children with embedded pointers, by using the
pointer-index value to fetch from the pointer-span.
Change-Id: Ic3b5f823a631257fd50ec6989b7c0fd1c70e6178
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550497
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This was originally done with the intent of adding a third field
(number of pointers in the data) but we may be able to get away with
keeping the two-byte Header after all. Having the data in an actual
struct does make refactoring a lot easier, at any rate.
Change-Id: I25a4e46b45f3f9c93eb16bc4d51b6624d7e319ba
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550183
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:12701
Change-Id: I53bbabb2aba44e3bfc215df81dae1ae59d149263
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544319
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
[[maybe_unused]] is built in to C++17.
Change-Id: I5e49d0801878fd9fbca62ab28080aa856e33ca79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550500
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The only remaining test was the ES3 matrix constructor test (using
non-square matrices). Ideally, we'd run this on GPU, but it fails on
a huge number of devices.
With this change, we no longer have tests that break the version rules
for CPU (ie, disable ES2 restrictions because we know a test uses a
subset of features known to work). This will simplify version logic.
Bug: skia:11209
Change-Id: Ida07ec943d81539c327bd1125da22bad68df26f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550498
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
And a little bit of unit tests and benchmarking...
Change-Id: I56252846c2c00f35e70472e5d8272717d6ec4b25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545897
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Spent 10 minutes searching for this macro because I expected it to have
"pack" in the name, like __attribute__((packed)) or #pragma pack.
Adding a little lifeline for future me.
Change-Id: I8c4f8cbd4febdea6bcd5698d267a2673246295e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550184
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:13118
Change-Id: I49ce429913b9ac06d30250401434e68ef4e5da18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550180
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>