Commit Graph

566 Commits

Author SHA1 Message Date
Herb Derby
92c162532e Have the remote and main strike caches return a StrikeRef
Change-Id: Ia42ff6ecec43063dbe873a62de67c90259a09bc3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558541
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-14 18:15:32 +00:00
Robert Phillips
1a7bd58e37 Improve encapsulation of SkRadialGradient
Bug: skia:13438
Change-Id: Iba09a04f648f4a11a18e3dd82a257036e311a167
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555636
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-07-13 16:19:04 +00:00
Robert Phillips
437ae4e6ef Make SkGradientShaderBase.h/.cpp files
This is a straight up mechanical rename and split.

Bug: skia:13438
Change-Id: I860b5d537924e1f872ce502477beefaae1fcb2f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557896
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-12 18:30:01 +00:00
Herb Derby
a09751f240 Move StrikeForGPU to text/gpu
Change-Id: I2dbb064523a896f4cac0d2545fc98676a7c6eb3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557384
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-12 17:27:49 +00:00
Herb Derby
6aa1170c10 Consolidate glyph attributes in SkGlyphDigest
SkGlyphDigest encompasses glyph attributes used early in the
text drawing stack. This is a newer class, so move functions and
constants  to  SkGlyphDigest that were historically misplaced.

Change-Id: Iec20c9a96fd7f4adf560f0c385dfd90abf13f009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557579
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-07-11 19:30:12 +00:00
Robert Phillips
fc49c18ca2 Better encapsulate Blend, Color and Empty shaders
Bug: skia:13438
Change-Id: Id1b7e6759144820f200040616deb3a120d809765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554405
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-11 16:37:52 +00:00
John Stiles
bd472a01ed Move runtime-effect dictionary into Graphite ResourceProvider.
Putting the dictionary in the Recorder itself was not very useful; the
recorder is inaccessible throughout the call chain of pipeline setup.
The ResourceProvider, on the other hand, is accessible everywhere we
need it, hangs directly off the Recorder, and has the right lifetime
for our purposes.

Change-Id: I0f494e5890845d73343a71359900598d63b66764
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556917
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-07-08 20:29:38 +00:00
John Stiles
33ea12e1cb Add SkSLTypeShared cpp file.
Previously, the code for converting an SkSLType to a string only
existed in Ganesh, in GrGLSL.cpp/.h. This has now been moved to
SkSLTypeShared.cpp, and the Ganesh file was removed entirely.

Now that a cpp exists, I also moved some rarely-used utility function
bodies out of the header.

Change-Id: Id37ac54dabfe8b1264a2662a00c9780a1ecae2ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556602
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-07-07 20:14:06 +00:00
Robert Phillips
c0cd71d4fd [graphite] Add compile guards to precompile system (take 2)
Bug: skia:13430
Change-Id: I64d6049fec8cc942a8f7c56c01ba292cc8f3835c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554378
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-29 19:37:15 +00:00
Robert Phillips
36d67f462f [graphite] New Combination API
Bug: skia:13430
Change-Id: I816c57d0ed8694d21911c449d67c035580dd63d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548776
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-06-27 17:30:16 +00:00
Herb Derby
1aea903381 Reland "Move SkSubRun to src/text"
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>
2022-06-18 17:20:42 +00:00
Ethan Nicholas
4144b8abb4 Added preliminary SkSL Metal compute shader support
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>
2022-06-15 18:52:42 +00:00
Jorge Betancourt
cca906569c fix bulge typo in src file list
No-Tree-Checks: true
No-Try: true
Change-Id: I22dec8059722072932d8fc3260530abbd22d0abe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548779
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-09 19:43:24 +00:00
John Stiles
8ad66c2340 Migrate Analysis::IsTrivialExpression to its own cpp.
In a followup, I'll be making changes to this algorithm for skia:13378.
This CL migrates the code as-is.

Change-Id: I86cfddeb7c8eb6d4e191371944fb7c3707f13ba6
Bug: skia:13378
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546418
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-06-02 20:39:08 +00:00
Ben Wagner
6886d924a0 Add SubRunContainer to public.bzl
Missed this particular build in "Move SubRunContainer to its own .h
and .cpp" [0][1].

