aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrMatrixConvolutionEffect.cpp
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>
* Fix degenerate case handling in fill_in_2D_gaussian_kernelGravatar Robert Phillips2018-06-20
| | | | | | | | Bug: 849016 Change-Id: Icc46451acd83140cb86593195947efea7f83828d Reviewed-on: https://skia-review.googlesource.com/135142 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Move GrGLSL.h from include/private to src/gpu/glsl.Gravatar Brian Salomon2018-06-19
| | | | | | | | | | Nothing public was including this and it was included unnecessarily in many places. Change-Id: Iee960b3e67981ab41af7442cc43391f2f57eb551 Reviewed-on: https://skia-review.googlesource.com/135787 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Minor refactoring to image filtersGravatar Robert Phillips2018-05-14
| | | | | | | | | | This pulls the boring parts out of: https://skia-review.googlesource.com/c/skia/+/127338 (Fix srcBounds computation in SkMatrixConvolutionImageFilter) TBR=bsalomon@google.com Change-Id: Iade788fcc96c4c16989d13e7592030a6a1d3f170 Reviewed-on: https://skia-review.googlesource.com/127573 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Make degenerate kernel in fill_in_2D_gaussian_kernel sum to 1Gravatar Robert Phillips2018-05-04
| | | | | | | | Bug: 836113 Change-Id: I1b2ed1d67648163571df6c497365d2a293b3b589 Reviewed-on: https://skia-review.googlesource.com/126020 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Check for divide by zero in fill_in_2D_gaussian_kernelGravatar Greg Daniel2018-04-03
| | | | | | | | | | Same change as the 1D one, but now with more dimensions!! Bug: skia:7769 Change-Id: I152031780ab71ba106d4fa65d52960ec4358274e Reviewed-on: https://skia-review.googlesource.com/118262 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@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>
* switched SkSL's temporary 'highfloat' type back to 'float'Gravatar Ethan Nicholas2017-09-22
| | | | | | | | Bug: skia: Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e Reviewed-on: https://skia-review.googlesource.com/48760 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>
* Make ProcessorCloneTest more robust, fix matrix conv. onIsEqualGravatar Brian Salomon2017-08-01
| | | | | | | Change-Id: Iddf860b462dcac36f6a7f5b90d4ce4dceed0dd31 Reviewed-on: https://skia-review.googlesource.com/29604 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* renamed SkSL types in preparation for killing precision modifiersGravatar Ethan Nicholas2017-07-28
| | | | | | | | Bug: skia: Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900 Reviewed-on: https://skia-review.googlesource.com/27703 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Implement clone for 6 additional GrFragmentProcessor subclasses.Gravatar Brian Salomon2017-07-28
| | | | | | | | | | | | | | | GrMagnifierEffect GrMorphologyEffect GrBicubicEffect GrGaussianConvolutionFragmentProcessor GrMatrixConvolutionEffect GrTextureDomainEffect Bug: skia: Change-Id: I69721b9b95346b365723e5ee21dff2dee8884466 Reviewed-on: https://skia-review.googlesource.com/27900 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove GrSingleTextureEffectGravatar Brian Salomon2017-07-26
| | | | | | | Change-Id: I510cc0657f9433b206dc2ab643fa557667263294 Reviewed-on: https://skia-review.googlesource.com/27180 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Smaller fragment from "Reduce dependence on GrSurface's origin field"Gravatar Robert Phillips2017-07-21
| | | | | | | | TBR=bsalomon@google.com Change-Id: I996226ffaf84ca357740a6da9bb80a3b8febb379 Reviewed-on: https://skia-review.googlesource.com/25745 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Reduce dependence on GrSurface's origin field"Gravatar Robert Phillips2017-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 467022b1861033d968195687da15270c208279ff. Reason for revert: GrAHardwareBufferImageGenerator.cpp Original change's description: > Reduce dependence on GrSurface's origin field > > Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL. > > Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d > Reviewed-on: https://skia-review.googlesource.com/24700 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/25620 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reduce dependence on GrSurface's origin fieldGravatar Robert Phillips2017-07-21
| | | | | | | | | Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL. Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d Reviewed-on: https://skia-review.googlesource.com/24700 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* Retract GrTexture*.h & GrRenderTarget*.h from other headersGravatar Robert Phillips2017-06-13
| | | | | | | | | This does push some additional work (& includes) into the .cpp files. Change-Id: I27c847e371802270d13594dcc22aae44039990bb Reviewed-on: https://skia-review.googlesource.com/19660 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>
* 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>
* 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>
* Retract GrContext from src/gpu/effectsGravatar Robert Phillips2017-03-15
| | | | | | | Change-Id: Iceb7263098286bafb2605ef17d1fe6bb25d71e97 Reviewed-on: https://skia-review.googlesource.com/9693 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Clean up/remove unused GrFragmentProcessor-derived ctorsGravatar Robert Phillips2017-02-28
| | | | | | | | | This is the simple (i.e., non-TextureAdjuster) portion of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: I8f673ebe922e03c69473c18c166bcf818507c662 Reviewed-on: https://skia-review.googlesource.com/8997 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove GrProcessorTestData's GrTexturesGravatar Robert Phillips2017-02-21
| | | | | | | | | | | (No longer) Blocked on: https://skia-review.googlesource.com/c/8450/ (Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2)) This also (unfortunately) picks up a few straggling effects that didn't have a sk_sp<GrTextureProxy> factory. Change-Id: I5ce583a084aa8fe00e866eec1db90e2ec9dd2ab0 Reviewed-on: https://skia-review.googlesource.com/8500 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Clarify when tweak alpha for coverage optimizaton can occur.Gravatar Brian Salomon2017-02-15
| | | | | | | | | Also refer to it directly rather than using the term "modulate" Change-Id: Ifa44a4d46e1be11b567943f58ead24e38f10d03b Reviewed-on: https://skia-review.googlesource.com/8488 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add preserves premul and modulate optimization to compose fragment processors.Gravatar Brian Salomon2017-02-13
| | | | | | | | | Fixes out of range colors produced by matrix convolution and dither effects. Adds modulate optimization to matrix convolution. Change-Id: I8424250a52e864f4b5feaf4474293695c26039d8 Reviewed-on: https://skia-review.googlesource.com/8351 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* make GR_TEST_UTILS=0 workGravatar Hal Canary2017-02-02
| | | | | | | Change-Id: Icce35140ca08b65217b32e6b1ffc6ad2f38ab37f Reviewed-on: https://skia-review.googlesource.com/7840 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Push GrTextureProxy down to more effectsGravatar Robert Phillips2017-01-30
| | | | | | | Change-Id: Ie3f32a88f25af082c25bc6daf3fe24e303e80f9e Reviewed-on: https://skia-review.googlesource.com/7616 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* 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>
* 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>
* Start making texture coordinates be absoluteGravatar Robert Phillips2017-01-10
| | | | | | | | | | | The idea here is that we will pass GrTextureProxys in (where we're currently passing GrTextures) and defer the normalization until the texture is actually instantiated (and possibly move it to the GPU entirely) This CL does (intentionally) change the texturedomaineffect GM but I believe the new behavior is more correct. Change-Id: I4e0510b3dfb65ff0d0ee5921f9a6f94151e602d3 Reviewed-on: https://skia-review.googlesource.com/6807 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Rename vars and functions from 'glslcaps'->'shadercaps'Gravatar Brian Salomon2016-11-29
| | | | | | | Change-Id: I34d226d866dd4ba8e5f33f95cb8cbf01292f9314 Reviewed-on: https://skia-review.googlesource.com/5312 Reviewed-by: Ethan Nicholas <ethannicholas@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>
* Merge GrGLSLShaderVar and GrShaderVarGravatar Brian Salomon2016-11-21
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5087 Change-Id: Ib8943a1da1ea495554feaf5b0992b94fbb9539ab Reviewed-on: https://skia-review.googlesource.com/5087 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* In GrProcessor::TextureSampler drop the "get", it's cleanerGravatar Brian Salomon2016-11-17
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4962 Change-Id: I55e7f8d1b6e1097fdbe411e9989dd42a03dd5f33 Reviewed-on: https://skia-review.googlesource.com/4962 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Rename GrTextureAccess to GrProcessor::TextureSampler.Gravatar Brian Salomon2016-11-17
| | | | | | | | | | | Renames vars and methods that used the work "access" to refer to this type. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931 Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee Reviewed-on: https://skia-review.googlesource.com/4931 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove SkAutoTDeleteArrayGravatar Ben Wagner2016-11-02
| | | | | | | | | | | | This class is already just an alias for std::unique_ptr<T[]>, so replace all uses with that and delete the class. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN-Trybot Change-Id: I40668d398356a22da071ee791666c7f728b59266 Reviewed-on: https://skia-review.googlesource.com/4362 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>