aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrSingleTextureEffect.h
Commit message (Collapse)AuthorAge
* Update invariant output computation for various texture effects.Gravatar egdaniel2014-11-25
| | | | | | | | | Update various effects that read in textures to check whether or not the texture is alpha only. This allows us to use a more specific mulByUnKnownAlpha instead of the more general mulByUnknownColor BUG=skia: Review URL: https://codereview.chromium.org/759653004
* Move GrInvariantOutput out of GrProcessor and into its own class.Gravatar egdaniel2014-11-12
| | | | | | | | This will help with the ability to subclass, add to, etc. GrInvariantOutput. Also it was simply getting a little too big to be a "supporting" subclass BUG=skia: Review URL: https://codereview.chromium.org/699943003
* Auto-compare GrProcessors' texture accesses in isEqual().Gravatar bsalomon2014-10-16
| | | | | | R=joshualitt@google.com Review URL: https://codereview.chromium.org/654313002
* Make GrFragmentProcessor auto-compare coord xforms.Gravatar bsalomon2014-10-15
| | | | Review URL: https://codereview.chromium.org/657923002
* Split GrFragmentProcessor into its own headerGravatar bsalomon2014-10-15
| | | | Review URL: https://codereview.chromium.org/660573002
* Create helper functions to use in computeInvariantOutput callsGravatar egdaniel2014-10-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/643743003
* Add isSingleComponent bool to getConstantColorComponentGravatar egdaniel2014-10-03
| | | | | | | | | | Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. BUG=skia: Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b Review URL: https://codereview.chromium.org/608253002
* Revert of Add isSingleComponent bool to getConstantColorComponent (patchset ↵Gravatar robertphillips2014-10-02
| | | | | | | | | | | | | | | | | | | | | | | #6 id:100001 of https://codereview.chromium.org/608253002/) Reason for revert: Changing some GMs Original issue's description: > Add isSingleComponent bool to getConstantColorComponent > > Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b TBR=joshualitt@chromium.org,bsalomon@google.com,reed@google.com,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/617853003
* Add isSingleComponent bool to getConstantColorComponentGravatar egdaniel2014-10-02
| | | | | | | | Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. BUG=skia: Review URL: https://codereview.chromium.org/608253002
* Patch to create a distinct geometry processor. The vast majority of this patchGravatar joshualitt2014-09-23
| | | | | | | | | | | | | is just a rename. The meat is in GrGeometryProcessor, GrProcessor, GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory, GrProcessUnitTestFactory, and the builders BUG=skia: R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/582963002
* Make GPU coord transforms automaticGravatar bsalomon@google.com2013-10-02
| | | | | | | | | | | | | Adds a GrCoordTransform class and updates the framework to handle coord transforms similar to how it handles textures with GrTextureAccess. Renames GrGLEffectMatrix to GrGLCoordTransform and slightly repurposes it to be used by the framework instead of effects. R=bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/24853002 git-svn-id: http://skia.googlecode.com/svn/trunk@11569 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a GrCustomCoordsTextureEffect classGravatar commit-bot@chromium.org2013-09-30
| | | | | | | | | | | | | | | | | | Extracts a GrCustomCoordsTextureEffect class from GrSimpleTextureEffect. This way there are no effects that can conditionally require a vertex shader. They either always need one or never do. Also removes kCustom_CoordsType from the CoordsType enum in GrEffect (that enum is really only meant for coords provided by the framework), and updates GrSimpleTextureEffect::TestCreate to make the effect with position as well, instead of just local coords. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/24018007 git-svn-id: http://skia.googlecode.com/svn/trunk@11531 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10385 2bbb7eff-a529-9590-31e7-b0007b416f81
* make the filter mode for GrTextureAccess an enum so we can plumb downGravatar humper@google.com2013-07-25
| | | | | | | | | | | the paint's filter modes to the GPU BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/20362002 git-svn-id: http://skia.googlecode.com/svn/trunk@10368 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrGLShaderBuilder::TextureSampler extract only required info from ↵Gravatar bsalomon@google.com2013-03-28
| | | | | | | | | | | GrTextureAccess. This will make it possible to init a TextureSampler without a texture or a specific config. Also unify two separate bitfields of color components in GPU code. Review URL: https://codereview.chromium.org/13121002 git-svn-id: http://skia.googlecode.com/svn/trunk@8428 2bbb7eff-a529-9590-31e7-b0007b416f81
* Attempt to reland 8264-5 with warning-as-error fixes.Gravatar bsalomon@google.com2013-03-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8272 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 8265-8264 (broke build)Gravatar reed@google.com2013-03-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8268 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adds local coords to GrEffect system.Gravatar bsalomon@google.com2013-03-20
| | | | | | | | | | | | | Effects can ask the builder for local coords which may or may not be distinct from positions. GrEffectStage tracks changes to relationship between pos and local coords. GrGLEffectMatrix and GrSingleTextureEffect can use either pos or textures as intput coords GrSimpleTextureEffect now allows for an explicit texture coords attribute. Review URL: https://codereview.chromium.org/12531015 git-svn-id: http://skia.googlecode.com/svn/trunk@8264 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove default implementation of GrEffect::isEqual. Make ↵Gravatar bsalomon@google.com2013-01-17
| | | | | | | | GrSingleTextureEffect abstract. Review URL: https://codereview.appspot.com/7142049 git-svn-id: http://skia.googlecode.com/svn/trunk@7254 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change some function/vars from EffectPtr to EffectRef to reflect ↵Gravatar bsalomon@google.com2013-01-16
| | | | | | GrEffectPtr->GrEffectRef renaming. git-svn-id: http://skia.googlecode.com/svn/trunk@7226 2bbb7eff-a529-9590-31e7-b0007b416f81
* Wrap GrEffects in GrEffectPtr.Gravatar bsalomon@google.com2013-01-16
| | | | | | | | | This is the first step towards automatic recycling of scratch resouces in the cache via ref-cnts. R=robertphillips@google.com Review URL: https://codereview.appspot.com/7092061 git-svn-id: http://skia.googlecode.com/svn/trunk@7222 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GrEffect::updateKnownColorComponents(). It is used to determine whether ↵Gravatar bsalomon@google.com2013-01-11
| | | | | | | | the output of an effect has a constant output value for r,g,b, or a. Review URL: https://codereview.appspot.com/7064057 git-svn-id: http://skia.googlecode.com/svn/trunk@7144 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrEffect::textureAccess non-virtual. Require subclasses to append their ↵Gravatar bsalomon@google.com2013-01-11
| | | | | | | | GrTAs. Review URL: https://codereview.appspot.com/7062063 git-svn-id: http://skia.googlecode.com/svn/trunk@7129 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow GrEffects with multiple textures.Gravatar bsalomon@google.com2013-01-04
| | | | | | | It will work as long as the total number of textures sis less than GrDrawState::kNumStages. That will be fixed in a follow up CL. Review URL: https://codereview.appspot.com/7040052 git-svn-id: http://skia.googlecode.com/svn/trunk@7023 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make all remaining effects use GrGLEffectMatrixGravatar bsalomon@google.com2012-11-02
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6817079 git-svn-id: http://skia.googlecode.com/svn/trunk@6286 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace GrMatrix with SkMatrix.Gravatar bsalomon@google.com2012-11-01
| | | | | | Review URL: https://codereview.appspot.com/6814067 git-svn-id: http://skia.googlecode.com/svn/trunk@6247 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reland r6233 with fix.Gravatar bsalomon@google.com2012-11-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6241 2bbb7eff-a529-9590-31e7-b0007b416f81
* Re-revert r6233.Gravatar bsalomon@google.com2012-11-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6239 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reland r6233 with fix for config conversion texture matrices.Gravatar bsalomon@google.com2012-11-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6238 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r6233 while investigating bot failures.Gravatar bsalomon@google.com2012-11-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6235 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checkpoint in moving texture matrices out of GrGLProgram and into GrGLEffect.Gravatar bsalomon@google.com2012-11-01
| | | | | | Review URL: https://codereview.appspot.com/6818064 git-svn-id: http://skia.googlecode.com/svn/trunk@6233 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename GrProgramStageFactory to GrBackendEffectFactory.Gravatar bsalomon@google.com2012-10-25
| | | | | | Review URL: https://codereview.appspot.com/6773044 git-svn-id: http://skia.googlecode.com/svn/trunk@6125 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrGLProgramStage Renaming Part 3Gravatar bsalomon@google.com2012-10-25
| | | | | | | | | | s/GLProgramStage/GLEffect minor whitespace/spelling fixup R=robertphillips@google.com Review URL: https://codereview.appspot.com/6767054 git-svn-id: http://skia.googlecode.com/svn/trunk@6095 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrCustomStage Renaming Part 3Gravatar bsalomon@google.com2012-10-24
| | | | | | | | | Rename all things *CUSTOM_STAGE*, customStage*, and other miscellany R=robertphillips@google.com Review URL: https://codereview.appspot.com/6769048 git-svn-id: http://skia.googlecode.com/svn/trunk@6081 2bbb7eff-a529-9590-31e7-b0007b416f81
* CustomStage Renaming Part 1Gravatar bsalomon@google.com2012-10-24
| | | | | | | | | | | | | | | | | | | Search and replace: GrCustomStage->GrEffect GrCustomStageTestFactory->GrEffectTestFactory renamed the cpp/h files from customStage->effect reordered gypi, #includes, forward decls to maintain alphabetical sort. manually fixed up some whitespace and linewraps deleted a commented out #include R=robertphillips@google.com Review URL: https://codereview.appspot.com/6758046 git-svn-id: http://skia.googlecode.com/svn/trunk@6076 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make numTextures() be non-virtual on GrCustomStage.Gravatar bsalomon@google.com2012-10-04
| | | | | | | R=tomhudson@google.com,robertphillips@google.com,senorblanco@chromium.org Review URL: https://codereview.appspot.com/6586081 git-svn-id: http://skia.googlecode.com/svn/trunk@5805 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move GrTextureParams from GrSamplerState to GrTextureAccessGravatar bsalomon@google.com2012-09-18
| | | | | | | | Review URL: https://codereview.appspot.com/6496135/ git-svn-id: http://skia.googlecode.com/svn/trunk@5582 2bbb7eff-a529-9590-31e7-b0007b416f81
* Wrap all GrCustomStage textures in GrTextureAccess, remove ↵Gravatar bsalomon@google.com2012-09-11
| | | | | | | | | | StageDesc::fInConfigFlags Review URL: https://codereview.appspot.com/6494114 git-svn-id: http://skia.googlecode.com/svn/trunk@5485 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add morphology, convolution, single texture, texture domain effects to new ↵Gravatar bsalomon@google.com2012-08-03
| | | | | | | | | | | unit test system Review URL: http://codereview.appspot.com/6442085/ git-svn-id: http://skia.googlecode.com/svn/trunk@4951 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create GL implementation for GrSingleTextureEffect, use it instead of ↵Gravatar tomhudson@google.com2012-07-19
| | | | | | | | | | | | GrPaint::setTexture() or GrDrawState::setTexture() in GrContext.cpp http://codereview.appspot.com/6399053/ git-svn-id: http://skia.googlecode.com/svn/trunk@4677 2bbb7eff-a529-9590-31e7-b0007b416f81
* Introduces new SingleTextureEffect base class for GrCustomStage objects.Gravatar tomhudson@google.com2012-07-12
This class tracks the texture that the object uses. A future commit will get rid of the GrTexture pointer currenty stored in the GrDrawState, allowing us to have CustomStages *without* textures. Requires gyp change on next roll. http://codereview.appspot.com/6306097/ git-svn-id: http://skia.googlecode.com/svn/trunk@4576 2bbb7eff-a529-9590-31e7-b0007b416f81