aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrConfigConversionEffect.h
Commit message (Collapse)AuthorAge
* Make TestForPreservingPMConversions helper use lazy createTextureProxy call.Gravatar Greg Daniel2018-03-16
| | | | | | | | Bug: skia: Change-Id: I337efc531aa5685c138b2f9e2bd47b47ba4e1fd5 Reviewed-on: https://skia-review.googlesource.com/114583 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Initial texture data is never flipped when uploaded.Gravatar Brian Salomon2018-03-07
| | | | | | | | | The first bytes of the data always refer to the pixel accessed by texture coord (0, 0). Change-Id: I708702d90f35b3bc896a48c3c3fd6a0be73f505a Reviewed-on: https://skia-review.googlesource.com/112261 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move internal calls from GrContext to GrContextPrivGravatar Robert Phillips2018-03-06
| | | | | | | | | | A mechanical bulk move just to get these out of the public API. TBR=bsalomon@google.com Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3 Reviewed-on: https://skia-review.googlesource.com/112262 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove GrSurfaceOrigin from GrSurfaceDesc.Gravatar Brian Salomon2018-03-05
| | | | | | | | | | | | This field has no interpretation at the GrTexture/GrGpu as the orientation is handled at the GrSurfaceProxy level. This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves. Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772 Reviewed-on: https://skia-review.googlesource.com/111806 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix unit tests that were causes vulkan unitialized memory warnings in validationGravatar Greg Daniel2018-02-27
| | | | | | | | Bug: skia: Change-Id: Id9df92b76c9f948f41f4108bcecdb2687233f841 Reviewed-on: https://skia-review.googlesource.com/110761 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* updated .fp file headersGravatar Ethan Nicholas2018-02-01
| | | | | | | | Bug: skia: Change-Id: I9c39622f34e803a706acd04372be569667380661 Reviewed-on: https://skia-review.googlesource.com/102204 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix FPsGravatar Robert Phillips2018-01-16
| | | | | | | | | The generated FPs have been broken for a while Change-Id: I32bcb3f8c5510049f65a44e226fa78149e01587f Reviewed-on: https://skia-review.googlesource.com/94901 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Funnel most proxy creation through GrProxyProviderGravatar Robert Phillips2018-01-16
| | | | | | | | | This is to provide a choke point for DDL to create Lazy Proxies. Change-Id: If178da13bc6447b31b7601810236d34502d9efbd Reviewed-on: https://skia-review.googlesource.com/93303 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Fix buildGravatar Robert Phillips2018-01-08
| | | | | | | | | | | | This fixes two issues with https://skia-review.googlesource.com/c/skia/+/91501: 1) The .fp files weren't updated to handle the move of proxyProvider to GrContextPriv 2) There were some missing guards for abandoned context's in the proxyprovider Change-Id: I2a704ff2aec5f8f9a7ebaab9b8632abb5cf2e42c Reviewed-on: https://skia-review.googlesource.com/92084 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Add GrProxyProviderGravatar Robert Phillips2018-01-08
| | | | | | | | | This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider. Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f Reviewed-on: https://skia-review.googlesource.com/91501 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* sksl enum supportGravatar Ethan Nicholas2017-11-13
| | | | | | | | Bug: skia: Change-Id: I4d505b31cf8b59de12bcdbca410aafc085977ba9 Reviewed-on: https://skia-review.googlesource.com/68621 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Remove color space xform support from SkSLGravatar Brian Osman2017-10-23
| | | | | | | | Bug: skia: Change-Id: Ia50c1f750e4626211f012ae7543db126b10134c3 Reviewed-on: https://skia-review.googlesource.com/61906 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove color space xform from GrTextureDomain & GrSimpleTextureEffectGravatar Brian Osman2017-10-18
| | | | | | | | Bug: skia: Change-Id: I31435d334da28cce9bbc654c4b98746b03078897 Reviewed-on: https://skia-review.googlesource.com/61460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: 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>
* converted GrConfigConversionEffect to SkSLGravatar Ethan Nicholas2017-10-05
| | | | | | | | Bug: skia: Change-Id: If17cf0fc8b857d22f33a462a39a02bcddd15deda Reviewed-on: https://skia-review.googlesource.com/55741 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@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>
* Implement clone for 4 additional GrFragmentProcessors.Gravatar Brian Salomon2017-07-26
| | | | | | | | | | | | GrConfigConversionEffect GrConstColorProcessor GrConvexPolyEffect AARectEffect Change-Id: I3b103ed045db0825fc193ee7d6e61c8fe8e5c634 Reviewed-on: https://skia-review.googlesource.com/26842 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>
* Remove all config conversion modes except round-to-nearestGravatar Brian Osman2017-04-20
| | | | | | | | | | | On all GPUs where we can perfectly round-trip, this mode does so. This mode fails on Mali 400 and Tegra 3, but nothing works there. Bug: skia: Change-Id: Ifb045fc772a5b1c03b51b5cb2ae039fe792d17bb Reviewed-on: https://skia-review.googlesource.com/13271 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* PM/UPM conversion improvementsGravatar Brian Osman2017-04-10
| | | | | | | | | | | | | Snap input values to N / 255 before doing PM/UPM conversions, and add a new round-to-nearest conversion pair. With the pre-snapping, that pair is chosen by (almost?) every GPU we have. This now lets us round trip perfectly on Mali GPUs (which were falling back to SW before). Bug: skia: Change-Id: I0cebf1382e1c829aedfef4ec1614d7fa980057b5 Reviewed-on: https://skia-review.googlesource.com/11520 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove texture sampling from GrConfigConversionEffectGravatar Brian Osman2017-04-05
| | | | | | | | | | | | | | | | Elevates default precision for the entire fragment program to maintain precision on some ES implementations. Re-land fixed version of: https://skia-review.googlesource.com/10026/ https://skia-review.googlesource.com/10056 BUG=skia: Change-Id: Ibe43dba9c223e430b2f9f8ed5cb97ed7a049e6c2 Reviewed-on: https://skia-review.googlesource.com/10160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* More GrSurfaceProxy-clean upGravatar Robert Phillips2017-03-29
| | | | | | | | | Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I1ee39a23c749e420dce0ad561ee1c8b09bdcc763 Reviewed-on: https://skia-review.googlesource.com/10485 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Remove texture sampling from GrConfigConversionEffect"Gravatar Brian Osman2017-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3e7cddaf32e280fe9f32eec5bfdd8168ca4941b6. Reason for revert: Precision issue on some mobile GPUs. Original change's description: > Remove texture sampling from GrConfigConversionEffect > > Re-land fixed version of https://skia-review.googlesource.com/c/10026/ > > BUG=skia: > > Change-Id: I0754ffb72da2966eb57e5cd7ec818b1cdce84a74 > Reviewed-on: https://skia-review.googlesource.com/10056 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I66f52efe191b170612775e26d84a2af3d3f856af Reviewed-on: https://skia-review.googlesource.com/10118 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove texture sampling from GrConfigConversionEffectGravatar Brian Osman2017-03-24
| | | | | | | | | | | Re-land fixed version of https://skia-review.googlesource.com/c/10026/ BUG=skia: Change-Id: I0754ffb72da2966eb57e5cd7ec818b1cdce84a74 Reviewed-on: https://skia-review.googlesource.com/10056 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Remove texture sampling from GrConfigConversionEffect"Gravatar Brian Osman2017-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3bc9bfea5e31b697033e4f0e4c4e4710c34e0387. Reason for revert: I broke something subtle. Original change's description: > Remove texture sampling from GrConfigConversionEffect > > BUG=skia: > > Change-Id: If5df087d3fe11098f468deab5f2fc8beb782cc83 > Reviewed-on: https://skia-review.googlesource.com/10026 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Icca2f435b30512305f3e483689320a5930dc1467 Reviewed-on: https://skia-review.googlesource.com/10052 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove texture sampling from GrConfigConversionEffectGravatar Brian Osman2017-03-23
| | | | | | | | | BUG=skia: Change-Id: If5df087d3fe11098f468deab5f2fc8beb782cc83 Reviewed-on: https://skia-review.googlesource.com/10026 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@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>
* 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>
* 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>
* 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>
* Switch GrConfigConversionEffect over to taking GrTextureProxiesGravatar Robert Phillips2017-01-25
| | | | | | | Change-Id: Ic8be773e210e1ac05dcb9aad6c89dcd63e9e4ba2 Reviewed-on: https://skia-review.googlesource.com/7521 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* sk_sp for Ganesh.Gravatar bungeman2016-06-09
| | | | | | | | | | Convert use of GrFragmentProcessor, GrGeometryProcessor, and GrXPFactory to sk_sp. This clarifies ownership and should reduce reference count churn by moving ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004 Review-Url: https://codereview.chromium.org/2041113004
* Make swizzling in read/write pixel copy code more genericGravatar bsalomon2016-01-22
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1617433002 Review URL: https://codereview.chromium.org/1617433002
* Rename some processor functions from GL to GLSLGravatar egdaniel2015-11-13
| | | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1443743002
* Make all GrFragmentProcessors GL independent.Gravatar egdaniel2015-11-13
| | | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1434313002
* Bye bye processor data manager.Gravatar bsalomon2015-10-06
| | | | Review URL: https://codereview.chromium.org/1388113002
* When getGLInstance is called on a frag proc, the resulting ↵Gravatar wangyix2015-08-18
| | | | | | | | GrGLFragmentProcessor will be the root of a tree of GrGLFragmentProcessors that mirrors the GrFragmentProcessor's tree. This allows setData() to be called recursively (removing the responsibility from compose shader) and allows gl instances direct access to their children gl instances so they can emit their code. BUG=skia:4182 Review URL: https://codereview.chromium.org/1287023009
* Added registerChild; transforms, textures, glKey automatically handled.Gravatar wangyix2015-08-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1266633003
* Another trivial cleanupGravatar joshualitt2015-07-14
| | | | | | | | | TBR=bsalomon@google.com BUG=skia: Committed: https://skia.googlesource.com/skia/+/52e7657cd850f95e66eb23c6d138ee45149a1039 Review URL: https://codereview.chromium.org/1229303003
* Revert of Another trivial cleanup (patchset #6 id:100001 of ↵Gravatar joshualitt2015-07-13
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1229303003/) Reason for revert: breaking things Original issue's description: > Another trivial cleanup > > TBR=bsalomon@google.com > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/52e7657cd850f95e66eb23c6d138ee45149a1039 TBR=robertphillips@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1233853004
* Another trivial cleanupGravatar joshualitt2015-07-13
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1229303003
* More threading of GrProcessorDataManagerGravatar joshualitt2015-07-09
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1230813003
* Use GLSLCaps for creating processor keys and GLSL-specific programsGravatar jvanverth2015-04-28
| | | | | | | | | Effectively all this does is future-proof any GLSL-specific code, as GLSLCaps is just a typedef of GLCaps. BUG=skia: Review URL: https://codereview.chromium.org/1109863004
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Remove backend factoriesGravatar joshualitt2014-12-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/778453002
* Create GrOptDrawState before recording draw in GrInOrderDrawBufferGravatar bsalomon2014-11-19
| | | | Review URL: https://codereview.chromium.org/739673002