aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrFragmentProcessor.cpp
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 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>
* 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>
* 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>
* 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>
* add gpu impl for shadermaskfilterGravatar Mike Reed2018-02-01
| | | | | | | | | | | adds MulChildAlphaByInput renames MulOutputByInputAlpha --> MulChildByInputAlpha Bug: skia:7500 Change-Id: Ic0615d4d23a887fbee510901ed77a36f98a1b11d Reviewed-on: https://skia-review.googlesource.com/102440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@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>
* converted ConstColorProcessor to SkSLGravatar Ethan Nicholas2017-11-20
| | | | | | | | Bug: skia: Change-Id: Ic3b18f82c1ab940637fb26dec1cf376dd859b35d Reviewed-on: https://skia-review.googlesource.com/73720 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@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>
* 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>
* re-land of new SkSL precisionsGravatar Ethan Nicholas2017-09-18
| | | | | | | | Bug: skia: Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119 Reviewed-on: https://skia-review.googlesource.com/47841 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "Revert "Switched highp float to highfloat and mediump float ↵Gravatar Ethan Nicholas2017-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | to half.""" This reverts commit 05d5a13fea6246648de7e41358ed338d53c85ea2. Reason for revert: looks like it broke filterfastbounds Original change's description: > Revert "Revert "Switched highp float to highfloat and mediump float to half."" > > This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01. > > Bug: skia: > Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1 > Reviewed-on: https://skia-review.googlesource.com/46464 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=bsalomon@google.com,ethannicholas@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Iddf6aef2ab084aa73da7ceebdfc303a1d2b80cde Reviewed-on: https://skia-review.googlesource.com/47441 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "Switched highp float to highfloat and mediump float to half.""Gravatar Ethan Nicholas2017-09-15
| | | | | | | | | | This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01. Bug: skia: Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1 Reviewed-on: https://skia-review.googlesource.com/46464 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Switched highp float to highfloat and mediump float to half."Gravatar Brian Salomon2017-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88d99c63878c2d3d340120f0321676f72afcb4f0. Reason for revert: Believed to be causing unit test failures in Chrome roll: https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433 https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0 Original change's description: > Switched highp float to highfloat and mediump float to half. > > The ultimate goal is to end up with "float" and "half", but this > intermediate step uses "highfloat" so that it is clear if I missed a > "float" somewhere. Once this lands, a subsequent CL will switch all > "highfloats" back to "floats". > > Bug: skia: > Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca > Reviewed-on: https://skia-review.googlesource.com/31000 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com Change-Id: I8bfa97547ac3920d433665f161d27df3f15c83aa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/35705 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Switched highp float to highfloat and mediump float to half.Gravatar Ethan Nicholas2017-08-16
| | | | | | | | | | | | | The ultimate goal is to end up with "float" and "half", but this intermediate step uses "highfloat" so that it is clear if I missed a "float" somewhere. Once this lands, a subsequent CL will switch all "highfloats" back to "floats". Bug: skia: Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca Reviewed-on: https://skia-review.googlesource.com/31000 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.Gravatar Brian Salomon2017-08-11
| | | | | | | Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008 Reviewed-on: https://skia-review.googlesource.com/32760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Require clone() be implemented by GrFragmentProcessor subclassesGravatar Brian Salomon2017-07-31
| | | | | | | Change-Id: I66ba0978e5748806d563ff4f26000e4e0095ed24 Reviewed-on: https://skia-review.googlesource.com/29042 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Implement GrFragmentProcessor::clone for 6 additional subclasses.Gravatar Brian Salomon2017-07-27
| | | | | | | | | | | | | PremulInputFragmentProcessor UnpremulInputFragmentProcessor PremulFragmentProcessor ReplaceInputFragmentProcessor SeriesFragmentProcessor Change-Id: Ided1a6c6b66e12bfd8ee005950443333cc23b830 Reviewed-on: https://skia-review.googlesource.com/26680 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GrColorFragmentProcessorAnalysis do all analysis in constructor.Gravatar Brian Salomon2017-07-21
| | | | | | | | | We no longer do piecemeal analysis. This simplifies the change to make FPs have unique ownership. Change-Id: I4e6b2c23b4277b612dedfc466cee74630a30e997 Reviewed-on: https://skia-review.googlesource.com/25362 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Speculative "fix" for crash in analyzeProcessorsGravatar Robert Phillips2017-06-30
| | | | | | | | | | | | | | From the bug it looks like a null fragment processors may be getting into the processor set. This CL tries to plug any gaps in our fragmentProcessor handling. The only real substantive part to this CL is the addition of some "if (!fp) { return nullptr; }" blocks. Everything else is just to add chokepoints for processor allocation. Bug: 734076 Change-Id: I4952b1a05bc6690d5aa09de977fa6dc54c80338a Reviewed-on: https://skia-review.googlesource.com/21267 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove support in GPU backend for distance vector field.Gravatar Brian Salomon2017-06-02
| | | | | | | | | Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field. Change-Id: Ib0176c78e500e6b5130310934253a75860245812 Reviewed-on: https://skia-review.googlesource.com/18482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: 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>
* Re-land of "eliminated GrGLSLExpr".Gravatar Ethan Nicholas2017-05-08
| | | | | | | | | | | This change is exactly the same as the last time it was landed; I believe the underlying optimizer bug that was causing this to cause problems has been fixed by a prior CL. Bug: skia: Change-Id: I5436422f094ea758caa3cd69e9338db31b1f93fa Reviewed-on: https://skia-review.googlesource.com/15768 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "Revert "eliminated GrGLSLExpr"""Gravatar Ethan Nicholas2017-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 796001c82eca5651bc6a221204f6186918781daf. Reason for revert: looks to be causing problems in Chrome (https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty__dbg_/1553/layout-test-results/results.html) Original change's description: > Revert "Revert "eliminated GrGLSLExpr"" > > This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c. > > Bug: skia: > Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab > Reviewed-on: https://skia-review.googlesource.com/15187 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > TBR=ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I6455a4f16b2dc0d6d1265541f7117e0cfb8dd91c Reviewed-on: https://skia-review.googlesource.com/15309 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Allow TextureSamplers to have null GrTexture pointerGravatar Robert Phillips2017-05-03
| | | | | | | | | Bug: 715488 Change-Id: I69775cbb50d334d81872e236e59368fe65e698ff Reviewed-on: https://skia-review.googlesource.com/14605 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "eliminated GrGLSLExpr""Gravatar Ethan Nicholas2017-05-03
| | | | | | | | | | This reverts commit 5e550ab57e0204bfadd2cb69c47d2a85e38d6a4c. Bug: skia: Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab Reviewed-on: https://skia-review.googlesource.com/15187 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "eliminated GrGLSLExpr"Gravatar Brian Salomon2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 93f20f5629e52eed732d2b9d6dbbb351cc30b2cd. Reason for revert: Mismerge readded deleted files. Original change's description: > eliminated GrGLSLExpr > > Now that skslc performs all of the optimizations (and then some) that > GrGLSLExpr is responsible for, it's just extra work for no benefit. > > Bug: skia: > Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a > Reviewed-on: https://skia-review.googlesource.com/14560 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia8b723594527afe34489fc78a4b49039081b6390 Reviewed-on: https://skia-review.googlesource.com/15154 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* eliminated GrGLSLExprGravatar Ethan Nicholas2017-05-02
| | | | | | | | | | | Now that skslc performs all of the optimizations (and then some) that GrGLSLExpr is responsible for, it's just extra work for no benefit. Bug: skia: Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a Reviewed-on: https://skia-review.googlesource.com/14560 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Move the ability to access textures, buffers, and image storages out from ↵Gravatar Brian Salomon2017-04-04
| | | | | | | | | | | GrProcessor. GrXferProcessor can no longer use this functionality so it is moved to a new intermediate class inherited by GrFragmentProcessor and GrPrimitiveProcessor. Change-Id: I4f30c89bdceb2d77b602bf0646107e0780881c26 Reviewed-on: https://skia-review.googlesource.com/11202 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Renames of processor analysis-related classes and method.Gravatar Brian Salomon2017-03-30
| | | | | | | | | | | | GrProcesserSet::FragmentProcessorAnalysis->GrProcessorSet::Analysis GrPipelineAnalysisColor->GrProcessorAnalysisColor GrPipelineAnalysisCoverage->GrProcessorAnalysisCoverage GrMeshDrawOp::getFragmentProcessorAnalysisInputs->GrMeshDrawOp::getProcessorAnalysisInputs Change-Id: I28ad19dfab5f4ac1788c4eacdec5e1af2a701dd0 Reviewed-on: https://skia-review.googlesource.com/10747 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Split GrPipelineInput into separate color and coverage types, the latter of ↵Gravatar Brian Salomon2017-03-27
| | | | | | | | | | | | | | | which is just an enum. Assign names that indicate that they aren't just for the input phase since I plan to use them at the boundary between FPs and XPs as well. Renamed GrProcOptInfo to GrColorFragmentProcessorAnalysis. This is now only used on the color side and the new name seems clearer to me. Change GrMeshDrawOp::getFragmentProcessorAnalysisInputs to use the new color/coverage types directly rather than a class that has been reduced to simply bundling them together. Change-Id: If93bae74c9d590486eecdf63f302418c96deab65 Reviewed-on: https://skia-review.googlesource.com/10161 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add Swizzle FP, and remove swizzle logic from GrConfigConversionEffectGravatar Brian Osman2017-03-22
| | | | | | | | | | | Trying to decompose read/writePixels into some reusable chunks. BUG=skia:5853 Change-Id: If08b004b008e8ca7d464d9dc47068e487bae850a Reviewed-on: https://skia-review.googlesource.com/10015 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Support premul/unpremul of F16 during read/writePixelsGravatar Brian Osman2017-03-22
| | | | | | | | | | | | | | Added PremulOutput and UnpremulOutput FP helpers. These are used (rather than GrConfigConversionEffect) when working with FP16 textures (and will also be used for other configs that can't be round-tripped via rounding). BUG=skia:5853 Change-Id: I101592c26c4f0b379d5e5a8678ef7b2f08e6ad56 Reviewed-on: https://skia-review.googlesource.com/9980 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove component flags from GrPipelineInput.Gravatar Brian Salomon2017-02-14
| | | | | | | | | We don't use these anywhere downstream except to check for opaqueness. Change-Id: I897137135d69004ed45c0f4c1e7297183f49fc6d Reviewed-on: https://skia-review.googlesource.com/8402 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove GrFragmentProcessor::computeInvariantOutputGravatar Brian Salomon2017-02-13
| | | | | | | Change-Id: If475730103052c6097eb91be06808fb723b70bf8 Reviewed-on: https://skia-review.googlesource.com/8330 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Use new fragment processor optimization queries.Gravatar Brian Salomon2017-02-10
| | | | | | | | | | | This doesn't yet delete the old virtuals. It still uses the color and component flags model for the pipeline input and blended output but I'm planning to change those as well. Change-Id: I64e2ec0fe9ed9fae3aabf1ca8c9bc0582fc7565a Reviewed-on: https://skia-review.googlesource.com/7760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Rename GrFragmentProcessor::MulOutputByInputUnpremulColor to ↵Gravatar Brian Salomon2017-01-28
| | | | | | | | | MakeInputPremulAndMulByOutput. Change-Id: I33d74ddb8a7836e8f1922a5ae73f0adb74d59db3 Reviewed-on: https://skia-review.googlesource.com/7609 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Start of rewrite of GrFragmentProcessor optimizations.""Gravatar Brian Salomon2017-01-27
| | | | | | | | | | | This reverts commit 052fd5158f7f85e478a9f87c45fecaacf7d0f5f3. Disables the test (of unused code) until platform-specific issues are addressed. Change-Id: I7aa23a07954fccf382aa07d28afcbffb0bebcd6d Reviewed-on: https://skia-review.googlesource.com/7656 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Start of rewrite of GrFragmentProcessor optimizations."Gravatar Ethan Nicholas2017-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 85eb4226a4cd8c10a0e3f3ba2f3a60efbb2dd61b. Reason for revert: test failures on Windows, e.g. https://chromium-swarm.appspot.com/task?id=33f9527484414110&refresh=10 Original change's description: > Start of rewrite of GrFragmentProcessor optimizations. > > This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations: > > * known input color -> known output color for GrFP elimination > * tracking of whether all color processors modulate their input for the "tweak alpha" optimziation > * opaqueness tracking > > This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable. > > Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor. > > Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a > Reviewed-on: https://skia-review.googlesource.com/7481 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I2390df257456013fa74137cb5d7b5a93820c291e Reviewed-on: https://skia-review.googlesource.com/7652 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Start of rewrite of GrFragmentProcessor optimizations.Gravatar Brian Salomon2017-01-27
| | | | | | | | | | | | | | | | | This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations: * known input color -> known output color for GrFP elimination * tracking of whether all color processors modulate their input for the "tweak alpha" optimziation * opaqueness tracking This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable. Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor. Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a Reviewed-on: https://skia-review.googlesource.com/7481 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Stop tracking whether GrFragmentProcessors read their inputGravatar Brian Salomon2017-01-23
| | | | | | | Change-Id: Id5338901978b97289798eaef873527597bd8dfd6 Reviewed-on: https://skia-review.googlesource.com/7414 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Continue making Ganesh use absolute texture coordinates - take 2Gravatar Robert Phillips2017-01-20
| | | | | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Relanding of: https://skia-review.googlesource.com/c/6977/ Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02 Reviewed-on: https://skia-review.googlesource.com/7265 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rename GrProcOptInfo::addProcessors to analyzeProcessorsGravatar Brian Salomon2017-01-18
| | | | | | | Change-Id: I49d5fa568d5b9835ee8a76fd8b2b450ece944728 Reviewed-on: https://skia-review.googlesource.com/7182 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Continue making Ganesh use absolute texture coordinates"Gravatar Joe Gregorio2017-01-17
| | | | | | | | | | | This reverts commit 4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9. Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410 Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de Reviewed-on: https://skia-review.googlesource.com/7125 Commit-Queue: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
* Continue making Ganesh use absolute texture coordinatesGravatar Robert Phillips2017-01-17
| | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8 Reviewed-on: https://skia-review.googlesource.com/6977 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Simplify GrProcOptInfo initialization.Gravatar Brian Salomon2017-01-17
| | | | | | | | | | | | | Removes unused single channel tracking. Makes it so that only the op/gp can initiate lcd coverage. Makes GrProcOptInfo fragment processor analysis continuable. Change-Id: I003a8aa3836bb64d04b230ddee581dc500e613a9 Reviewed-on: https://skia-review.googlesource.com/7039 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Merge GrGLSLCaps into GrShaderCapsGravatar Brian Salomon2016-11-29
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5121 Change-Id: If8d13638f80f42161cbc766a2666c5789e5772c8 Reviewed-on: https://skia-review.googlesource.com/5121 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reland image storage with fixes.Gravatar Brian Salomon2016-11-29
| | | | | | | | | | | | | Revert "Revert "Initial OpenGL Image support."" This reverts commit 59dc41175d99d0a31c046aec0c26c4d82a3a3574. BUG=skia: Change-Id: Ibe3c87ce7f746f065fdbcc5a518388cc291112f5 Reviewed-on: https://skia-review.googlesource.com/5131 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Initial OpenGL Image support."Gravatar Brian Salomon2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit be34882042048db096baca32ddf4a8b472529804. Reason for revert: Test failures and shader compilation issues on Android. Original change's description: > Initial OpenGL Image support. > > This change along with recently landed changes is enough to make the new unit test work and not much else. imageLoad is support but not stores or any other image functions (atomics). Barriers in the shading language or the GL API are not yet hooked up. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4182 > > Change-Id: I5958b7c89e40ae5ee05f7bbaca3b3738162fe5ce > Reviewed-on: https://skia-review.googlesource.com/4182 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I29a2502c296ae39ed9a999957800414ae46e6f0f Reviewed-on: https://skia-review.googlesource.com/5129 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>