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>
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>
The BlockReader does not yet support pointer-data; that will be
implemented in a followup CL.
Change-Id: I01cd3712241071095fdb9cde741b8566d2761926
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550179
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This adds mostly-functional compute shader output to SkSL. This does not
add overall compute shader support to Skia; it still needs to be
integrated into the Skia pipeline before it is possible to actually use
compute shaders in practice.
Change-Id: Ic5c69863704f141d16bb191224a817e44f4a8565
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539060
Reviewed-by: Arman Uguray <armansito@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: angleproject:7434
Change-Id: I77dcdcbe288f531698abc8ff0fd89b421066935d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550217
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: I33121076bac3ceca19c81ff9fb47e4b024a14230
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549838
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Create a new Geometry class that encapsulates Shapes, but can later encapsulate Vertices & text subruns. DrawGeometry has been renamed to DrawParams for clarity and now stores a Geometry object instead of a Shape.
Bug: skia:13352
Change-Id: I42781b3eecff9845b893aa99fe78c08fd50fb995
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547281
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Nicolette Prevost <nicolettep@google.com>
This reverts commit d78d52a86f.
That reason this CL was reverted in the first place is that it broke the Android roller - perfetto.h could not be located.
We now disable the use of perfetto for Android in the gn_to_bp.py script, so the roller should be good to go.
Reason for revert: Relanding
Original change's description:
> Revert "Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class"
>
> This reverts commit bfc9b94840.
>
> Reason for revert: new dependency causing Android build error
>
> Original change's description:
> > Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class
> >
> > First incremental step to incorporating Perfetto tracing into Skia, more CLs to follow
> >
> > NOTE: The presubmit check is failing. This appears to be due to the known issue where the presubmit check bugs out if the DEPS file is edited, which it was on this CL (modified to include Perfetto).
> >
> > Bug: skia:13303
> > Change-Id: I908be0392b520e8da14b34588b842bf6d955bd93
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543081
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Nicolette Prevost <nicolettep@google.com>
>
> Bug: skia:13303
> Change-Id: Ia2b883bbab1f8fb4f3914b63104a39240cc60e86
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544239
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Auto-Submit: Tyler Denniston <tdenniston@google.com>
> Reviewed-by: Nicolette Prevost <nicolettep@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
Bug: skia:13303
Change-Id: Ibd369b9c8c0e69fc9615fc05cf588ee4440c8ed5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544244
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Nicolette Prevost <nicolettep@google.com>
It's been broken for quite some time.
Change-Id: Ic75f75e2062e9c1f624aa59c2d8de8909a208ea2
Bug: skia:12830
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550256
Reviewed-by: Eric Boren <borenet@google.com>
This also pinpointed one more case where we had an sk_sp<> inside a
static.
Change-Id: I01af66213249334667f107bcb95d53e4ce6f4c52
Bug: skia:13426, skia:13432
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550020
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Note that both `unordered_map` and `sk_sp` had non-trivial
destructors.
Change-Id: I39ffc2193c7935e71aab9b5c7474a64b5f93f753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550176
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>
There is a very old bug (http://crbug.com/510931) that was fixed back
then via a special check when unpacking glyphs. However, it was noted in
another CL that it doesn't seem this should still be possible. The only
case where expectedMaskFormat != maskFormat is when we have a 565 glyph
but a RGBA8 texture due to lack of 565 support. Otherwise they should be
the same. There is no access of the glyph cache that should change the
maskFormat.
Change-Id: I4a6ea11e5095f47f4ce5cc095db8bee084dd8a31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549846
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Previously, we were storing sk_sp<SkRuntimeEffect> objects in static
variables. This would presumably lead to destructors executing during
atexit time, which is unnecessary and can lead to shutdown bugs. We no
longer attempt to free these objects.
Change-Id: I0b09d7ab3dc67c9b8fbc35c81d72ff57b0592c03
Bug: skia:13426
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549658
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Most snippets have zero, but anything involving a runtime effect will
expect one pointer. At present this value isn't used anywhere.
Change-Id: I796e8c26433fa74512e39be65e7df76fba99f996
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550018
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Most fields in this struct are already accessed directly (including
`fNumChildren`) and this accessor didn't do anything interesting to
justify its existence.
Change-Id: I11e97b384a9272f2f3fc0417849fbb5a59761d8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550019
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We didn't have any unit tests confirming that BlockReader can read back
the data out of a block. This seemed like a gap worth filling.
Change-Id: Iefbd5aec199a520ca1ca84b53faef4fd2f2d9ab4
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550017
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Use template guides for deducing the type needed by the CTOR.
This allows SkSpans to be deduced when things like vector,
array, A[], etc. are passed as parameters without using SkMakeSpan.
Change-Id: Ieedcbddc8d40281f819b0c798acd178a12a05891
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549568
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
FreeType is designed to handle *alloc calls returning nullptr and can
fail gracefully with an error code. Ideally a sk_realloc_canfail would
exist to back ft_realloc but it does not appear to exist at this time.
Making this change should reduce the noise from OOM crashes in Chromium
which happen to occur in FreeType and shift them to a different call
stack.
Bug: chromium:1334956
Change-Id: I3c6318ede5aa0874e919ae99dc88eb9efcd05554
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549843
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Adds a new xfermodes2_gray GM, to exercise the various divide-by-zero
cases that show up. Before the fixes, both RP and SkVM were producing
noise in Hue/Saturation/Color/Luminosity. Now they all look right.
Bug: skia:13417
Change-Id: I741461d80ab23b100bbf4d33b9bc023db650bac5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549845
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Label temprory offscreen textures for draws. In this CL, we will
label texture for a part of blur from SkGpuBlurUtils..
Bug: chromium:1164111
Change-Id: Ibfe1c16efa57b6a134a763bc918411108e286704
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549057
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
I saw some strange errors in the logs and locally after
updating to Bazel 5.2.0:
Compiling third_party/externals/freetype/src/base/ftwinfnt.c failed: missing input file 'external/emscripten_npm_linux/node_modules/@caporal/core/CHANGELOG.md', owner: '@emscripten_npm_linux//:node_modules/@caporal/core/CHANGELOG.md'
When I did a bazel clean --expunge locally, it went away.
Looking closely at the Bazel cache folder, some npm dependencies
starting with an @ sign were missing from caches for the 5.0.0
but there in 5.2.0. I could not find an entry in the changelog,
but it's simple enough to clear our caches for now.
Once we update emsdk to a new version, we shouldn't need this
as the dependencies should be downloaded fresh.
Change-Id: Id21d4e4806792d2eee48e1c5e1d6a106230be17a
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549856
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Change-Id: I7a4cd8e2c629ba53e40adc379ea92f86f70d11da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549857
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
After making http://review.skia.org/549837 I realized we also needed to
check the case of data matching, but snippet IDs mismatching.
Change-Id: Iff9d3ec9921e66c1d65e2c4fe8ca0aa279444d7d
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549841
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Previously, we didn't seem to have any tests verifying the behavior of
operator== and operator!=.
Change-Id: I1f76b8307a551f687d172782e8a30a01c0718e85
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549837
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The tests themselves are the same, just split up into their logical
groupings. From the principle go/unit-testing-overview#properties
"Focused. Above all, unit tests are narrow in scope, validating the
correctness of individual pieces of code rather than the correctness of
the system as a whole."
Change-Id: If4219c7ea447155314db885a1e1f0beb3c444b74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549836
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:13118
Change-Id: Icaf2b0914ce7943f57e1ab23e7778d1dcb811cc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548781
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:13118
Change-Id: I0d6e0a9f542680456d3de82a32376722c5b9cd1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549097
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
initializer_list constants only have a scope until the next
sequence point.
Change-Id: I5c52310042fc4773a3ac0e5f9d23ae45bb7b1229
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549574
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Use std::size and std:data to get needed values.
Add a SkMakeSpan for initializer_list.
Change-Id: I43b4b2391323c84b3d6aad22ac4775487c6d5570
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549565
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
No longer call glBufferData with a partial size and track a true
buffer size in the subclass.
Bug: skia:13427
Change-Id: Ibfd04ff8a18d54e1e4cd3fce6863cb48b5495294
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549276
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is a reland of commit 55f9ee1e35
Original change's description:
> Move RecursiveComparison tests to run on GPU
>
> These all require the GPU to generate NaN values. We don't have a static
> way of checking that in caps. Instead, added a probing function to
> decide if the GPU will generate them, and a flag to indicate which tests
> require that behavior.
>
> Change-Id: I9411969b042684ac583a9eb4e9b1aacf2525cc22
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549099
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ie29d32756ceebf872faf1db8d1a1273ad842529b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549562
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:13118
Change-Id: I06d3f899b60ac2cf8d48a46da6097a15c5d40024
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543923
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
At present, we calculate the coordinates, but we don't yet use them
anywhere, because the runtime effect code isn't being included in the
finished program.
Change-Id: I6eb6b1b43ce78da31884b7a8b1bac2aa9ba5407b
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549101
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>