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>
This CL also removes a few from SkSLUtil but the majority of these will
be cleaned up in a followup. (Some of these are currently in active use
in SkSL.)
Change-Id: I7a018d3f6d8d21d69805f91d81a49c09636e4661
Bug: skia:12559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547818
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: 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>
SK_SUPPORT_GPU needed to be set to 1, and SK_GRAPHITE_ENABLED should
be checked to see if it's defined, not its value.
Change-Id: Ib762c590ceaa570ec98a76558657bbcee672c254
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543080
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I511f6105537b24953de1533ad7b73d1186afd4fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541060
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
For usages of constants in classes outside of skgpu::tess (e.g. when
using tessellation in skgpu::v1 or skgpu::graphite), the constants are
accessed with tess::. This is just to help with clarity since it scopes
the constant name. However, functions and types are still referred to
without that, and using namespace skgpu::tess is used to keep those
references simpler.
In headers, tess:: is added when there are only a few usages of the
types, or it's brought in as an alias.
Change-Id: I12af595659fe791de419db0393482dae6cd238e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534668
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@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>
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 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>
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>
The geometric method for concave shadows seems to be failing in certain
cases. See: https://github.com/flutter/flutter/issues/84262. I've never
been satisfied with this solution and I've been thinking of removing it. This flag allows for Flutter to disable it for the time being until I
can determine if anyone else is using it.
Change-Id: Ia0a3f57002d94928f2baa655c88dc4d10b9edef8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit 8a54d86c78.
Reason for revert: Causing issues with Android CTS
Original change's description:
> Move SkCamera.h to client_utils/android
>
> Android still uses this
> https://developer.android.com/reference/android/graphics/Camera
> but no other client does.
>
> This adds a little adaption layer until Android is updated
> to use the View3D version.
>
> Move SkCamera.h to View3D.h. Change names to android::skia::CLASS
> instead of SkCLASS. (3DView is not a valid class name, so rename it to
> View3D.)
>
> Forward-declare SkMatrix. Do not override SkNoncopyable - just delete
> the copy constructor/operator=. Make fU and fV private in Patch3D.
>
> Make Sk3DView override View3D temporarily until Android can be switched
> over to the new class.
>
> (View3D from http://review.skia.org/291371)
>
> I made Patch3D and Camera3D be private classes as they are
> currently not used by Android and wanted to constrain the
> exposed API as much as possible.
>
> Change-Id: Ibde45478421feeb610e045205c3f20c0e5b1567e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532456
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Change-Id: If6e768524a0e13e14ef886a6f081a09ddc0dc2fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533396
Owners-Override: Kevin Lubick <kjlubick@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Android still uses this
https://developer.android.com/reference/android/graphics/Camera
but no other client does.
This adds a little adaption layer until Android is updated
to use the View3D version.
Move SkCamera.h to View3D.h. Change names to android::skia::CLASS
instead of SkCLASS. (3DView is not a valid class name, so rename it to
View3D.)
Forward-declare SkMatrix. Do not override SkNoncopyable - just delete
the copy constructor/operator=. Make fU and fV private in Patch3D.
Make Sk3DView override View3D temporarily until Android can be switched
over to the new class.
(View3D from http://review.skia.org/291371)
I made Patch3D and Camera3D be private classes as they are
currently not used by Android and wanted to constrain the
exposed API as much as possible.
Change-Id: Ibde45478421feeb610e045205c3f20c0e5b1567e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532456
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: skia:13118
Change-Id: Iab67fd1148182fdd29a38b69f27c51b13942a2b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532400
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Move Rectanizer classes to a shared location
* Have GrDrawOpAtlas store SkColorType and explicit bytes-per-pixel
instead of GrColorType.
Bug: skia:13118
Change-Id: Ib5c3d79394c89dce7f06e8eddf09a5f6a9543a7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531320
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Instead of inverting 'deviceToGlobal', we pass the invert to the
function. 0.1% of all cpu time (M1 Mac) for Motionmark1.2 is spent
doing this inversion.
We can remove a matrix inversion in setDeviceCoordinateSystem by
taking advantage of the fact that we can easily compute the
inverted matrix from values available on hand. The code previously
computed:
fGlobalToDevice = (priorDeviceToGlobal * newLayerMappingLayerToDevice)'
We have access to the following values:
newLayerMappingLayerToDevice' = newLayerMappingDeviceToLayer
priorDeviceToGlobal' = priorGlobalToDevice
With the matrix property (A * B)' = B' * A', we can calculate:
fGlobalToDevice = newLayerMappingDeviceToLayer * priorGlobalToDevice
Change-Id: I39656f244fa5f907536d09d69f585f09f156f133
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527505
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:13118
Change-Id: Ica760f58107de021b7823f69b94809dd2f313ac7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531739
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>
What affects the placement of an sbix image? The cbox? The bounding box?
The lsb? The offsets? In which direction? What are the side effects?
Change-Id: I5b630c2117a26481733392bc1e95428d9a67fb34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519078
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The static functionality for writing vertex buffers, constants, and
utility functions that were in the StrokeTessellator and PathTessellator
classes have been moved into Tessellation.h and a new
FixedCountBufferUtils.h.
The tessellator hierarchy has been moved into src/gpu/ops and all the
v1 guards are removed since they were already solely v1 after the static
functions were lifted out. The hierarchy and subclasses are preserved
but have been combined into just StrokeTessellator.h and
PathTessellator.h instead of separate files for the subclasses.
All the rest of the little changes are updating references and includes.
Bug: skia:13012
Change-Id: I90f2f53538349cf9ad1823a0c42fbdc772190a49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523189
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Draw all the faces at the same animation time to prevent fast movement
from causing strange frames when all the faces are drawn at different
times (and orientations). Change a few names to make things a bit more
understadable.
Change-Id: I932c22f9f996e5fe1509723d5d426f188bf8ddef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518637
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is pretty much just refactoring, condensing the virtual APIs of
PathTessellator and StrokeTessellator to not require exposing
PatchWriter. Once landed, this makes it easier to move PatchWriter to
a template where each Tessellator subclass has a different instantation.
Bug: skia:13012
Change-Id: I1211a707f3e6ac6b3543cf17a3d3af0372221ce4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
On Linux, Viewer can sometimes attempt to animate a sample before the
first time it is drawn. If the sample's onAnimate depends on resources
being loaded in onOnceBeforeDraw then it may crash.
Change-Id: Idddf3dc80e2ee2bc3252cc3ee58784d14165bc07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518136
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
SkCanvas and SkDevice were using SkM44 and its definition of invert(),
but it was slightly more generous than SkMatrix::invert() so the fuzzer
caught a case where the layer's SkDevice had a valid transform but then
converting it to a SkMatrix in skif::Mapping was no longer invertible.
This modifies it so that skif::Mapping no longer tries to invert the
matrices. In almost all cases, the inverse of the layer-to-device
matrix can be constructed directly from a matrix multiply (that's what
device->getRelativeTransform() does). When the matrices are
ill-conditioned the constructed inverse may be inaccurate (hence why
SkMatrix::invert reports false), but in practice this happens for
ridiculously large transforms and the error isn't significant compared
to the precision range of the matrices anyways.
Other cases explicitly want to use the identity matrix for the layer
to device matrix, so I added a helper in the few places that would have
had to pass SkMatrix::I() twice instead.
The last case is drawImage() that creates its own skif::Mapping, now it
just calculates the inverse that skif::Mapping() would have done and if
it fails it drops the draw since it means the canvas matrix is bad.
Bug: chromium:1276525
Change-Id: Ib516bb2fac19d5e7397bd27d80f8e3932b25b2e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509396
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12643
Change-Id: I37e1718a20283dfb814c85260257d57bac2b7b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506211
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Also handles automatically chopping curves to reach the maximum segments
allowed for the PatchWriter.
Change-Id: Iba817e817dd270d170d305c1256cf9aec7b803d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502056
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: Iee54fd52b9ac291c82cfd9ce3a0876ee6c1f972a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502787
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Adding double-parens around an `if ((false))` squelches the warning.
In other cases, you can squelch the warning by assigning the
always-constant(-on-this-machine) check into a constexpr bool.
Change-Id: I5a344fb45779c5bd2865edb3cffaf839ba9a5d85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504597
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Instead of CubicPatch(writer) << control points ... code now writes
writer << Cubic(controlPoints). The main benefit of this is that the
control points are available to the PatchWriter. This allows it (in
follow up CLs) to automatically chop the curves and track the last join
control point.
Change-Id: I38b57a141261afd42e511cc195eb5e64a2382263
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501837
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Always call generateMetrics before generatePath so that generateMetrics
can determine which glyph representation to use and if that glyph
representation can be modeled as a path.
Pass an allocator into generateMetrics so that it can set the path to
not existing. This allows generatePath to continue to work as it used
to, creating a path if any path is available. However, generateMetrics
may first set the path to not existing.
Update getPath and internalGetPath to use the path on the glyph if it
has already been set. Update makeGlyph and internalMakeGlyph to always
call generateMetrics first (which is now more like initGlyph).
Update the SkGlyph::PathData to indicate that it is a dev-path and not a
user-path. A user-path will have effects applied to it. A dev-path is
always a resolved path which is always filled -- unless it is hairline.
Update everything else for the knock on effects and to take advantage of
this information.
Bug: chromium:1266022
Change-Id: Id3f3cf5a534ab99f3a5779c910c1d1e191e68b1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478658
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The callsites output these triangles now. This removes the final
direct Ganesh dependency from the tessellator code.
Bug: skia:12524
Change-Id: Id0d16839ed35a2bd9a812b8747ca8669fac5bed8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470196
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
The tessellators are now agnostic of the shader class, which makes
them mostly usable by Graphite now. Also moves the code for writing
the middle-out vertex and index buffers into the PatchTessellators,
which makes sense since they also write the instance buffers.
Bug: skia:12524
Change-Id: I6c415645e389e056c0db1d93663b1b295d6b4535
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469631
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is a reland of 9613060bdf
Original change's description:
> Implement batching for convex tessellated paths
>
> Moves the view matrix transformation onto the CPU (when local coords
> are not used), and plumbs a color attrib through the tessellation
> patches.
>
> Bug: skia:12524
> Change-Id: Ic4740048b4fc85cb18e7235a7754d57762db3daf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/468997
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:12524
Change-Id: I77cd079d8921b224925bd2f7364c564822886d61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470436
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 9613060bdf.
Reason for revert: assertion failure on ANGLE
Original change's description:
> Implement batching for convex tessellated paths
>
> Moves the view matrix transformation onto the CPU (when local coords
> are not used), and plumbs a color attrib through the tessellation
> patches.
>
> Bug: skia:12524
> Change-Id: Ic4740048b4fc85cb18e7235a7754d57762db3daf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/468997
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Ie086376656777bb167075a9822d8c702cc7e41ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12524
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470296
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Moves the view matrix transformation onto the CPU (when local coords
are not used), and plumbs a color attrib through the tessellation
patches.
Bug: skia:12524
Change-Id: Ic4740048b4fc85cb18e7235a7754d57762db3daf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/468997
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is a reland of 75e1f4c028
Original change's description:
> Lift recursive curve culling out of tessellators
>
> We need recursive chopping/culling logic in order to draw
> astronomically large paths. But rather than do that at the same time
> the tessellators chop curves, this CL moves that logic into an
> SkPath -> SkPath transformation that runs ahead of time (and only if
> the path is extremely large to begin with). This will enable us to
> remove recursion from the tessellators and quickly determine ahead of
> time the size of buffers they need.
>
> Bug: skia:12524
> Change-Id: Ib2800fb23054f1548501811203173e58273fbc83
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12524
Change-Id: Idf54f0c2bddaaddc9fc17bee99c910f3961682a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465361
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 75e1f4c028.
Reason for revert: need to revert parent CL
Original change's description:
> Lift recursive curve culling out of tessellators
>
> We need recursive chopping/culling logic in order to draw
> astronomically large paths. But rather than do that at the same time
> the tessellators chop curves, this CL moves that logic into an
> SkPath -> SkPath transformation that runs ahead of time (and only if
> the path is extremely large to begin with). This will enable us to
> remove recursion from the tessellators and quickly determine ahead of
> time the size of buffers they need.
>
> Bug: skia:12524
> Change-Id: Ib2800fb23054f1548501811203173e58273fbc83
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12524
Change-Id: Ib075e8398767fd7b9f49e50ecee98ce47a2ad6b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464296
Auto-Submit: Greg Daniel <egdaniel@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
We need recursive chopping/culling logic in order to draw
astronomically large paths. But rather than do that at the same time
the tessellators chop curves, this CL moves that logic into an
SkPath -> SkPath transformation that runs ahead of time (and only if
the path is extremely large to begin with). This will enable us to
remove recursion from the tessellators and quickly determine ahead of
time the size of buffers they need.
Bug: skia:12524
Change-Id: Ib2800fb23054f1548501811203173e58273fbc83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Tessellation code can just exist in the skgpu namespace.
Bug: skia:12524
Change-Id: I44d473c5f82d608bb6cd3bb9df239c4f4028da4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461557
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is just a bunch of renaming, and for now the tessellate/shaders
directory remains untouched. The next steps will be to clean up and
remove all Ganesh v1 dependencies from tessellation.
Bug: skia:12524
Change-Id: I8cc166c0c78f9fb160de807131fa53fcc0765818
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458876
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is in prep for compiling with -std=c++14 and -Wno-c++17-extensions
when building with clang. Chrome has encountered problems with
third_party headers that are included both in Skia and other Chrome
sources that produce different code based on whether preprocessor macros
indicate a C++14 or C++17 compilation.
In C++17 they are already inline implicitly. When compiling with C++14
we can get linker errors unless they're explicitly inlined or defined
outside the class. With -Wno-c++17-extensions we can explicitly inline
them in the C++14 build because the warning that would be generated
about using a C++17 language extension is suppressed.
We cannot do this in public headers because we support compiling with
C++14 without suppressing the C++17 language extension warnings.
Bug: chromium:1257145
Change-Id: Iaf5f4c62a398f98dd4ca9b7dfb86f2d5cab21d66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457498
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>