Fuses the relevant functionality into the set() calls.
Change-Id: I3a764219425c35967942366c60a6b9ee6ec48e11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This CL also incidentally adds:
1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.
2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper
Bug: skia:9455
Change-Id: I88ce51c585b1458ee79a9aaa7024190e9f19198c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274506
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit d3606518fa.
Reason for revert: DDL3 bots are red
Original change's description:
> Add onPrePrepareDraws & createProgramInfo methods to GrDrawVerticesOp
>
> This CL also incidentally adds:
>
> 1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.
>
> 2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper
>
> Bug: skia:9455
> Change-Id: Iecd712d3ac76038651bd2e0512134e310930d527
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274551
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,robertphillips@google.com
Change-Id: I6e44ba3bc47df27479af9344af946e27f0a2e937
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274505
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL also incidentally adds:
1) a GrMeshDrawOp::Target 'outputView' virtual and switches GrOpFlushState over to overriding it.
2) a createProgramInfo helper to GrSimpleMeshDrawOpHelper
Bug: skia:9455
Change-Id: Iecd712d3ac76038651bd2e0512134e310930d527
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274551
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Each such op now has a base createProgramInfo method along with a helper version that just takes a flushState.
This CL also makes GrSimpleMeshDrawOpHelper::CreateProgramInfo a chokepoint for programInfo allocation.
Bug: skia:9455
Change-Id: Ibbf0e9cd6f24453e1b87a5e072a30248811a1237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274054
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is just a simple clean up from a CL request.
Change-Id: Ibc09e19aeb8a160e4e4e03573fcf56cb1d58525b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273983
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Clients now must call bindPipeline() before drawing.
Also renames GrOpsRenderPass::draw() to drawMeshes(), in order to
ensure every call site gets updated. drawMeshes() will soon be
replaced by individual calls for each draw type (indexed, instanced,
indexed-patterned, indirect, etc.).
Change-Id: I93ef579ded7d0048c5aa1bf1d7c0eb7bc1cd27b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270424
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Additionally this changes updates GrRenderTargetContext drawTexture to take
a view. This was done since there were a bunch of places where the result
of the copy goes straight to the drawTexture call.
Bug: skia:9556
Change-Id: If7094eb51ed343620011d03b86d603e3c6289c17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267856
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 1c16b43033.
Reason for revert: Red on tree
Original change's description:
> Move makeDeferredRenderTargetContext calls to factory on RTC.
>
> Change-Id: Iaa8f5829d9f8650ff27a60f75fb2216f016ab85e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262058
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: I9e3c9d13c66b5437c87ad7136d283fa4ac81df1f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263019
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
When iterating over the coord transforms or texture samplers of a
FP also have access to the owning FP.
Pass a coord transform range to GPs rather than a pointer to an
iterator.
Change-Id: If7c829a67dce6600d7f49e12d6f49f685dcace3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256216
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is a reland of 997b37fdb9
Layout tests have been suppressed.
Original change's description:
> Revert "Revert "Make FP optimizations helpers use SkAlphaType not GrColorType""
>
> This reverts commit 078e8faa26.
>
> Change-Id: I67b2970584db5a1afbf9928b77c5444947ef71a3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255897
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I6db4cff8b71ef1f29ac47f7729b9514d009f730a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256225
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is complete overkill for what these GMs require but it will help centralize things.
Change-Id: If30cbd9a9cfc8fcc1fe96fc9ca1b4cb17cdeb4bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255824
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
As the first real op to be updated this required the plumbing of the DstProxyView and the de-constification of the GrAppliedClip.
Bug: skia:9455
Change-Id: Ieaa16adfa1d114021b2ad60d0ef8ecbe31d9cc82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255136
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL also introduces creating the geometryProcessor in the arena (which bypasses the GrProcessor memory pool).
Bug: skia:9455
Change-Id: Ia9d5c0d886ea918d9e4209078a1f7e8595234d0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254963
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Hopefully this is a better name. "POD" is no longer accurate since we are storing GrPipeline's in this arena.
Bug: skia:9455
Change-Id: I610267633088b0af4f0cbb36f479bf5eb6c6d0cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254992
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Hopefully this makes it clearer that the GrProgramInfo isn't copying these
objects.
Bug: skia:9455
Change-Id: Id43b7978d63b6d53d531601f3446745f33afcf2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254970
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is a trial balloon for the pulling forward of GrProgramInfo to DDL-record time
Bug: skia:9455
Change-Id: Icabf27fcf7169f12b0655ee23f98dafa7c770add
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253099
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Replaces numSamples with numRasterSamples, and adds isMixedSampled.
The sample count that vulkan and metal actually want to know is how
many samples the rasterizer will compute, which may not match the
number of samples in the render target when we have mixed samples.
They will also need to know whether a program is mixed sampled in
order to set up coverage modulation.
Change-Id: I133c11f74b7dc6a7580818ef73d6deec1d201b64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253550
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This further consolidates the information required to compute the program key (esp. for Vulkan). This CL mainly comprises the plumbing portion - a follow up CL will actually use it.
Bug: skia:9455
Change-Id: Iaac716c289916981a1757a333bfa57b3051fd35b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252161
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 63a3873957.
Reason for revert: fail
Original change's description:
> Reduce inputs to GrProgramDesc::Build method(s)
>
> This moves the computation of the GrStencilSettings into GrProgramDesc::Build for the Vulkan backend
>
> This makes it clear that the stencilSettings are determined by the GrProgramInfo.
>
> Note that this does change some behavior in that the number of stencil bits is now determined (and set up for) the number requested not the number actually available on the attached stencil buffer at flush time.
>
> Bug: skia:9455
> Change-Id: Ia5fa4e30e34952c1a492b8d571094abf2291b2a4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248696
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,robertphillips@google.com
Change-Id: Ib0b337c19acea8000b5592f3dfeda181fd6ef157
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249222
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This moves the computation of the GrStencilSettings into GrProgramDesc::Build for the Vulkan backend
This makes it clear that the stencilSettings are determined by the GrProgramInfo.
Note that this does change some behavior in that the number of stencil bits is now determined (and set up for) the number requested not the number actually available on the attached stencil buffer at flush time.
Bug: skia:9455
Change-Id: Ia5fa4e30e34952c1a492b8d571094abf2291b2a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248696
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This change also allows for the remove of GrPixelConfigIsOpaque function.
Bug: skia:6718
Change-Id: I7e7b70f02d911eda67640d648fb6348091e0f55d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248698
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This improves the encapsulation of the GrProgramInfo class.
Bug: skia:9455
Change-Id: Ic241ba4a2c2edea3e774522065371e5ed8cc2da3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247438
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is the first step in moving the marshaling of program information earlier in renderTask processing (i.e., to onPrePrepare).
Change-Id: I91e3baed9a128e845bd32f9dbbacd9b21d852a3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244118
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Since we want to collect shader information early, this attempts to make clear that numSamples, origin and outputSwizzle can all be obtained from the target renderTargetProxy.
Change-Id: I42e0fd79e2163f17673ccdd344a31fbaadac5f53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246298
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Add version SkImageInfo::Make() that takes SkISize instead of separate
width and height.
Change-Id: I42aa79d23b19e22f5405631728c245b04bce0559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245172
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Need for a follow on change, we need all ops to do all their prep work
which includes creating needed buffers before we start calling
execute on ops. This change updates the few ops that were creating their
buffers in onExecute.
Change-Id: I0f43b0cc35359e1e7ccfb3b159e79bdfe288dcb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239436
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
config is completely redundant. No caller really cares what the backend
format is.
Change-Id: I93f1feb3ee61db6c21b7915bab3ee3fba5656f92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225194
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is largely redundant with GrPixelConfig. However, we intend to
remove GrPixelConfig.
Bug: skia:7580
Change-Id: I03d92303be832711f7821f8a97d36387c9b04a9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222883
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
From now on, sample counts always refer to the number of actual color
samples, and render targets don't have separate color and stencil
sample counts.
If mixed samples support is available when making a
"GrAAType::kCoverage" draw, then an op may attach and use a mixed
sampled stencil buffer internally. But this will all be invisible to
the client.
After this CL, we temporarily won't have a mode to use nvpr with mixed
samples. That will soon be fixed by a follow-on CL that enables nvpr
with mixed samples in the normal "gl" and "gles" configs.
Bug: skia:
Change-Id: I1cb8277f0d2d0d371f24bb9f39cd473ed5c5c83b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221878
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
"vertex" is a reserved word in MSL. Rename the variable to "position".
Change-Id: I20a8bdd443cbdb1a41496728fc1ff388a02e1d24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222105
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
In GrRecordingContext I moved the auditTrail onto the heap and only there
when compiling for tests. This allowed us to move a lot of files out of
include private.
Change-Id: Ib76ac211c0c6fd10bacaccf0c5f93f21a59f35d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221344
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
This almost gets gms to be iwyu clean. The last bit is around gm.cpp
and the tracing framework and its use of atomic. Will also need a way
of keeping things from regressing, which is difficult due to needing to
do this outside-in.
Change-Id: I1393531e99da8b0f1a29f55c53c86d53f459af7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211593
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>