aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCPathProcessor.h
Commit message (Collapse)AuthorAge
* Remove array of TextureSampler pointers from GrIOResourceProcessor.Gravatar Brian Salomon2018-07-30
| | | | | | | | | | Instead store sampler count on base class and subclasses implement a virtual to get the ith sampler. Change-Id: I13e2447a6467a09761d8615acb4aa360b87b1476 Reviewed-on: https://skia-review.googlesource.com/141563 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Refactor GrPipeline dynamic state.Gravatar Brian Salomon2018-06-26
| | | | | | | | | | | | | | | | | Remove scissor rect from GrPipeline. Draws can specify "fixed dynamic state" which doesn't use the dynamism at all or can specify dynamic state arrays with an entry per GrMesh. When we state other than scissor rects this will allow the caller to use a mix of truly dynamic and fixed dynamic state. So a caller that only has dynamic scissor rects doesn't need to store its remaining unvarying state in an array. Change-Id: I8fcc07eb600c72a26cc712b185755c2116021a8a Reviewed-on: https://skia-review.googlesource.com/137223 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Change how vertex/instance attributes are handled in ↵Gravatar Brian Salomon2018-06-19
| | | | | | | | | | | | | geometry processors."" This reverts commit 5045e501d2aec23e5f1e4b46346033ac3202c6b0. TBR=csmartdalton@google.com Change-Id: Ifbf5f1d8f8ef340fdc69653e931b6d68d4bf0854 Reviewed-on: https://skia-review.googlesource.com/135862 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Change how vertex/instance attributes are handled in geometry ↵Gravatar Mike Klein2018-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | processors." This reverts commit 19c1233c447f625c2522e7ecd0a0adecc629bb2f. Reason for revert: want to make sure Google3 can roll Original change's description: > Change how vertex/instance attributes are handled in geometry processors. > > * No longer register vertex/instance attributes on base class, just counts > > * Separate instance and vertex attributes and remove InputRate and offset > > * Make attributes constexpr where possible > > Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6 > Reviewed-on: https://skia-review.googlesource.com/132405 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: I4800632515e14fbf54af52826928ac915657b59f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/135661 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Change how vertex/instance attributes are handled in geometry processors.Gravatar Brian Salomon2018-06-18
| | | | | | | | | | | | | * No longer register vertex/instance attributes on base class, just counts * Separate instance and vertex attributes and remove InputRate and offset * Make attributes constexpr where possible Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6 Reviewed-on: https://skia-review.googlesource.com/132405 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* ccpr: Implement path mask cachingGravatar Chris Dalton2018-06-18
| | | | | | | | | | | | | | | | | | | | Implement caching as follows: 1) Instead of deleting the mainline ccpr atlas when finished, stash it away from flush to flush. 2) On subsequent flushes, check the stashed atlas to see if we can reuse any of its cachable paths. Copy reusable paths into 8-bit literal coverage atlases and store them in the resource cache. 3) Recycle the stashed atlas texture for the remaining paths in the flush. Bug: skia: Change-Id: I9b20fbea708646df1df3a5f9c044e2299706b989 Reviewed-on: https://skia-review.googlesource.com/134703 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* ccpr: Generalize GrCCAtlas to work for cached atlases as wellGravatar Chris Dalton2018-06-14
| | | | | | | | | | | Converts atlas offsets to SkIVector, adds a GrCCAtlasStack class, moves the Op that renders the atlases into GrCCPerFlushResources, etc. Bug: skia: Change-Id: I5110be8e74da709f3ce84bb6798ead572142d0fa Reviewed-on: https://skia-review.googlesource.com/134701 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make GrPrimitiveProcessor::Attribute a class, hide data members.Gravatar Brian Salomon2018-05-30
| | | | | | | Change-Id: I008881d79c82fdde6bb68fe2218e62ccc9c538dd Reviewed-on: https://skia-review.googlesource.com/130600 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* ccpr: Handle winding and even-odd in the same shaderGravatar Chris Dalton2018-05-24
| | | | | | | | | | | | | | | We are already waiting for an entire texture lookup anyway. A couple extra flops should still complete before the texture fetch. This also gives us better batching. TBR=bsalomon@google.com Bug: skia: Change-Id: I7b8e3021c8baad200af99600c9592df5ed0e46bd Reviewed-on: https://skia-review.googlesource.com/129881 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com> Auto-Submit: Chris Dalton <csmartdalton@google.com>
* Revert "ccpr: Handle winding and even-odd in the same shader"Gravatar Chris Dalton2018-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5dd3fccb3c7d9fce2663803a1284734237d8546d. Reason for revert: fma() not supported pre-3.1 Original change's description: > ccpr: Handle winding and even-odd in the same shader > > We are already waiting for an entire texture lookup anyway. A couple > extra flops should still complete before the texture fetch. This also > gives us better batching. > > Bug: skia: > Change-Id: I83a7a8ba6c05cd1ad6b1756a987429233e69ed6c > Reviewed-on: https://skia-review.googlesource.com/129422 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: Iaa6b72686fdf89b58a0ea8418296985c2a3dc27e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/129900 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* ccpr: Handle winding and even-odd in the same shaderGravatar Chris Dalton2018-05-23
| | | | | | | | | | | | We are already waiting for an entire texture lookup anyway. A couple extra flops should still complete before the texture fetch. This also gives us better batching. Bug: skia: Change-Id: I83a7a8ba6c05cd1ad6b1756a987429233e69ed6c Reviewed-on: https://skia-review.googlesource.com/129422 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* ccpr: Remove local matrix data from path instancesGravatar Chris Dalton2018-05-22
| | | | | | | | | | | | | | | Uses the built-in local matrix code instead trying to bake it into the path instance data. If we find a case that can benefit from this type of optimization in the future, we can use something like a texel buffer and send in all of the coord transform data -- not just the local matrix. Bug: skia: Change-Id: I194bc9e4f83e588f8aa93a1a4d40097475d84977 Reviewed-on: https://skia-review.googlesource.com/129332 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add a drawPaths method to GrCCPathProcessorGravatar Chris Dalton2018-05-08
| | | | | | | | Bug: skia: Change-Id: I5d3762203cbe1d823ea3f3967240bcab76651f2c Reviewed-on: https://skia-review.googlesource.com/126662 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* ccpr: Use primitive restart feature on ARMGravatar Chris Dalton2018-01-23
| | | | | | | | Bug: skia: Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01 Reviewed-on: https://skia-review.googlesource.com/98180 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* CCPR: Rename GrCCPR* -> GrCC*Gravatar Chris Dalton2018-01-08
Also runs clang-format on the files that don't have special shader builder styling. Bug: skia: Change-Id: I4a67569a7c8472acfb9200644c913844a92e3b2d Reviewed-on: https://skia-review.googlesource.com/92083 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>