aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessor.h
Commit message (Collapse)AuthorAge
* Remove GrResourceIOProcessor.Gravatar Brian Salomon2018-07-31
| | | | | | | | | | | | | | | | Fold its functionality into GrPrimitiveProcessor and GrFragmentProcessor. Make each have its own TextureSampler nested class. Currently the only difference is that fragment processors lose the ability to inject their samplers into the vertex shader. However, this facilitates refactoring GrPrimitiveProcessor's TextureSampler class such that the textures are specified separately from the TextureSampler. Bug: skia: Change-Id: I1e590187e7a6ae79ee3147155d397fcdcf5e4619 Reviewed-on: https://skia-review.googlesource.com/142814 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove unused GrGpuResourceRef and GrTGpuResourceRefGravatar Brian Salomon2018-07-31
| | | | | | | | Change-Id: I8b4b323549f51e4601ccb6612f65d354e163e93c Reviewed-on: https://skia-review.googlesource.com/144504 Auto-Submit: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Re-re-land "added GrSkSLFP and converted DitherEffect to use it"Gravatar Ethan Nicholas2018-07-31
| | | | | | | | | | This reverts commit 6c48e4d11ce80fa5cfef56e13b2d5847fe94a7cc. Bug: skia: Change-Id: I7ee78990fc30eec545d1856e59eb6e0573089426 Reviewed-on: https://skia-review.googlesource.com/144348 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* 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>
* sksl: Add a "sk_Clockwise" built-inGravatar Chris Dalton2018-07-27
| | | | | | | | | | | This allows us to identify clockwise-winding triangles, in terms of Skia device space, in all backends and with all render target origins. Bug: skia: Change-Id: I220e1c459e0129d1cc4dee6458ef94277fbedd21 Reviewed-on: https://skia-review.googlesource.com/142662 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Vertex color xform benchGravatar Brian Osman2018-07-20
| | | | | | | | | | | | | | Measures two different strategies for dealing with color space transform of per-op colors. Assuming we already use vertex colors, is it better to transform them on the CPU, and use float4 color attributes, or transform them on the GPU, and use ubyte4 color attributes? So far, looks like ubyte4 w/GPU transform wins. Change-Id: If49d75303f669fe7f78af8771af906fa0e872577 Reviewed-on: https://skia-review.googlesource.com/142801 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Reland "Revert "added GrSkSLFP and converted DitherEffect to use it""Gravatar Ethan Nicholas2018-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 97ae0c89025dfd791047f5701e57d58da37c125c. Reason for revert: Breaking ANGLE. Original change's description: > Revert "Revert "added GrSkSLFP and converted DitherEffect to use it"" > > This reverts commit f2030783094e502fb74221077a5ee7cb41287fe4. > > Bug: skia: > Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e > Reviewed-on: https://skia-review.googlesource.com/137391 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,ethannicholas@google.com Change-Id: I65d6d2707fceab0a99121c528d1b848d23e34bfa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/142588 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "added GrSkSLFP and converted DitherEffect to use it""Gravatar Ethan Nicholas2018-07-19
| | | | | | | | | | This reverts commit f2030783094e502fb74221077a5ee7cb41287fe4. Bug: skia: Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e Reviewed-on: https://skia-review.googlesource.com/137391 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Restore SkLightingShader and associated classesGravatar Robert Phillips2018-07-17
| | | | | | | | | This reverts https://skia-review.googlesource.com/c/skia/+/31140 (Remove SkLightingShader and associated classes) and updates the classes to ToT Change-Id: I3b1df1704cca8907aa00f081a7e93339b65ad4fa Reviewed-on: https://skia-review.googlesource.com/141545 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove texel buffer support.Gravatar Brian Salomon2018-07-13
| | | | | | | Change-Id: Ia6f21afe714208979a5bc384e436b28ea2b9a297 Reviewed-on: https://skia-review.googlesource.com/141051 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "added GrSkSLFP and converted DitherEffect to use it"Gravatar Kevin Lubick2018-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dfbfc738a9edfff7a9804253175e380c230f3d21. Reason for revert: Seems to be breaking DDL/ASAN bots Original change's description: > added GrSkSLFP and converted DitherEffect to use it > > Bug: skia: > Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df > Reviewed-on: https://skia-review.googlesource.com/124504 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,ethannicholas@google.com Change-Id: Ic4c3978aaba0391f2f8bb1316a456e3821a3a2f2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/135700 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* added GrSkSLFP and converted DitherEffect to use itGravatar Ethan Nicholas2018-06-18
| | | | | | | | Bug: skia: Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df Reviewed-on: https://skia-review.googlesource.com/124504 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove GrNonlinearColorSpaceXformEffectGravatar Brian Osman2018-06-18
| | | | | | | | | | | Convert all uses to GrColorSpaceXformEffect Change-Id: Icc9d093a00450001c1b915db7a8676c9c66073b1 Reviewed-on: https://skia-review.googlesource.com/132090 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Pull non-substantive changes out of omnibus CLGravatar Robert Phillips2018-06-13
| | | | | | | | | | | https://skia-review.googlesource.com/c/skia/+/131500 (Move op memory storage to GrContext) is still a bit of a monster. Offload the trivial stuff. Change-Id: I27eb0c441d08111491b3cfee3b93d260c26c2790 Reviewed-on: https://skia-review.googlesource.com/134501 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make GPU lattice/nine patch not bleed across cells.Gravatar Brian Salomon2018-05-07
| | | | | | | | | | | | | Consolidate code for handling various image/bitmap and lattice/ninepatch flavors. Makes refTextureForParams virtual on GrTextureProducer. Previously both subclasses had non-virtual flavors of this. Bug: b/77917978 Change-Id: I14787faef33c4617ef359039e81453d683f33ff1 Reviewed-on: https://skia-review.googlesource.com/125520 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Analytic dashing of circles with single on/off intervals and butt caps.Gravatar Brian Salomon2018-04-20
| | | | | | | | Change-Id: If19ac52cb78af57572a102cec0084f5b6c037680 Reviewed-on: https://skia-review.googlesource.com/121882 Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Drop unused support for MSAA sample locationsGravatar Chris Dalton2018-02-20
| | | | | | | | Bug: skia: Change-Id: I96f0c25732d79c5881e400b121e81c5696a747a6 Reviewed-on: https://skia-review.googlesource.com/107441 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Implement GPU/OpList DDLsGravatar Robert Phillips2018-02-01
| | | | | | | | | | This relies on https://skia-review.googlesource.com/c/skia/+/102101 (Add SkSurface_Gpu::MakeWrappedRenderTarget method) landing first TBR=bsalomon@google.com Change-Id: I4d2d66af5800407f638ef32d7b19ce49084bd4e4 Reviewed-on: https://skia-review.googlesource.com/102263 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Drop support for unused MSAA extensions"Gravatar Robert Phillips2018-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7df27465c4ecc8a4a0cdd95e9785c342903c2de9. Reason for revert: experimental revert to see if this is the cause of the tree redness Original change's description: > Drop support for unused MSAA extensions > > Bug: skia: > Change-Id: I113b80e3f991f195155148625ceb29242ea82776 > Reviewed-on: https://skia-review.googlesource.com/101403 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com Change-Id: I4fa4123e2d176bef88cd76a09a14053d9ac5809f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/101680 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Drop support for unused MSAA extensionsGravatar Chris Dalton2018-01-29
| | | | | | | | Bug: skia: Change-Id: I113b80e3f991f195155148625ceb29242ea82776 Reviewed-on: https://skia-review.googlesource.com/101403 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@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>
* converted YUVEffect to SkSLGravatar Ethan Nicholas2017-12-22
| | | | | | | | Bug: skia: Change-Id: I1875e44417a0a583c4f35ee4d46856a34ba55245 Reviewed-on: https://skia-review.googlesource.com/88580 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Guard the sqrt(temp) where temp < 0 in 2pt conical gradientGravatar Yuqian Li2017-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although Linux and Android will return NAN, iOS and some some Win10 devices would return undefined values. This relands 82161 (with the fix mentioned above). The speedup is a little less due to the additional temp < 0 check. 4.08% faster in gradient_conicalOutZero_clamp 6.83% faster in gradient_conical_clamp_shallow_dither 9.43% faster in gradient_conicalOutZero_clamp_3color 12.66% faster in gradient_conicalOut_clamp_hicolor 16.67% faster in gradient_conicalOut_clamp_3color 17.83% faster in gradient_conicalOut_clamp and the speedup is further reduced because we break up the if with two conditions into two ifs with single condition: 7.32% faster in gradient_conical_clamp_shallow_dither 8.00% faster in gradient_conicalOut_clamp_hicolor 8.57% faster in gradient_conicalOut_clamp 8.73% faster in gradient_conicalOut_clamp_3color CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android,Test-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-CommandBuffer Change-Id: I41fb8d97e31c577b52a200f0b883591c9bdc4d1c Reviewed-on: https://skia-review.googlesource.com/84963 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Reimplement TwoPointConicalGradient_gpu"Gravatar Yuqian Li2017-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 84f18c422ae98085c452d3f721ec32228e92f531. Reason for revert: GMs are incorrect on some mobile devices Original change's description: > Reimplement TwoPointConicalGradient_gpu > > 4.24% faster in gradient_conical_clamp_shallow_dither > 6.43% faster in gradient_conicalOutZero_clamp_hicolor > 10.41% faster in gradient_conicalOut_clamp_hicolor > 14.85% faster in gradient_conicalOutZero_clamp_3color > 16.72% faster in gradient_conicalOut_clamp > 24.30% faster in gradient_conicalOut_clamp_3color > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android > > Bug: skia: > Change-Id: I6bc1f24c9463fc9c2acbcba7bd4d55b37ade1613 > Reviewed-on: https://skia-review.googlesource.com/82161 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=egdaniel@google.com,fmalita@google.com,liyuqian@google.com Change-Id: Ieb20cce12a958abb8293218b89baf3d5a2aad0a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Cq-Include-Trybots: skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android, Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android Reviewed-on: https://skia-review.googlesource.com/84801 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Reimplement TwoPointConicalGradient_gpuGravatar Yuqian Li2017-12-13
| | | | | | | | | | | | | | | | | 4.24% faster in gradient_conical_clamp_shallow_dither 6.43% faster in gradient_conicalOutZero_clamp_hicolor 10.41% faster in gradient_conicalOut_clamp_hicolor 14.85% faster in gradient_conicalOutZero_clamp_3color 16.72% faster in gradient_conicalOut_clamp 24.30% faster in gradient_conicalOut_clamp_3color CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android Bug: skia: Change-Id: I6bc1f24c9463fc9c2acbcba7bd4d55b37ade1613 Reviewed-on: https://skia-review.googlesource.com/82161 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add analytic clip FPs that read from the CCPR atlasGravatar Chris Dalton2017-12-05
| | | | | | | | Bug: skia:7190 Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee Reviewed-on: https://skia-review.googlesource.com/77160 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* converted Premul / Unpremul to SkSLGravatar Ethan Nicholas2017-11-17
| | | | | | | | Bug: skia: Change-Id: I4944badbb530e17b9ff7cca389f943e0b5982e01 Reviewed-on: https://skia-review.googlesource.com/72983 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted GrAARectEffect to SkSLGravatar Ethan Nicholas2017-11-16
| | | | | | | | Bug: skia: Change-Id: I08254806fe7cb97dab21c5625aa16dd34aea9468 Reviewed-on: https://skia-review.googlesource.com/72120 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Remove support for image load/storeGravatar Brian Salomon2017-11-15
| | | | | | | | | This isn't used and has become a maintenance burden. Change-Id: I5f3af8f91e5c4f073fe4ea30e0a7f1f61efeea47 Reviewed-on: https://skia-review.googlesource.com/70640 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* converted LumaColorFilterEffect to skslGravatar Ethan Nicholas2017-11-07
| | | | | | | | Bug: skia: Change-Id: I208984ec9ad357249ee1b2fe28477f1450b4b69d Reviewed-on: https://skia-review.googlesource.com/67848 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Re-land "converted OverdrawColorFilter to SkSL"Gravatar Ethan Nicholas2017-10-26
| | | | | | | | | | This reverts commit 2d3cac58fcc8f2d398a421b0341c36479a6ba324. Bug: skia: Change-Id: I6607d419f6b30c3e17b52ec5ce67d489bd1ad1dc Reviewed-on: https://skia-review.googlesource.com/64080 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "converted OverdrawColorFilter to SkSL"Gravatar Ethan Nicholas2017-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8aa4dc9052a64d84cfd0a4330910057bd37b6bf7. Reason for revert: strncmp getting mad Original change's description: > converted OverdrawColorFilter to SkSL > > Bug: skia: > Change-Id: Idcc0502758df1e60ed131a168b5c9a65a4d834a1 > Reviewed-on: https://skia-review.googlesource.com/63840 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,ethannicholas@google.com Change-Id: Ib78d7c878c4597918d059bddb4d61f6a7f59a511 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/63561 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted OverdrawColorFilter to SkSLGravatar Ethan Nicholas2017-10-25
| | | | | | | | Bug: skia: Change-Id: Idcc0502758df1e60ed131a168b5c9a65a4d834a1 Reviewed-on: https://skia-review.googlesource.com/63840 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add GrColorSpaceXformEffectGravatar Brian Osman2017-10-18
| | | | | | | | | | | | | This is an FP that just applies a GrColorSpaceXform. I have a long string of follow-up changes that use this, which greatly simplifies many other FPs, and ultimately eliminates the need for color space xforms to be a first-class type in SkSL. Bug: skia: Change-Id: I070d8bab81c9a620a2173c83b0013c63ad53bc8e Reviewed-on: https://skia-review.googlesource.com/60726 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* SkSL FPs now support child processors, converted ArithmeticFP to SkSLGravatar Ethan Nicholas2017-10-11
| | | | | | | | Bug: skia: Change-Id: I34ed3480073d05762a7d4692aeee4b87e454ce52 Reviewed-on: https://skia-review.googlesource.com/57961 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* initClassID no longer auto-allocates idsGravatar Ethan Nicholas2017-10-09
| | | | | | | | | | | | | Auto-allocated IDs mean that the IDs depend upon the order in which classes happen to get initialized and are therefore not consistent from run to run. This change paves the way for a persistent shader cache by fixing the IDs in an enum. Bug: skia: Change-Id: I3e923c6c54f41b3b3eb616458abee83e0909c09f Reviewed-on: https://skia-review.googlesource.com/56401 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Allow GrDrawOpAtlas to grow as needed"Gravatar Jim Van Verth2017-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 03168b8a62a0d3d14b7a0d14642df4d82203b87c. Reason for revert: Assert in resetting texture proxies. Original change's description: > Allow GrDrawOpAtlas to grow as needed > > Bug: skia:3550 > Change-Id: Ib5312c8c06ba8549d90545658df6686c45058255 > Reviewed-on: https://skia-review.googlesource.com/45841 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,robertphillips@google.com Change-Id: I05e084b4cefa57e558f296d6087d4f03fa16ac81 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:3550 Reviewed-on: https://skia-review.googlesource.com/47140 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Allow GrDrawOpAtlas to grow as neededGravatar Jim Van Verth2017-09-15
| | | | | | | | Bug: skia:3550 Change-Id: Ib5312c8c06ba8549d90545658df6686c45058255 Reviewed-on: https://skia-review.googlesource.com/45841 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Rework GrSamplerParams to be more compact and use its own wrap mode enum.Gravatar Brian Salomon2017-09-07
| | | | | | | | | The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic. Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3 Reviewed-on: https://skia-review.googlesource.com/43200 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add clone methods to unit test GrFragmentProcessor classesGravatar Brian Salomon2017-07-28
| | | | | | | | | Also adds testing of copying ImageStorageAccess and ref counts of proxies held by cloned FPs. Change-Id: Ia23220bf65b4df83d1c874b46d8525cc3540f716 Reviewed-on: https://skia-review.googlesource.com/28004 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Implement clone() for GrDisplacementEffectGravatar Brian Salomon2017-07-25
| | | | | | | | | | | | This also adds copy constructors for: GrTextureDomain GrFragmentProcessor::TextureSampler GrCoordTransform Change-Id: I23cb85113e236f8b6fd1d91163c80d2a41931691 Reviewed-on: https://skia-review.googlesource.com/26621 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* GR_TEST_UTILS fixesGravatar Brian Salomon2017-07-06
| | | | | | | | | | | | | | Fixes build of Skia lib when GR_TEST_UTILS=0 Makes GR_TEST_UTILS=0 for official builds Makes "Mini" builder bot exercise building GPU with is_official_build=true Bug: skia:6786 Change-Id: I6186683a3a216d2e779645bd9e8276a66bcff4d5 Reviewed-on: https://skia-review.googlesource.com/21524 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Fix MDB regressionGravatar Robert Phillips2017-06-19
| | | | | | | | | | | | | This CL: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) introduced a perf regression. Cached textures can appear in different GrSurfaceProxies but have the same underlying GrTexture. Bug: 729233 Change-Id: Ifd7a9260a8a4535e8440c0d837bfdc445a921aa4 Reviewed-on: https://skia-review.googlesource.com/20223 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Clean up GrResourceProvider usageGravatar Robert Phillips2017-06-15
| | | | | | | | | | | | | The only substantive changes are the removal of GrProxy instantiation in: SkGpuBlurUtils::GaussianBlur GrSimpleTextureEffect::Make* Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc Reviewed-on: https://skia-review.googlesource.com/19965 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix GrGradientEffect::isValid()Gravatar Brian Salomon2017-06-09
| | | | | | | | | | This was relying on TextureSampler::proxy() which crashes if the proxy is not valid. Bug: skia: Change-Id: I8452f5cea3a71b5ced15259aede52a44ab152cf2 Reviewed-on: https://skia-review.googlesource.com/19403 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Omnibus: Push instantiation of GrTextures later (post TextureSampler)Gravatar Robert Phillips2017-06-02
| | | | | | | | | | | | | Split into: https://skia-review.googlesource.com/c/10485/ (More GrSurfaceProxy-clean up) https://skia-review.googlesource.com/c/15819/ (Expand GrTextureProxy to handle highestFilterMode) https://skia-review.googlesource.com/c/16714/ (Switch ImageStorageAccess over to GrTextureProxies) https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Change-Id: I6cf3ba0f3bf0e1908d36749bc83571c066ddd568 Reviewed-on: https://skia-review.googlesource.com/10484 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Update clearOp for split-OpList world (take 3)Gravatar Robert Phillips2017-05-31
| | | | | | | | | | | It would reduce a lot of noise if the GrRenderTargetOpList kept a pointer to the GrCaps but, for now, I'm trying to shrink the GrRTOpList, not expand it. Reland of: https://skia-review.googlesource.com/c/17323/ (Update clearOp for split-OpList world) Change-Id: Ia61ce4d6ce245380fc9651928a46c22039fc12cf Reviewed-on: https://skia-review.googlesource.com/18026 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Convert DstTexture to DstProxy (take 2)Gravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Reland of: https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I3a497b6a950fad899f23882c0a9552894ef640f8 Reviewed-on: https://skia-review.googlesource.com/17205 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revise system for checking for uninstantiated proxiesGravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | | The new pattern is: we will "instantiate" pipelines at flush time at flush time we will only access the backing GrSurface by peeking If instantiation fails we should never try to access the GrSurfaces Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6 Reviewed-on: https://skia-review.googlesource.com/17932 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>