This allows mskps produced with Chromium to be displayed in the
debugger. Previously, the debugger would produce invalid json if any
string contained characters which needed to be escaped. The debugger
also treated all strings like NULL terminated strings, but json is
Unicode based and code point U+0000 is a perfectly good code point.
Change-Id: I28150bad666b02be9f1e4af4078a4ca1e65bf000
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549098
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Since the state per recorded draw is reduced when occlusion culling
isn't part of the API, I switched BruteForceBoundsManager to use two
parallel SkTBlockLists, one for the rects and one for the orders. Since
Rect is over-aligned, this should save on memory.
Bug: skia:13201
Change-Id: Ib9b4b1faf9831f66708475faaf399cc4fadc4f45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548777
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Clarifications based on comments for the newly created DrawAtlas.
Change-Id: I61488043b6be8e08debec5fbe34ebf72f7a4bca0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549040
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We continue to draw a solid magenta placeholder, but we now use a
RuntimeShaderBlock and dedicated RuntimeShader code-snippet to do it.
We no longer use the SolidColor shader or data structures.
Change-Id: Ib5a707596dda593c515f4da5eabd4f6b5efd889c
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548836
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This adds a new SkShaderType for runtime shaders, but it doesn't do
anything interesting yet; for now, we draw solid magenta as a
placeholder.
Change-Id: If0e4af9000d97fcf1184fbed004a64fff8fa4e63
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548477
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move SkSubRunBuffers implementation to where it lives now.
* Clean up unused #if stuff.
* Clean up includes.
Change-Id: I9f606d1ecbe1cfb94e00c1890f30adeec05c8b3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549039
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
@stage() is deprecated, the new form is @vertex or @fragment.
Re-generated the .wgsl files to fix the Housekeeper bot.
Change-Id: I7f0a9ee4a456a1a6b0ddadf0c1063eac77130af2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549096
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
In an upcoming CL the CombinationBuilderTestAccess object will need
to be accessed in multiple test .cpp files.
Bug: skia:12701
Change-Id: I66c969dbe054b7fd333bcd201fcebed4c1dfcc91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548698
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:13420
Change-Id: I4b99a5d75e9fa4ce87b3f0bcb1210d2ec47ae112
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548996
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: chromium:1335249
Change-Id: I441d48fd97e0fccfb25de2bd4a2d8006c2e80ce7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549038
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
I have two reasons for doing this. The first is that I don't think
it was doing anything. In order to set the bit field the statement:
digest->canDrawAsMask() && digest->canDrawAsSDFT()
had to be true. Which I think is impossible because this is
in the mask (not SDFT) case, nd the mask is never SDF when
preparing for mask drawing, since SDF masks will be prepared
when preparing for SDF drawing.
Second, this code is optimized for TextBlob use. Optimizing for
Slugs means that we will need to keep more information around.
This bit vector will never be useful for Slugs.
Change-Id: Ic9233a8a061b58a53d773ae278756b0b714f7c73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548481
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I27eb99450b2b261a4688c62d91a9002dfe7d14df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548484
Auto-Submit: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12701
Change-Id: Ibaeedcbf478546f2942df95d362bee8632ba0ded
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548419
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Just a minor cleanup to hide some cruft.
Bug: skia:12701
Change-Id: I70e9c8ba89a5b7d100a3d3f9b9dd084ad0a70715
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548418
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
We were returning Expressions from ConstructorArrayCast which didn't
match the passed-in Position. We now make sure to set the position of
the returned expression properly.
Change-Id: I2099d006e7dff2c94a9590c7159c4b0947c91257
Bug: oss-fuzz:47935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548483
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>
We are trying to enable ANGLE on Android. However with ANGLE, chrome
will use L16F instead of R16F textures, so we should not disable it
with ANGLE. BTW, if there is a driver bug for L16F, ANGLE can emulate
L16F with R16F.
Bug: chromium:983167
Change-Id: I6d0edfdc8d33c2b8a650f67ab36c7c84ef448372
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547836
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Symbol name lookup is generally simple, except for overload handling.
This factors out the complex, rarely-hit parts into a separate function.
Also, this replaces a vector with a span, which is probably a wash
since it's generally either empty or needs to be modified.
Change-Id: Ia4207fabc08e11b0214406de372cf429c4967ffd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548158
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Replace the empty label string with the label name for
different Skia components.
Bug: chromium:1164111
Change-Id: I10bf62f8febace584db624a33b07b272517df38e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548857
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I0925a52cc3a504c95ec4453e74c4580ce692275c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548896
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
In this CL:
1. Replace the empty label string with the label name for
different Skia components.
2. If the label string is empty, avoid sending it.
3. Append "_Skia_" at the beginning of the label string.
Bug: chromium:1164111
Change-Id: I8154f960591f0c001c6746f25e1939e0eb65d7fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548516
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
SkMakeSpan can automatically deduce the length of our arrays; we don't
need to add an extra variable to tell it. (We could also have used
SK_ARRAY_COUNT to let the compiler automatically deduce the size.)
Change-Id: Ib0e86d18b8b4105824e97d6195cca7930ea1f1f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548782
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>
Bug: skia:12701
Change-Id: I17ff95cd7f7fc518158e951d24c109fc5d4d003d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548417
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The code was using C-style casts, accidentally stripping away const.
Change-Id: Ie34105a3974dcbf1879322cd15e2a9e392db95e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548476
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This improves performance with sandboxing.
One can have Bazel output performance data [1][2], which can be
viewed via chrome://tracing or https://ui.perfetto.dev/.
With Perfetto, the following SQL queries [3][4] can summarize
the sandboxing metrics, as well as the actual compilation
time. http://screen/5TxbeZTso4gNDfD
Note that the dur column is in nanoseconds, so we convert
to seconds. These numbers could further be divided by
the number of processes (in my case 48) to get a scaled output.
SELECT SUM(dur) / 1000000000.0 FROM slice WHERE name = "sandbox.createFileSystem";
SELECT SUM(dur) / 1000000000.0 FROM slice WHERE name = "sandbox.delete";
SELECT SUM(dur) / 1000000000.0 FROM slice WHERE name = "subprocess.run";
I benchmarked the local compilation of //:skia_public using
--config=clang_linux (our custom Linux toolchain). I was
sure to clear the Bazel cache before each run and not count
the time to download/update a toolchain for the first time.
The control measurements (without this CL) are:
Wall Time = 272.2s
sandbox.createFileSystem = 5466.9s
subprocess.run = 2961.0s
sandbox.delete = 4112.3s
With this CL:
Wall Time = 53.9s (5.05x faster)
sandbox.createFileSystem = 403.4s
subprocess.run = 1610.3s
sandbox.delete = 348.8s
The control measurement is a touch misleading. Due to it being
so slow, I had recommended developers use a ramdisk when building
on machines with sufficient RAM via the Bazel flag
--sandbox_base=/dev/shm
Here is the control measurement when using a RAM disk:
Wall Time = 21.2s
sandbox.createFileSystem = 58.9s
subprocess.run = 705.1s
sandbox.delete = 46.6s
With this CL and a RAM disk:
Wall Time = 19.2s (10% faster)
sandbox.createFileSystem = 21.8s
subprocess.run = 722.9s
sandbox.delete = 16.2s
For devs who cannot or are not using a RAM disk, this is
a huge win. With a RAM disk, it's a modest improvement.
On an RBE build, this had minimal impact. I did my best
to bust the action cache with a fake define and the before
and after times were about the same.
This was inspired by [5] and [6].
[1] Add --profile=/tmp/profile.gz to any command
[2] https://bazel.build/rules/performance#performance-profiling
[3] https://perfetto.dev/docs/quickstart/trace-analysis#sample-queries
[4] https://perfetto.dev/docs/analysis/sql-tables#slice
[5] 93f21c9ef3
[6] 311acff345
Change-Id: Iceb2606e86111159141a286d01fc002d09fe3fe4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547822
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
This is just the lowest level of the combination system. The higher
level iteration to accumulate the keys will be in a following CL.
Bug: skia:12701
Change-Id: I4015790a7bca49f11f8eb1a4fda32f235845c049
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547819
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This removes an if-check from the top of get_transition, removes an if-
check from the top of Lexer::next(), simplifies a bounds check, and
removes bitfields from the index array. Disappointingly, on my machine,
I can't measure any change at all; `get_transition` and `next`
stubbornly remain at about 4-5% of total nanobench time for
`sksl_large`. However, it's still simpler and hopefully slightly smaller
code.
Change-Id: If4187c01f350fe642b7af7cb6bd2c8250ca3c00e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548396
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
codesize.skia.org was missing data and a misunderstanding of
file names was one cause.
To be consistent with Gold (and Perf?) we should use UTC as the
time zone for the folders and add hours. The server has been
switched to UTC in https://skia-review.googlesource.com/c/buildbot/+/548262/
This also fixes a race condition caused by upload the .tsv files
before the .json files. When the server sees a Pub/Sub event
for a .tsv file, it indexs the corresponding .json file.
Frequently, the .json file wouldn't have been uploaded yet,
so the indexing would fail.
Change-Id: Iabe64786db6e5c6020a3fc5dda244ccbe478c401
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548357
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
The goal of this CL is to upload SKPs produced by the Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion into a new "old-skp" Gold corpus. This will make triaging SKPs easier.
Other approaches I considered:
- Define a new --oldSkp flag. Redundant since we can recover this information by looking at the --config flag.
- Define a new "old-skp" value accepted by the --src flag. More complex; requires larger changes in DM.cpp, and changes to the Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion task definition.
Bug: skia:13398
Change-Id: Ie8311e715eee0daf335e277132b7484a46b94489
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548076
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
In this CL, the GrSurfaceProxy's and GrDrawOpAtlas's label strings
are plumbed so that it can be stored in the label string of
GrGpuResource. onSetLabel method, which is called from setLabel
method of GrGpuResource, will pass labels to Skia OpenGL backend
using ANGLE's labeling API.
Bug: chromium:1164111
Change-Id: I516c06f0ebbf6bbe6d31ea5a4a64b2baeedd1560
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545717
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>