The flags here are specific to v1 behavior. Move them into v1 only.
Bug: skia:12524
Change-Id: I27f06d0c153f95e1510bb11c8486d59e5242056a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458997
Reviewed-by: Robert Phillips <robertphillips@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 a reland of 6aac1193a7
Original change's description:
> Add new GrSurfaceInfo class and related backend structs.
>
> Bug: skia:12402
> Change-Id: I45b2f71dcfa5843e2a19a8de7d34196a4d552905
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445176
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:12402
Change-Id: Id540bea408d72ceba43ec4245c3748d630121926
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 6aac1193a7.
Reason for revert: Breaking Mac bots in Chromium roll. Looks like
they depend on getVkImageInfo for an unknown reason, and it's
hidden behind SK_VULKAN.
Original change's description:
> Add new GrSurfaceInfo class and related backend structs.
>
> Bug: skia:12402
> Change-Id: I45b2f71dcfa5843e2a19a8de7d34196a4d552905
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445176
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:12402
Change-Id: I3c9642354dae8c955bc58d281700536393f84519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450199
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit ae59426ea6.
Bug: skia:12182
Change-Id: I591a0a89ffad1a3d5d867dd247ceeec71b6041a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449516
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:11837
Change-Id: Iaa0349749a5d79d7915fb37ef1b30b46f0aa58d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448796
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: If0bfb3009693b203b2080a1d43cc3b1865c3ab9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448274
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12402
Change-Id: I743724f66db8d7666d4d627d6945ce6bc3dc6bc3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448261
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 10c9f36bdd.
Reason for revert:bad gms, maybe blocking chrome roll
Original change's description:
> New approach to GrProcessor uniforms.
>
> The important aspect is that it allows knowing the uniforms that will
> be used by a set of processors without having to create ProgramImpls.
>
> GrProcessor subclasses specify uniforms at creation time in a similar
> style to how GrGeometryProcessors already specify attributes. That is,
> they initialize a span of structs describing the uniform which may
> contain void uniforms that are skipped. Unlike attributes, the struct
> contains an offset into the processor where the data is stored.
>
> GrUniformAggregator is used to collect the uniforms from all processors
> that compose a draw and mangle their names. The ProgramImpl subclasses
> query the aggregator for their uniform names when emitting code.
>
> The old system for uniforms is left intact and only three processors,
> one GP, one FP, and one XP, are updated to use the new system.
>
> Some pieces that are missing before everything can be moved over:
> -support for uniforms not owned by GrProcessor (e.g. rt-adjust)
> -support for samplers
> -helpers for common patterns
> (e.g. GrGeometryProcessor::ProgramImpl::setupUniformColor(),
> and the various matrix helpers on ProgramImpl)
>
> Bug: skia:12182
>
> Change-Id: I21c1b7a8940eb9b8aad003f5a2569e43977a33d2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440841
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:12182
Change-Id: I6cc508900a599d27124f8ba48597593192d5d807
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448418
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
The important aspect is that it allows knowing the uniforms that will
be used by a set of processors without having to create ProgramImpls.
GrProcessor subclasses specify uniforms at creation time in a similar
style to how GrGeometryProcessors already specify attributes. That is,
they initialize a span of structs describing the uniform which may
contain void uniforms that are skipped. Unlike attributes, the struct
contains an offset into the processor where the data is stored.
GrUniformAggregator is used to collect the uniforms from all processors
that compose a draw and mangle their names. The ProgramImpl subclasses
query the aggregator for their uniform names when emitting code.
The old system for uniforms is left intact and only three processors,
one GP, one FP, and one XP, are updated to use the new system.
Some pieces that are missing before everything can be moved over:
-support for uniforms not owned by GrProcessor (e.g. rt-adjust)
-support for samplers
-helpers for common patterns
(e.g. GrGeometryProcessor::ProgramImpl::setupUniformColor(),
and the various matrix helpers on ProgramImpl)
Bug: skia:12182
Change-Id: I21c1b7a8940eb9b8aad003f5a2569e43977a33d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440841
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:11837
Change-Id: I522636c6dbf977929b0d368e18beb9c3a01fdeb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446184
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: Ia79f76c18587741000367edba303c5f7c0c1087d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444178
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
I want to free up GrD3DTypesPriv to actually be private types that
include real d3d objects.
Change-Id: Id38d6baae4fa68c19301b27d4f9d51eb1d9c5db0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443676
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:11837
Change-Id: I3dde13940e57763d5a8224cb1a4b555e904351d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442716
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: Ie99b1c512885404351d6917bbea751d99a2ca23e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442797
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
src/gpu/GrBlockAllocator -> src/core/SkBlockAllocator
src/gpu/GrTBlockList -> src/core/SkTBlockList
Tests and references also renamed.
Bug: skia:12330
Change-Id: I5fad05faa3dcecd89a0a478dcf30c090ea7589f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441477
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This CL just moves the files and renames them. It doesn't move them into the skgpu::v1 namespace.
Bug: skia:11837
Change-Id: Iab322d0dc5b5d1cfd32436785081539dc85c18d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440776
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Having this enum on GrTessellationPathRenderer forced it to be over-#included and was blocking making GrTessellationPathRenderer.h v1-only.
Bug: skia:11837
Change-Id: I80660ed659946d7aa555057c9f4fd1136b44cca0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440536
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: I6aee4b5fcdb39a669f1ce9adb143b4562c206e57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440263
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I42dfaf795ec6afe9d648b0715457a3a38ef8c7a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439943
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is part of making everything in the gpu/ops directory be v1-only.
Bug: skia:11837
Change-Id: I9709ffc140a77d4d68f3838e3d30374df0913889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: Ifa1da88aafcaa96e0e885facaeb849cc9963bcfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439938
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is the other half of making everything in gpu/ops be v1-only.
Bug: skia:11837
Change-Id: I5d77a499ef02eba69208d5bd634650433d02f6fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440216
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: Ia34f1840aaa7360ea9a3ca40fef5cb96b68c6ca3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439781
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
I will follow up with a CL actually moving the newly V1-only files to their final homes and adding namespaces.
Bug: skia:11837
Change-Id: I0fed1a802ae93a4357c53cde2b665ad6ddb49a6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418996
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Basically, ensure all the headers about to become V1-only only appear in contexts that are currently or will soon be V1-only.
This is almost all fallout from retracting some of the moving headers from other headers i.e.:
GrMeshDrawOp.h from GrOpFlushState.h
GrDrawOp.h from GrOpsRenderPass.h
GrDrawOp.h from GrOpsTask.h
GrSimpleMeshDrawOpHelper.h from GrTessellationShader.h
Bug: skia:11837
Change-Id: I939f5c82c3042e9ab00571b5796ab82dbe968085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438677
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Move ProgramImpl function definitions into Processor subclass cpp files.
Delete separate h/cpp files.
Modify GrGLSLVaryingHandler::addPassThroughAttribute to break #include
cycle. It now takes a ShaderVar rather than a GP::Attribute, making
it slightly more flexible as the input can be any variable defined
in the vertex shader.
Bug: skia:11358
Change-Id: I94ee8cd44d29e194216592ecae5fd28de785c975
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438596
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Almost entirely mechanical.
Bug: skia:11837
Change-Id: I984339097fdeeae2eccb6c1d790d510020511961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438177
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:10205
Change-Id: Iafee804751d69e98241a7825664f3be04b20eb14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436566
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: Id7aa117af3e026d71caeed3ee6489394e869eed1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436568
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The only really interesting parts are:
src/gpu/SurfaceFillContext.*
src/gpu/v1/SurfaceFillContext.*
Everything else is mostly mechanical.
TBR=michaelludwig@google.com
Bug: skia:11837
Change-Id: Ia208e9a73d1529804c06d4f805d8ca3674851496
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436558
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The only really interesting parts are:
src/gpu/SurfaceFillContext.*
src/gpu/v1/SurfaceFillContext.*
Everything else is mostly mechanical.
Bug: skia:11837
Change-Id: If2945f30dadd6ad0cccf6ff2b53e4a92b1dc6cbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436099
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The GrFillRectOp and GrTextureOp guards are temporary - just until they are made V1-only.
The SkGlyphRunPainter and GrTextBlob guards are going to linger since both will probably exist in both versions.
The GrTextBlob guards mainly hide the draw and makeAtlasTextOp methods.
Bug: skia:11837
Change-Id: Icc19d664bb4d93962bf63386dc59fe176cc61ea1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434044
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL is mostly mechanical. It:
replaces "src/gpu/GrSurfaceDrawContext.h" #includes with
"src/gpu/v1/SurfaceDrawContext_v1.h" and reorders
replaces "class GrSurfaceDrawContext;" with
"namespace skgpu { namespace v1 { class SurfaceDrawContext; }}"
replaces "GrSurfaceDrawContext*" with "auto" where possible
replaces "rtc" with "sdc"
replaces "surfaceDrawContext" with "sdc"
replaces GrSurfaceDrawContext with skgpu::v1::SurfaceDrawContext
reflows parameters as needed
This CL does not try to:
make skgpu::v1::SurfaceDrawContext V1-only
minimize the skgpu and/or skgpu::v1 prefixes
Those two tasks will be accomplished in follow up CLs. This CL is just trying to get the bulk of the mechanical changes comprehensibly landed.
Bug: skia:11837
Change-Id: I6fe59080249d585df8f5d27c6b67569cdc35842f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The pathMatrix is applied on the CPU while the geometry is being
written out. It is a tool for batching, and is applied in addition to
the shader's on-GPU matrix. This CL also updates GrPathStencilCoverOp
do do all its path transformations with pathMatrix on the CPU side.
The next step will be for atlases to use the pathMatrix instead of
creating uber paths.
Bug: skia:12258
Change-Id: Ib924dfb06a2c0eed8f9045adc6ae9eefad510082
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433236
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This CL just pulls GrSurfaceDrawContext.h out of headers and .cpp files where possible.
TBR=brianosman@google.com
Bug: skia:11837
Change-Id: Ib96f3619e3a50091516f81ae48f956fe83c05aff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431384
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Creates a wrapper class just for id<MTLRenderPipelineState> so it can
be managed as a command buffer object.
Bug: skia:12253
Change-Id: Ibef833fda25d00e7b3110c17b59c5e760b523473
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431040
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Creates a new path renderer, GrAtlasPathRenderer, that handles all the
atlasing. Managing the atlas in its own path renderer gives us more
control over when atlasing happens in the chain, will allow us to more
easily use the atlas in kCoverage mode, and makes the clipping code
cleaner.
Bug: skia:12258
Change-Id: Ie0b669974936c23895c8ab794e2d97206ed140f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431896
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>