This is a reland of commit 69fecd6c2d
Original change's description:
> Add SkCapabilities object
>
> This describes the capabilities of a particular Skia rendering context
> (GPU context, or the CPU backend). At the moment, it only contains the
> supported SkSL version (with a new enum added to specify the current
> value as "100" and a new ES3 value as "300".
>
> SkCapabilities can not be retrieved from an SkCanvas - the client must
> have a concrete way of knowing what their destination device that will
> do the actual rendering is (GrCaps or SkSurface).
>
> This CL doesn't make use of the SkCapabilities yet, that's coming in
> follow-up CLs that alter the SkSL compiler and SkRuntimeEffect API.
>
> Bug: skia:11209
> Change-Id: I4e9fd21ff7ffd79f1926c5c2eb34e10b3af4bc9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537876
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:11209
Change-Id: If76343a8a536ade25f6b3d80e0885c7bc47d2adf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540919
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Font feature start/end indexes must be relative to the start of the utf8
buffer passed to SkShaper. SkParagraph had been passing indexes based on
the start of the block.
See https://github.com/flutter/flutter/issues/103615
Change-Id: Ie15611cb05e3532fc34d66724ac347b9bddc3c8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540157
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
This is a reland of commit 167e608bb3
Original change's description:
> [infra] Remove old python scripts and urllib2 references
>
> I was searching for urllib2 while resolving issues with
> https://skia-review.googlesource.com/c/skia/+/538636
> when I found several old, apparently unused scripts.
>
> Rather than fix them, let's get rid of them. If they
> are still in use, the conversion to urllib.request is
> pretty easy.
>
> Change-Id: I27d419601e81c93a3d53e280188a379dfab927c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538936
> Auto-Submit: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I656b45cbcbde61c45d6d9daa0d6b97324d738631
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541077
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
DSL runtime effects were unused outside of test code.
Change-Id: I561afc533c7c204183968aff0b9c4389b0587114
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540917
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Introduce SkStrikeDeviceInfo which contains all the device
information need to categorize the SubRuns. This abstraction will
be used in future CLs to move the Painters off of the devices,
and the SurfaceDrawingContext.
Change-Id: I77b9eff37e1e98175dfcebfc0f392c70aff19dc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541057
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
third_party/**/BUILD.gn have a copyright header, so we'll add one
to our third_party/**/BUILD.bazel files too.
Change-Id: Ifc04d36624af07d91d279a139f3a691e51ce7418
Bug: skia:13323
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541076
Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I1d8874e1371ce2ddeba119b097d018ad94aa474c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541016
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Encountered while creating a presentation
Change-Id: I16962f089d263504644cc6b5f17d35644ff2099d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539056
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This will allow text blobs to be removed from GrTextBlobRedrawCoordinator
when they have perspective transformations.
Bug: skia:12966
Change-Id: I53d2a7f5ea1ba0560b49c2f6bb4c62ffa564dcc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540737
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit 69fecd6c2d.
Reason for revert: Why do we even bother separating include from src?
Original change's description:
> Add SkCapabilities object
>
> This describes the capabilities of a particular Skia rendering context
> (GPU context, or the CPU backend). At the moment, it only contains the
> supported SkSL version (with a new enum added to specify the current
> value as "100" and a new ES3 value as "300".
>
> SkCapabilities can not be retrieved from an SkCanvas - the client must
> have a concrete way of knowing what their destination device that will
> do the actual rendering is (GrCaps or SkSurface).
>
> This CL doesn't make use of the SkCapabilities yet, that's coming in
> follow-up CLs that alter the SkSL compiler and SkRuntimeEffect API.
>
> Bug: skia:11209
> Change-Id: I4e9fd21ff7ffd79f1926c5c2eb34e10b3af4bc9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537876
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:11209
Change-Id: I3bc843b0abf154dbaecb209b251f80741757bf70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540858
Commit-Queue: Brian Osman <brianosman@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This was only used by DSL FPs, which have been removed.
Change-Id: I486e81b9d0111ed1b106b81e3c956cfd266ff27a
Bug: skia:11330
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540302
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Ganesh did not adopt DSL FPs, and Graphite is moving to a module-based
solution instead (where we precompile and rehydrate everything once at
startup).
Change-Id: Ie659535739b2d47de654625f65994912c61b0466
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540301
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This doesn't do anything, but if it did, it would cause a
use-after-move.
Change-Id: Idfb515ac0a8395c7a4ff86f9fcf25a96c336527d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540860
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit 5c6bf4f692.
Reason for revert: git diff does not work well with deleted files
Original change's description:
> [bazel] Run gazelle only on the files that changed
>
> With this change, make generate takes 1.8 seconds instead of
> 7.9 seconds.
>
> We still have generate_force to run on everything.
>
> Change-Id: I6d57031adbe38a7f25a59570baea89970eea024f
> Bug: skia:12541
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540740
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12541
Change-Id: I47c23adf09bbc6324817e166f7ab33eb16f4bf61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540743
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: Idb526ccbb6d552b418c569a63bd3eed83e975ab1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540916
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Since this is super performance-sensitive, I manually checked to ensure
that the generated code didn't change. Other than differences in
variable name mangling, our final output looks to be identical.
Change-Id: I1bdf012f9b15bafcd85a9e73abfb3fa444459c60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This moves the accumulation of worst case tolerances into
VertexChunkPatchAllocator for Ganesh, and lets the tessellating
RenderSteps in Graphite calculate the exact index count for each
instance (for which DrawWriter::DynamicInstances then tracks the worst
case index count between flushes).
Bug: skia:13056, skia:13012
Change-Id: I1d7b99d3edfc5c551cbe67734405ec43fba0e2db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539049
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
* Add this->'s
* Make the logic in checkForDeletedEntries more robust.
* Harden readStrikeData by checking the typefaceID before doing
the descriptor typefaceID translation.
* Rename fRemoteFontIdToTypeface to fRemoteTypefaceIdToTypeface
* Simplify some SK_DEBUG code.
Change-Id: I8498f9be7ef4874f28f595222e661b9f8330b94f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540317
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Ganesh didn't adopt DSL for its fragment processors, except for two.
Backing out those two will allow us to eliminate a lot of unused tech.
Change-Id: I705072fe589746d05e0ae54ef25cee4de368f9b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540318
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
With this change, make generate takes 1.8 seconds instead of
7.9 seconds.
We still have generate_force to run on everything.
Change-Id: I6d57031adbe38a7f25a59570baea89970eea024f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540740
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Rather than having a monolithic third_party/BUILD.bazel, this moves
our Dawn rules to their own subdirectory and makes it callable via
@dawn instead of //third_party/dawn.
This will help with the G3 roll and make our rules more organized in
general.
This also rolls Dawn
Roll Dawn from ab9757036bd6 to e831fb61046b (22 revisions)
https://dawn.googlesource.com/dawn.git/+log/ab9757036bd6..e831fb61046b
Suggested Review Order:
- WORKSPACE.bazel, where we define @dawn and its deps
(@vulkan_headers and @vulkan_tools). I initially thought
I needed to define all of Dawn's deps in the workspace_file_content
for new_local_repository, but that WORKSPACE file is
ignored when building Skia rules.
- third_party/dawn/BUILD.bazel, the contents of which were copied
from //third_party/BUILD.bazel and modified largely via
find-and-replace to point to files relative to
//third_party/externals/dawn. One exception is the cpu_wasm
config_setting because @dawn isn't able to see Skia's
//bazel/macros.bzl.
- All other files
Change-Id: Ib2d7bc972ef00b6b68370ce5c2839ffb70ed9a2f
Bug: skia:12541, skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538638
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This was our last abuse of Constructor::Convert; remaining call sites
are FunctionCall::Convert and DSLType::Construct. Both of these callers
actually require the constructor-disambiguating smarts of
Constructor::Convert.
Change-Id: I9727a63abda03613cd524be3ae9740ada6735081
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540616
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This file was originally added in http://review.skia.org/540040.
Change-Id: I11540a8a882300e12383fac7c8fa437e1e44301b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540619
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
I keep bumping into the need for this
Change-Id: I69384f7d590c163fd6244bdc64cc5e48450fecd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540171
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This doesn't improve the quality of final code, so we can skip this pass
during normal program compilation, but there's no excuse for leaving
Nops in a dehydrated module that we always load into memory at startup.
Change-Id: I7ff94f2713cff658799c469a46b526544dfc318c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540040
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This describes the capabilities of a particular Skia rendering context
(GPU context, or the CPU backend). At the moment, it only contains the
supported SkSL version (with a new enum added to specify the current
value as "100" and a new ES3 value as "300".
SkCapabilities can not be retrieved from an SkCanvas - the client must
have a concrete way of knowing what their destination device that will
do the actual rendering is (GrCaps or SkSurface).
This CL doesn't make use of the SkCapabilities yet, that's coming in
follow-up CLs that alter the SkSL compiler and SkRuntimeEffect API.
Bug: skia:11209
Change-Id: I4e9fd21ff7ffd79f1926c5c2eb34e10b3af4bc9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537876
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This makes expressions with `initialPreLocal` eligible for constant
folding. In practice, this doesn't do much today because matrix constant
folding doesn't support no-op-arithmetic elimination, but in a followup,
we could easily simplify `initialPreLocal * foo` --> `foo` when it's the
identity matrix.
Change-Id: I4c6faf2aa550b6b9776dd8a5da9ea5ec06cd8330
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540316
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Moving it into the helper class serves a few purposes:
1. Consolidate the more complicated stroke vertex count calculations so
that they can be reused between graphite and ganesh more easily.
2. Gives us an object that the PatchWriter can pass to its
PatchAllocators that is itself not a template, so the allocators can
be easily reused across different PatchWriter configurations.
3. Gives us a good place to start experimenting with tighter tolerance
tracking (particularly around internal rotation and join rotation).
Bug: skia:13056, skia:13012
Change-Id: I6086d459a21ac7ab8e833a988cc7c403983c3dd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537083
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This effectively rolls back http://review.skia.org/538045.
Change-Id: I9c457a6c9c9ba98d4c2e3a6af03c5dd80c76beb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540082
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
At present this has no effect. There isn't any dead path in the built-in
code (as you would hope) and we don't do any sufficiently-interesting
transformations that might cause unreachable code to appear.
Change-Id: I6798ae21f8721cf9f6f61ecb1765c8d8df7a9d0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540039
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: Iafd9cf15ac3c42bda7fa6b6857a82dc2eae6d234
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540296
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
This should address the root cause of http://review.skia.org/538045.
We currently don't eliminate unreferenced names from the symbol table,
although that'd be free money if we wanted to do it.
Change-Id: I712e23e6a4f3cb48c2b5ae68f042e13031d5f632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540038
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
In b/224677119, we found that turning on *all* of Skia tracing caused
regressions. We are separately turning it off, but we do find some value
in select tracepoints. Add back in the ones we care about. The remaining
tracepoints can still be turned on manually with the sysprop.
All of these tracepoints are already traced on other platforms (e.g.
Chrome, Flutter). Convert them to TRACE_EVENT0_ALWAYS, introduced in
I13fd77445e0d2a05e46b75629b37bab5f571b02e. (A better long term solution
will be to use categories, as tracked in b/232405757.)
For GrOps, we had an Android-specific tracepoint, added in
I18ac03676da058ba4af5bd6a0c375b3f17c3c399, as well as separate
TRACE_EVENT0 tracepoints with basically the same timing and label.
Remove the Android-specific version, and make the other one
TRACE_EVENT0_ALWAYS. This removes redundant child-parent pairs.
Bug: b/231627558
Bug: b/224677119
Bug: b/232226246
Test: perfetto
Change-Id: I03ce62062a0bde723d3b6ac026bd978b249ad9a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540156
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>