aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkTableColorFilter.cpp
Commit message (Collapse)AuthorAge
* Fixed more fuzzer issuesGravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | | | | - Added the "isAvailable" function to check how much bytes are remaining in the stream before doing potentially large mallocs. That way, we can signal a bad stream instead of crashing. - Added data validation in SkImageInfo.cpp - Added NULL pointer check in displacement - Modified the fuzzer for randomized bitmap types BUG=328934,329254 R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/116773002 git-svn-id: http://skia.googlecode.com/svn/trunk@12723 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding size parameter to read array functionsGravatar commit-bot@chromium.org2013-10-31
| | | | | | | | | | | | | | | | | | | In some cases, the allocated array into which the data will be read is using getArrayCount() to allocate itself, which should be safe, but some cases use fixed length arrays or compute the array size before reading, which could overflow if the stream is compromised. To prevent that from happening, I added a check that will verify that the number of bytes to read will not exceed the capacity of the input buffer argument passed to all the read...Array() functions. I chose to use the byte array for this initial version, so that "size" represents the same value across all read...Array() functions, but I could also use the element count, if it is preferred. Note : readPointArray and writePointArray are unused, so I could also remove them BUG= R=reed@google.com, mtklein@google.com, senorblanco@chromium.org Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/37803002 git-svn-id: http://skia.googlecode.com/svn/trunk@12058 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* Change old PRG to be SkLCGRandom; change new one to SkRandomGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | | | | | The goal here is to get people to start using the new random number generator, while leaving the old one in place so we don't have to rebaseline GMs. R=reed@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23576015 git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename ShaderType enum to ShaderVisibilityGravatar commit-bot@chromium.org2013-08-30
| | | | | | | | | | | | | | | | | | | | | Renames ShaderType in GrGLShaderBuilder to ShaderVisibility. It is now used solely as a bitfield. Methods that previously accepted a single ShaderType value are split into separate calls: - getShader -> vsGetShader, gsGetShader, fsGetShader - emiitFunction -> fsEmitFunction - appendTextureLookup -> fsAppendTextureLookup No change in functionality. This is a refactoring to allow us to separate the vertex/geometry and fragment parts of GrGLShaderBuilder. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://chromiumcodereview.appspot.com/23826002 git-svn-id: http://skia.googlecode.com/svn/trunk@11044 2bbb7eff-a529-9590-31e7-b0007b416f81
* check texture is not NULL to aovid segmentation fault. If the texture ↵Gravatar commit-bot@chromium.org2013-05-28
| | | | | | | | | | | | created by GrLockAndRefCachedBitmapTexture() is NULL, ColorTableEffect::Create will cause segmentation fault by GrAssert in src/gpu/GrTextureAccess.cpp. The simple patch checked texture to avoid segment fault, and returned a NULL effect to the caller. The caller will handle NULL effect, for example, it will set default effect. R=bsalomon@google.com, robertphillips@google.com Author: yunchao.he@intel.com Review URL: https://chromiumcodereview.appspot.com/15824003 git-svn-id: http://skia.googlecode.com/svn/trunk@9287 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add printing of SkColorFilter-derived classes to debuggerGravatar robertphillips@google.com2013-05-23
| | | | | | | | https://codereview.chromium.org/15697012/ git-svn-id: http://skia.googlecode.com/svn/trunk@9255 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
* Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.Gravatar bsalomon@google.com2013-03-25
| | | | | | | Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities. Review URL: https://codereview.chromium.org/12965018 git-svn-id: http://skia.googlecode.com/svn/trunk@8369 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
* Make GrGLEffects use an interface to append their code.Gravatar bsalomon@google.com2013-03-07
| | | | | | | A small step towards encapsulating GrGLShaderBuilder. Review URL: https://codereview.chromium.org/12547012 git-svn-id: http://skia.googlecode.com/svn/trunk@8018 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkMWRandom in GLPrograms test.Gravatar bsalomon@google.com2013-02-13
| | | | | | | R=jvanverth@google.com Review URL: https://codereview.appspot.com/7306097 git-svn-id: http://skia.googlecode.com/svn/trunk@7721 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make all GrContext members that return a texture also ref the texture for ↵Gravatar bsalomon@google.com2013-01-24
| | | | | | | | the caller. Review URL: https://codereview.appspot.com/7198049 git-svn-id: http://skia.googlecode.com/svn/trunk@7362 2bbb7eff-a529-9590-31e7-b0007b416f81
* Switch GrEffect::onIsEqual signature back to GrEffect from GrEffectRef.Gravatar bsalomon@google.com2013-01-22
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/7188046 git-svn-id: http://skia.googlecode.com/svn/trunk@7326 2bbb7eff-a529-9590-31e7-b0007b416f81
* Let them eat GrEffectRef.Gravatar bsalomon@google.com2013-01-22
| | | | | | | Changes the remaining existing code that operates on naked GrEffects to GrEffectRef. Review URL: https://codereview.appspot.com/7124058 git-svn-id: http://skia.googlecode.com/svn/trunk@7321 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
* Fix typo bug caught by mac warn-as-error (= should have been &=).Gravatar bsalomon@google.com2013-01-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7148 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
* fix warning from scalar --> int32 conversionGravatar humper@google.com2013-01-07
| | | | | | | | BUG= Review URL: https://codereview.appspot.com/7065050 git-svn-id: http://skia.googlecode.com/svn/trunk@7061 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make all colorfilter methods const, in preparation for declaring themGravatar reed@google.com2012-12-17
| | | | | | to be immutable and reentrant-safe git-svn-id: http://skia.googlecode.com/svn/trunk@6856 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
* Make morphology, convolution, and table color filter opt out of default ↵Gravatar bsalomon@google.com2012-11-02
| | | | | | | | texture matrices. Review URL: https://codereview.appspot.com/6817077 git-svn-id: http://skia.googlecode.com/svn/trunk@6280 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
* Make GrGLEffect::setData take GrEffectStage rather than GrEffect.Gravatar bsalomon@google.com2012-10-26
| | | | | | | | | This allows the coord-change matrix to be communicated to setData(). An accessor for this matrix is also added to GrEffectStage. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6779057 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6143 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 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
* 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 4Gravatar bsalomon@google.com2012-10-24
| | | | | | | Rename a bunch of things found by searching for "custom". Review URL: https://codereview.appspot.com/6765048 git-svn-id: http://skia.googlecode.com/svn/trunk@6085 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
* Reland r6330 thru r6333 but do without enabling ↵Gravatar bsalomon@google.com2012-10-23
| | | | | | GL_ARB_fragment_coord_conventions on Intel GPUs. git-svn-id: http://skia.googlecode.com/svn/trunk@6048 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r6330 thru 6333 while we figure out what to do about Intel bots ↵Gravatar bsalomon@google.com2012-10-22
| | | | | | (possible driver bug). git-svn-id: http://skia.googlecode.com/svn/trunk@6037 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove two params from GrGLProgramStage::setData that are no longer necessary.Gravatar bsalomon@google.com2012-10-22
| | | | | | | R=senorblanco@chromium.org Review URL: https://codereview.appspot.com/6744062 git-svn-id: http://skia.googlecode.com/svn/trunk@6031 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make table color filter use asNewCustomStage.Gravatar bsalomon@google.com2012-10-17
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6713051 git-svn-id: http://skia.googlecode.com/svn/trunk@5976 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update SkFlattenable buffers to be more modular.Gravatar djsollen@google.com2012-08-07
| | | | | | | | | | | | | | | | | This CL is an effort to stage the conversion to named parameters for all SkFlattenable commands. This particular stage only does the following two things... 1. Move flattenable buffers from SkFlattenable.h into their own header. 2. Update and Add new read write methods for better clarity and convenience. BUG= Review URL: https://codereview.appspot.com/6448095 git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkFilterShader into private headerGravatar reed@google.com2012-08-06
| | | | | | Review URL: https://codereview.appspot.com/6454107 git-svn-id: http://skia.googlecode.com/svn/trunk@4961 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix TableColorFilter memory leak.Gravatar tomhudson@google.com2012-07-24
| | | | | | | | http://codereview.appspot.com/6437045/ git-svn-id: http://skia.googlecode.com/svn/trunk@4733 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace new with SkNEW in more effects classes.Gravatar tomhudson@google.com2012-07-24
| | | | | | | | http://codereview.appspot.com/6431052/ git-svn-id: http://skia.googlecode.com/svn/trunk@4727 2bbb7eff-a529-9590-31e7-b0007b416f81