aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefiltersbase.cpp
Commit message (Collapse)AuthorAge
...
* Turn on quilt mode in DM.Gravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | | | | | | | | | - Rename TileGrid -> Quilt to avoid the name overload. - Tag all failing GMs with kSkipTiled_Flag. You may be wondering, do any GMs pass? Yes, some do! And that trends towards all of them as we increase --quiltTile. Two GMs only fail in --quilt mode in 565. Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.) BUG=skia:2477 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/256373002 git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement intra-frame cacheing in image filters.Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When image filters are processed within Skia, they simply do a blind recursion. This has the side-effect of turning the DAG into a tree. I.e., nodes visited more than once during the traversal will be processed more than once. This change implements a very simple cacheing scheme: a cache is created before traversing the DAG, and handed into the processing traversal. Before recursing into a child in SkImageFilter::filterImage(), the cache is checked for a hit, and early-out is performed. Otherwise, the node is processed, and its result bitmap and location (offset) are cached, but only if it contains two or more children and thus will be visited again during the traversal. Currently, the child count is approximated with the refcount. This is good enough in most cases (and exactly correct for the Chrome use case). We could add an exact child count to the image filter, but this will require violating the immutability of image filters slightly in order to bump the child count as nodes are connected. I leave it up to the reviewer to decide which is better. R=reed@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/230653005 git-svn-id: http://skia.googlecode.com/svn/trunk@14160 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement support for a Context parameter in image filtersGravatar senorblanco@chromium.org2014-03-14
| | | | | | | | | | | | | | | Some upcoming work (support for expanding crop rects) requires the clip bounds to be available during filter traversal. This change replaces the SkMatrix parameter in the onFilterImage() traversals with a Context parameter. It contains the CTM, as well as the clip bounds. BUG=skia: R=reed@google.com Review URL: https://codereview.chromium.org/189913021 git-svn-id: http://skia.googlecode.com/svn/trunk@13803 2bbb7eff-a529-9590-31e7-b0007b416f81
* Factory methods for heap-allocated SkImageFilter objects.Gravatar commit-bot@chromium.org2014-03-10
| | | | | | | | | | | | | | | | | | This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkImageFilter and its subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep constructor of publicly visible classes public behind a flag. BUG=skia:2187 R=scroggo@google.com, mtklein@chromium.org, reed@google.com, senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com, sugoi@chromium.org, zork@chromium.org Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/182983003 git-svn-id: http://skia.googlecode.com/svn/trunk@13718 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkImageFilter methods const.Gravatar commit-bot@chromium.org2014-02-05
| | | | | | | | | | | | | | SkImageFilter had some non-const methods that could all be made const. This is a first step towards making SkImageFilter immutable. BUG=skia:2097 R=mtklein@google.com, reed@google.com, robertphillips@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/148883011 git-svn-id: http://skia.googlecode.com/svn/trunk@13330 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor read and write buffers.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer a step each in the hierarchy. What used to be this: SkFlattenableWriteBuffer -> SkOrderedWriteBuffer SkFlattenableReadBuffer -> SkOrderedReadBuffer SkFlattenableReadBuffer -> SkValidatingReadBuffer is now SkWriteBuffer SkReadBuffer -> SkValidatingReadBuffer Benefits: - code is simpler, names are less wordy - the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed - write buffers are completely devirtualized, important for record speed This refactoring was mostly mechanical. You aren't going to find anything interesting in files with less than 10 lines changed. BUG=skia: R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/134163010 git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
* add legacy/helper allocN32Pixels, and convert gm to use itGravatar reed@google.com2014-01-25
| | | | | | | | | | | | This is an intermediate api, but might help us quickly get to a point where no one is creating bitmaps in a 2-step process (setConfig + alloc). BUG=skia: R=halcanary@google.com Review URL: https://codereview.chromium.org/140593005 git-svn-id: http://skia.googlecode.com/svn/trunk@13182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding more validationGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | | | | | | - Added a way to check that the number of inputs of a filter is not more than a filter expects - Added validation of reftype in SkBitmap::unflatten() - Added validation on fKD (diffuse lighting constant) and fKS (specular lighting constant) to make sure that they are always non-negative numbers - Added validation of SkPerlinNoiseShader::fType and SkPerlinNoiseShader::fNumOctaves BUG= R=reed@google.com, senorblanco@google.com, mtklein@google.com, senorblanco@chromium.org, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/83343003 git-svn-id: http://skia.googlecode.com/svn/trunk@12388 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initial error handling codeGravatar commit-bot@chromium.org2013-10-23
| | | | | | | | | | | | | | | | I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure. BUG= Committed: http://code.google.com/p/skia/source/detail?r=11247 R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/23021015 git-svn-id: http://skia.googlecode.com/svn/trunk@11922 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstreaming DropShadowImageFilter into skia, from BlinkGravatar junov@chromium.org2013-08-07
| | | | | | | | | | | | GM imagefiltersbase will need rebaselining after this change R=senorblanco@chromium.org Committed: https://code.google.com/p/skia/source/detail?r=10583 Review URL: https://codereview.chromium.org/22258005 git-svn-id: http://skia.googlecode.com/svn/trunk@10626 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r10583: Upstreaming DropShadowImageFilter into skia, from BlinkGravatar jvanverth@google.com2013-08-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10587 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstreaming DropShadowImageFilter into skia, from BlinkGravatar junov@chromium.org2013-08-06
| | | | | | | | | | GM imagefiltersbase will need rebaselining after this change R=senorblanco@chromium.org Review URL: https://codereview.chromium.org/22258005 git-svn-id: http://skia.googlecode.com/svn/trunk@10583 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Changing imageFilter GM tests to use drawBitmap instead of drawSpriteGravatar junov@chromium.org2013-01-14
| | | | | | | The motivation is be able to test the filters with scaled SkPicture playback in isolation from the issues that surround usage of drawSprite Review URL: https://codereview.appspot.com/7060071 git-svn-id: http://skia.googlecode.com/svn/trunk@7152 2bbb7eff-a529-9590-31e7-b0007b416f81
* Defining new color constat for transparent colorGravatar junov@google.com2012-12-06
| | | | | | Review URL: https://codereview.appspot.com/6901044 git-svn-id: http://skia.googlecode.com/svn/trunk@6696 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a factory Create function for SkColorFilterImageFilter, and move the ↵Gravatar senorblanco@chromium.org2012-10-26
| | | | | | | | matrix optimization there. This will allow the Chrome compositor to extract the optimized matrix, and potentially apply the color matrix itself, saving a buffer allocation & draw. Review URL: https://codereview.appspot.com/6739057 git-svn-id: http://skia.googlecode.com/svn/trunk@6152 2bbb7eff-a529-9590-31e7-b0007b416f81
* This patch implements generalized DAG connectivity for SkImageFilter. ↵Gravatar senorblanco@chromium.org2012-10-10
| | | | | | | | | | SkImageFilter maintains a list of inputs, which can be constructed either from a SkImageFilter** or zero or more SkImageFilter* arguments (varargs). Existing filters which maintained their own filter connectivity were refactored to use the new constructors and flattening/unflattening code. Modifying the remaining filters which are not yet DAG-friendly is left for future work; they are considered to have zero inputs for now. Review URL: https://codereview.appspot.com/6443119 git-svn-id: http://skia.googlecode.com/svn/trunk@5891 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 II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkColorFilterImageFilter into its own file.Gravatar senorblanco@chromium.org2012-08-20
| | | | | | | | Review URL: https://codereview.appspot.com/6463072/ git-svn-id: http://skia.googlecode.com/svn/trunk@5197 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't leak filtersGravatar reed@google.com2012-06-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4358 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create macro for registering classes for deserializationGravatar djsollen@google.com2012-03-26
| | | | | | Review URL: https://codereview.appspot.com/5909063 git-svn-id: http://skia.googlecode.com/svn/trunk@3494 2bbb7eff-a529-9590-31e7-b0007b416f81
* apply imagefilter to all draw callsGravatar reed@google.com2012-03-23
Review URL: https://codereview.appspot.com/5856048 git-svn-id: http://skia.googlecode.com/svn/trunk@3476 2bbb7eff-a529-9590-31e7-b0007b416f81