[0] https://skia-review.googlesource.com/c/skia/+/545776
[1] d881def3e5

Change-Id: Icabef047b5397d1ba29237ecdd3e2dfa39e43205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546111
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-06-02 17:13:36 +00:00
Michael Ludwig
0221e79b8b Remove SkNx entirely
Also cleans up the scattered references remaining in the code base
(including in files I thought I got already...).

Change-Id: I7004354b1e9cea9f9d9f45b791d8ab9ce557ba01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542647
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-24 15:57:57 +00:00
Jim Van Verth
a25aeff052 Move GrTextBlobRedrawCoordinator to sktext:gpu namespace.
Also makes SDFMaskFilter available.

Bug: skia:13118
Change-Id: I27ca3ed85a057267387841be5dad10d8e6c7f7bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543079
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-24 15:36:34 +00:00
Robert Phillips
dfabbfc0e3 [graphite] Add SkCombinationBuilder.h
This is cleanup left over from a prior CL's review. We will want to
use the combination builder outside of graphite.

This CL is mainly just moving stuff around except for the addition
of the SkCombinationBuilder.buildCombinations method and CreateKey
more accessible outside of Graphite.

Bug: skia:12701
Change-Id: If2cae6fcff5670e488bc14473b7b1d2f9b1fecd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543196
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-23 20:26:17 +00:00
Jim Van Verth
3149a7b283 Moving GrTextBlob to sktext::gpu
Bug: skia:13118
Change-Id: Id7c92b2e1af9febb3e576c244fcff3aedd27f408
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542646
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-23 17:09:39 +00:00
Jim Van Verth
e55e01640b [graphite] Move Slug to gpu shared
Bug: skia:13118
Change-Id: Id4afcfeeb9a5b44a0e2cb24b70c76a81ec5daaea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542300
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-05-20 19:42:03 +00:00
Jim Van Verth
480532d1c8 [graphite] Moving still more files into src/text/gpu
Moving DistanceFieldAdjustTable, SDFMaskFilter, and
SDFTControl.

Bug: skia:13118
Change-Id: Id9ace9bc02068437c0f4fd674e5864da83f83228
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542297
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-19 18:44:05 +00:00
John Stiles
effd0aeccd Reland "Remove DSLWrapper helper class."
This reverts commit 37c03c8d73.

Reason for revert: using vector<> to avoid skia:13339

Original change's description:
> Revert "Remove DSLWrapper helper class."
>
> This reverts commit 3b4f862d05.
>
> Reason for revert: might have caused chromium:1326848
>
> Original change's description:
> > Remove DSLWrapper helper class.
> >
> > Without an `operator=` on our expressions and variables, we no longer
> > need to wrap all our expressions with a helper.
> >
> > Change-Id: I8110079f61c9ad01997f7c4b376db223dc4b6e17
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541063
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> Change-Id: I7efb3004913f7c85dc551d9740a6b31971de52d2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541736
> Auto-Submit: John Stiles <johnstiles@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: If6dd5d3187a4623ae732335b8215f4350e45cd2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542137
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-19 14:49:56 +00:00
John Stiles
37c03c8d73 Revert "Remove DSLWrapper helper class."
This reverts commit 3b4f862d05.

Reason for revert: might have caused chromium:1326848

Original change's description:
> Remove DSLWrapper helper class.
>
> Without an `operator=` on our expressions and variables, we no longer
> need to wrap all our expressions with a helper.
>
> Change-Id: I8110079f61c9ad01997f7c4b376db223dc4b6e17
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541063
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: I7efb3004913f7c85dc551d9740a6b31971de52d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541736
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-05-18 13:21:07 +00:00
Michael Ludwig
5c08e3c357 Standardize on skvx aliases, plus clean-up
This adds aliases like skvx::float2, float4, etc. to SkVx.h and goes
through existing usages of SkVx to standardize on those aliases, or
refer to the full name directly.

In particular, this lets us clean up the equivalent aliases in
src/gpu/tessellate, src/gpu/graphite/VectorTypes and src/gpu/ganesh/GrVx

