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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This is a reland of commit ae5e846047
Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ia575fd49206ad0b665a6a9153317e738bb321446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I238d29ba0250224fa593845ae65192653f58faff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528156
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: Id8d943b3eb752bad7f45c852c832c1f1fa0bdaca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527776
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This adds egl through swiftshader to unix builds as a separate build target, supporting cl in g3
Change-Id: Ied8c413e9dee0f78f25cbcec1bf937a5eb55dd60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526676
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
The only use was an executable that only compiled in the pathops tests.
The pathops tests *are* ran in DM and this executable
is not run anywhere.
Change-Id: Ia2d5d7247c25cbad1941b9ee124615c008ea76b7
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505640
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>