aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrSingleTextureEffect.cpp
Commit message (Collapse)AuthorAge
* Rename GrTextureParams to GrSamplerParamsGravatar Brian Salomon2016-11-17
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965 Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671 Reviewed-on: https://skia-review.googlesource.com/4965 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 option to make GrCoordTransforms apply to device positions.Gravatar Brian Salomon2016-10-03
| | | | | | | | | | | Adds a device space texture decal effect to use for clipping. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2870 Change-Id: Ifcc7617ea87f5a86e301995cba9dfc30a4b0e2c5 Reviewed-on: https://skia-review.googlesource.com/2870 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Introduce GrColorSpaceXform, for gamut conversion on texturesGravatar brianosman2016-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | GrTextureAccess optionally includes an instance, computed from the src and dst color spaces. In all common cases (no color space for either src or dst, or same color space for both), no object is allocated. This change is orthogonal to my attempts to get color space attached to render targets - regardless of how we choose to do that, this will give us the source color space at all points where we are connecting src to dst. There are many dangling injection points where I've been inserting nullptr, but I have a record of all of them. Additionally, there are now three places (the most common simple paths for bitmap/image rendering) where things are plumbed enough that I expect to have access to the dst color space (all marked with XFORMTODO). In addition to getting the dst color space, I need to inject shader code and uniform uploading for appendTextureLookup and friends. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154753003 Review-Url: https://codereview.chromium.org/2154753003
* Bye bye processor data manager.Gravatar bsalomon2015-10-06
| | | | Review URL: https://codereview.chromium.org/1388113002
* More threading of GrProcessorDataManagerGravatar joshualitt2015-07-09
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1230813003
* Use threshold of 1 texture coord value per pixel w/ nearest neighbor.Gravatar bsalomon2014-12-09
| | | | Review URL: https://codereview.chromium.org/787873002
* 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
* 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
* 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
* 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
* Remove default texture coords / texture matrixGravatar bsalomon@google.com2012-11-05
| | | | | | Review URL: https://codereview.appspot.com/6775100 git-svn-id: http://skia.googlecode.com/svn/trunk@6293 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
* Pass GrCustomStage to key-generation functions and emitCode().Gravatar bsalomon@google.com2012-10-29
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6819046 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make a bunch of GrGLEffects derive directly from GrGLEffect rather than ↵Gravatar bsalomon@google.com2012-10-26
| | | | | | | | GrGLLegacyEffect. Review URL: https://codereview.appspot.com/6783053 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6150 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename StageKey and related stuff.Gravatar bsalomon@google.com2012-10-25
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6785049 git-svn-id: http://skia.googlecode.com/svn/trunk@6130 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 2Gravatar bsalomon@google.com2012-10-25
| | | | | | | s/GrGLLegacyProgramStage/GrGLLegacyEffect Review URL: https://codereview.appspot.com/6761056 git-svn-id: http://skia.googlecode.com/svn/trunk@6091 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrGLProgramStage Renaming Part 1.Gravatar bsalomon@google.com2012-10-25
| | | | | | | | Renamed cpp and h s/GrGLProgramStage/GrGLEffect/ Review URL: https://codereview.appspot.com/6759054 git-svn-id: http://skia.googlecode.com/svn/trunk@6090 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrCustomStage Renaming Part 5Gravatar bsalomon@google.com2012-10-25
| | | | | | | | | Stuff found by searching for "stage". R=robertphillips@google.com Review URL: https://codereview.appspot.com/6772043 git-svn-id: http://skia.googlecode.com/svn/trunk@6089 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
* GrCustomStage Renaming Part 2Gravatar bsalomon@google.com2012-10-24
| | | | | | | | | GrSamplerState member rename GrCustomStageUnitTest rename some comment updates Review URL: https://codereview.appspot.com/6771043 git-svn-id: http://skia.googlecode.com/svn/trunk@6078 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
* Combine the emit functions in GrGLProgramStage.Gravatar bsalomon@google.com2012-10-23
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6741064 git-svn-id: http://skia.googlecode.com/svn/trunk@6057 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
* Introduce GrGLShaderBuilder::TextureSamplerGravatar bsalomon@google.com2012-09-06
| | | | | | | | Review URL: https://codereview.appspot.com/6495099/ git-svn-id: http://skia.googlecode.com/svn/trunk@5422 2bbb7eff-a529-9590-31e7-b0007b416f81
* Recommit r5350 with fix for image failures (which affected GLs that don't ↵Gravatar bsalomon@google.com2012-08-30
| | | | | | support ARB_texture_swizzle). git-svn-id: http://skia.googlecode.com/svn/trunk@5353 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 5350 while image changes are diagnosed.Gravatar bsalomon@google.com2012-08-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5351 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove fModulate from GrGLShaderBuilderGravatar bsalomon@google.com2012-08-30
| | | | | | | | | Review URL: https://codereview.appspot.com/6495051/ git-svn-id: http://skia.googlecode.com/svn/trunk@5350 2bbb7eff-a529-9590-31e7-b0007b416f81
* Some GrGLShaderBuilder cleanupGravatar bsalomon@google.com2012-08-28
| | | | | | | | Review URL: https://codereview.appspot.com/6500043/ git-svn-id: http://skia.googlecode.com/svn/trunk@5322 2bbb7eff-a529-9590-31e7-b0007b416f81
* Ensure that enums used by GrCustomStage TestCreate functions are declared in ↵Gravatar bsalomon@google.com2012-08-03
| | | | | | SK_ALLOW_GLOBAL_STATIC_INITIALIZERS=0 builds (e.g. android) git-svn-id: http://skia.googlecode.com/svn/trunk@4953 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
* Introduction of set of functions to manage generation of texture fetch ↵Gravatar twiz@google.com2012-08-02
| | | | | | | | | shader code. A new set of routines have been added to GrGLShaderBuilder to emit texture fetches, taking into consideration the format of the texture to be accessed, and the channel swizzle. Review URL: https://codereview.appspot.com/6446072 git-svn-id: http://skia.googlecode.com/svn/trunk@4919 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GL uniform managerGravatar bsalomon@google.com2012-07-25
| | | | | | | | Review URL: http://codereview.appspot.com/6423066/ git-svn-id: http://skia.googlecode.com/svn/trunk@4758 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