Where possible, I switched to using skvx::Foo directly and leveraged
auto to make it less redundant. Headers always used the full type
except for PatchWriter.h and Rect.h because of the number of their
usages. In this case, the alias is scoped to private so it can't leak.

This is prep to migrate older code that is still using SkNx and its
aliases like Sk4f to SkVx as well.

Change-Id: I9dd104e83cf17c2b88995a047cfd2e2b0fe6fac2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-17 18:04:55 +00:00
John Stiles
3b4f862d05 Remove DSLWrapper helper class.
Without an `operator=` on our expressions and variables, we no longer
need to wrap all our expressions with a helper.

Change-Id: I8110079f61c9ad01997f7c4b376db223dc4b6e17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541063
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-17 13:38:48 +00:00
Brian Osman
3cbb13a93b Reland "Add SkCapabilities object"
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>
2022-05-17 13:15:06 +00:00
John Stiles
40bd208dcc Remove DSL runtime effect support.
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>
2022-05-16 20:04:43 +00:00
John Stiles
e7ecd7449d Remove dead files from public.bzl.
Change-Id: I23782db7fcb435d88cfae7a8d9a07c561ac24b89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540921
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-05-16 17:43:51 +00:00
John Stiles
4c2f5c305f Eliminate SkSL::CodeStringExpression.
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>
2022-05-16 16:22:02 +00:00
Michael Ludwig
8c1fe9f743 Add file to public.bzl
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>
2022-05-16 15:31:09 +00:00
Brian Osman
ec19d41b08 Revert "Fix public.bzl"
This reverts commit e064c4c804.

Reason for revert: Original CL is being reverted

Original change's description:
> Fix public.bzl
>
> Follow-up to https://skia-review.googlesource.com/c/skia/+/537876
>
> Change-Id: I414c1e9860848e94597abb87b31ad7c3c297b8c2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540739
> Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>

Change-Id: I484b8230a5813d3a087164071b0a5765b4e96423
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540859
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-05-16 14:50:22 +00:00
John Stiles
4517711966 Add new file to google3 build.
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>
2022-05-16 13:03:58 +00:00
Kevin Lubick
e064c4c804 Fix public.bzl
Follow-up to https://skia-review.googlesource.com/c/skia/+/537876

Change-Id: I414c1e9860848e94597abb87b31ad7c3c297b8c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540739
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-16 12:43:34 +00:00
Michael Ludwig
f4b4420410 Consolidate tessellation tolerance tracking into helper class
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>
2022-05-13 15:23:25 +00:00
Brian Salomon
f7082cb9fa Rename SkCustomMesh to SkMesh
Also rename associated files, types, functions, etc.

Bug: skia:12720
Change-Id: Ibebb4e7071fa19c5a81cd36d567c96a42cd824f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-05-09 13:36:21 +00:00
Michael Ludwig
e706ba895c Move Ganesh tessellation helpers to src/gpu/ganesh/tessellate
Change-Id: I2374fd376f3038e59c82f57c68ac13557058de8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534663
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-06 00:08:59 +00:00
Jim Van Verth
35e1ca4b3b Move more GPU text classes to sktext::gpu namespace.
Moves GlyphVector, TextStrike, StrikeCache, and SubRunAllocator.

Bug: skia:13118
Change-Id: Ifa4957b5cff280f44606dc62bfd30f6a03063c07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536102
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-05-05 16:10:24 +00:00
Brian Osman
38d4fdebbb Remove all CommandBuffer support code
Bug: skia:13040
Change-Id: I1749f21162ea400a8b8fb00ed52e6024eb658d52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537082
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-04 20:19:17 +00:00
Brian Salomon
60f2da5d15 Add buffer API to SkCustomMesh.
SkCustomMesh is a class with factory functions. Vertex and index
data are stored in buffer objects rather than raw pointers. User can
provide offsets into the buffers.

Currently the buffers are always CPU backend and are uploaded to the
GPU on each draw. However, buffer the creation API takes a
GrDirectContext which in the future will be used to create a GPU-backed
buffer specific to the passed context.

Bug: skia:12720
Change-Id: If1bb8110f0f2f219b030f9682ab844f1f2207d9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527917
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-04 16:29:27 +00:00
Kevin Lubick
33fe2f5609 Fix G3 Build
I need to add a presubmit that verifies our BUILD.bazel files
(i.e. the new ones) have the appropriate header.

Change-Id: I368d8e773aa59ff17b6d81812c67cb849c0a08fc
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536881
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-05-04 11:30:35 +00:00
Jorge Betancourt
6ed1a2bed6 remove Freetype sources from NO_FONT src list for android
Change-Id: I5c705b1ae4889defd6680cd47118e319afa1f1d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536776
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-05-03 18:37:51 +00:00
Kevin Lubick
9ef23c2f11 Update public.bzl after GrGlyph move
Change-Id: I44712cd067ce2ded6c28d0a5a4bd6ed6b878744d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536216
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-02 19:44:28 +00:00
Michael Ludwig
c2f683f06a Reland "Delete HW tessellation shaders for curve/wedge tessellation"
This reverts commit 7d9f07c108.

Reason for revert: fixing public.bzl

Original change's description:
> Revert "Delete HW tessellation shaders for curve/wedge tessellation"
>
> This reverts commit 038818ba8e.
>
> Reason for revert: breaking g3 roll, need to update public bzl file I think
>
> Original change's description:
> > Delete HW tessellation shaders for curve/wedge tessellation
> >
> > GrPathTessellationShader_MiddleOut.cpp is just moved into
> > GrPathTessellationShader.cpp, and a few factories are cleaned up since
> > we don't have to differentiate between middle-out or hardware.
> >
> > Bug: skia:13263
> > Change-Id: I420faa614a89ef1a2c0f1075d1f8a067d15e9a81
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534200
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:13263
> Change-Id: I42367a21c2bf1a4283e5d9b8d0e00961f9dea2e7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536039
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: skia:13263
Change-Id: I76101f1dbfee454053c8d7502e83d3b04a768b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536096
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-05-02 18:58:12 +00:00
Kevin Lubick
20ec056844 [bazel] Add missed includes
Change-Id: I0365745ff14cc0ed1c86fe4f9d06a46d98f74a48
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535963
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-05-02 14:54:15 +00:00
Kevin Lubick
e3f11135d1 [bazel] Rewrite globs in public.bzl
globs prevent us from migrating G3 to use our BUILD.bazel files

See http://g/skia-staff/pFBydyFWoIU and http://cl/445404275
for more context.

Change-Id: I57aa445fef8ee00d345efa58f46e391db34a25d1
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535176
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-05-02 13:10:14 +00:00
Kevin Lubick
b11faf5348 Revert "Remove wasm from public.bzl"
This reverts commit fd9804f9a3.

Reason for revert: Still used

Original change's description:
> Remove wasm from public.bzl
>
> See also http://cl/444342647
>
> Bug: skia:12451
> Change-Id: I5f9484b1d023831646243fcfcc2bbb759814293b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533802
> Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>

Bug: skia:12451
Change-Id: I9e8d3af10a3b7b6d1e6fba67f51dbdf5c95e534e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533812
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-04-26 17:28:24 +00:00
Kevin Lubick
fd9804f9a3 Remove wasm from public.bzl
See also http://cl/444342647

Bug: skia:12451
Change-Id: I5f9484b1d023831646243fcfcc2bbb759814293b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533802
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-04-26 14:48:50 +00:00
Kevin Lubick
fcbf28849b [bazel] Trim down public.bzl
Result of http://cl/441813112

Change-Id: Iac8be7f7deb44ce61e388d898be5a97025cd430f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530237
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-04-15 14:57:01 +00:00
Kevin Lubick
83cee23c98 [bazel] Run buildifier on BUILD.bazel files
buildifier --lint=fix -r .

Change-Id: I6a41858270d20137978f8271c8f6160b51120777
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529751
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-14 18:13:43 +00:00
Florin Malita
0e53e24f00 Update SKIA_EGL_SRCS to reflect new Ganesh location
Location changed in
https://skia-review.googlesource.com/c/skia/+/528156.

Change-Id: I4557a1952212bcf6379e0941f59910516a68f765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529556
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-04-12 19:01:06 +00:00