History log of /external/skia/gm/imagefiltersgraph.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
48e78468f5f6b900d476e616bdb1ba457c8f0b2a 17-Feb-2016 robertphillips <robertphillips@google.com> Mark existing image filter entry points that will be going away with Deprecated
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709753002

Review URL: https://codereview.chromium.org/1709753002
/external/skia/gm/imagefiltersgraph.cpp
eae84c2e0e2126374cd488a1c8a3e18169145635 26-Jan-2016 senorblanco <senorblanco@chromium.org> Image filters: fix srcOffset handling in asFragmentProcessor() path.

Filters such as SkMatrixConvolutionImageFilter which use the
asFragmentProcessor() path were not correctly handling srcOffset.
It is correctly applied to the bounds, but the srcRect and dstRect
were computed from the pre-offset bounds.

The fix is to move them to just above where they're used in drawing.

Note: this change adds a new test case to the imagefiltersgraph GM,
so it will have to be rebaselined post-landing.

BUG=skia:4855
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1637443003

Review URL: https://codereview.chromium.org/1637443003
/external/skia/gm/imagefiltersgraph.cpp
5e1ddb108638d1d51a3940fcae1dd23adc5ac53b 21-Dec-2015 reed <reed@chromium.org> Reland of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1540203002/ )

Reason for revert:
chrome changes have landed

Original issue's description:
> Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )
>
> Reason for revert:
> need to update some chrome/blink call-sites
>
> Original issue's description:
> > change all factories to return their base-class
> >
> > will watch DEPS roll to see if there are chrome sites needing updates
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
> >
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2d6ba6690f8951e152d8e793191b14afd52f5506

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1533373002
/external/skia/gm/imagefiltersgraph.cpp
2d6ba6690f8951e152d8e793191b14afd52f5506 21-Dec-2015 reed <reed@chromium.org> Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )

Reason for revert:
need to update some chrome/blink call-sites

Original issue's description:
> change all factories to return their base-class
>
> will watch DEPS roll to see if there are chrome sites needing updates
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1540203002
/external/skia/gm/imagefiltersgraph.cpp
d63f60a36327e9580861205ebb35cade8c49bd34 21-Dec-2015 reed <reed@chromium.org> change all factories to return their base-class

will watch DEPS roll to see if there are chrome sites needing updates

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002

TBR=

Review URL: https://codereview.chromium.org/1535353002
/external/skia/gm/imagefiltersgraph.cpp
b9519f86bbce946e505980a4fa950fdc4bcf74ab 15-Oct-2015 senorblanco <senorblanco@chromium.org> Image Filters: refactor all CPU input processing into a filterInput helper function.

No change in behaviour; this is a straight refactoring.

BUG=skia:3194

Review URL: https://codereview.chromium.org/1404743005
/external/skia/gm/imagefiltersgraph.cpp
5598b63cd2443a608a74a222d0206bb2455383b7 15-Sep-2015 fmalita <fmalita@chromium.org> Convert unit tests, GMs from SkBitmapSource to SkImagesource

This removes SkBitmapSource clients within Skia.

http://crrev.com/1334173004 does the same for Blink, so we should be
able to remove SkBitmapSource in a follow-up.

R=reed@google.com,robertphillips@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1343123002
/external/skia/gm/imagefiltersgraph.cpp
943a462fef57832e2683894bb9f2f36ac25d98f7 03-Sep-2015 robertphillips <robertphillips@google.com> Minor code cleanup (left over from prior CL)

This was requested in https://codereview.chromium.org/1309543012/ (Add new GM to directly exercise perspective bitmap drawing)

Review URL: https://codereview.chromium.org/1320673011
/external/skia/gm/imagefiltersgraph.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/gm/imagefiltersgraph.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/gm/imagefiltersgraph.cpp
1818acb6a4b11cd9a1d44ce5dde77452502a9796 24-Jul-2015 caryclark <caryclark@google.com> rename portable_typeface_always to portable_typeface

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1257773002
/external/skia/gm/imagefiltersgraph.cpp
d2ce18520e9055884567c5c021a0c39aeadbe820 16-Jul-2015 caryclark <caryclark@google.com> make imagefilters* imagemagnifier imageresizetiled portable

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1238083004
/external/skia/gm/imagefiltersgraph.cpp
871ad7a13edbc0458e6a05c02697681857f97321 27-Mar-2015 mtklein <mtklein@chromium.org> Use a black background in imagefiltersgraph so 8888 and 565 look similar.

BUG=skia:

Review URL: https://codereview.chromium.org/1041773003
/external/skia/gm/imagefiltersgraph.cpp
36352bf5e38f45a70ee4f4fc132a38048d38206d 26-Mar-2015 mtklein <mtklein@chromium.org> C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}

NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
/external/skia/gm/imagefiltersgraph.cpp
1c4029296f518a84ef90095243ba210163a1e1f9 23-Jan-2015 mtklein <mtklein@chromium.org> remove unused GM flags

Depends on https://codereview.chromium.org/873753002/

Thumbs up to CLion for refactoring this for me.

BUG=skia:

Review URL: https://codereview.chromium.org/867963004
/external/skia/gm/imagefiltersgraph.cpp
72c9faab45124e08c85f70ca38536914862d947c 09-Jan-2015 mtklein <mtklein@chromium.org> Fix up all the easy virtual ... SK_OVERRIDE cases.

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
/external/skia/gm/imagefiltersgraph.cpp
f3f5bad7ded35265c0b5d042cc4174386b197a33 19-Dec-2014 robertphillips <robertphillips@google.com> Add toString methods to SkImageFilter-derived classes

This isn't definitive but at least makes something show up in the debugger.

Review URL: https://codereview.chromium.org/789163006
/external/skia/gm/imagefiltersgraph.cpp
3f3b3d003527861dc0bd89733857576408906431 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

Review URL: https://codereview.chromium.org/769953002
/external/skia/gm/imagefiltersgraph.cpp
6e78293ee896020104ffc4c23b565073e9a49893 01-Dec-2014 mtklein <mtklein@google.com> Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of https://codereview.chromium.org/769953002/)

Reason for revert:
Breaks canary builds. Will reland after the Chromium change lands.

Original issue's description:
> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.
>
> This was needed for pictures before v33, and we're now requiring v35+.
>
> Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/768183002
/external/skia/gm/imagefiltersgraph.cpp
52c293547b973f7fb5de3c83f5062b07d759ab88 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Review URL: https://codereview.chromium.org/769953002
/external/skia/gm/imagefiltersgraph.cpp
49f085dddff10473b6ebf832a974288300224e60 05-Sep-2014 bsalomon <bsalomon@google.com> "NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
/external/skia/gm/imagefiltersgraph.cpp
7daaaa4425ea083df437eea95ba6b38315ce98ad 21-Aug-2014 reed <reed@google.com> use globals to register custom effects

NOTREECHECKS=True
NOTRY=True
R=mtklein@google.com, caryclark@google.com, bungeman@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/498453003
/external/skia/gm/imagefiltersgraph.cpp
9fa60daad4d5f54c0dbe3dbcc7608a8f6d721187 21-Aug-2014 reed <reed@google.com> Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).

Refactoring pattern:

1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).

If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.

R=robertphillips@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org, sugoi@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/395603002
/external/skia/gm/imagefiltersgraph.cpp
992c7b03ef7914a18bfd78e965b0b4c99a5f5672 31-Jul-2014 Cary Clark <caryclark@google.com> Add standard fonts to all GMs.

Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

sk_tool_utils::set_portable_typeface or
sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

BUG=skia:2687
R=mtklein@google.com

Review URL: https://codereview.chromium.org/407183003
/external/skia/gm/imagefiltersgraph.cpp
9ea3d57fde28a5fe4487a111dc3dd49418235e5e 08-Jul-2014 senorblanco <senorblanco@chromium.org> Clean up SkImageFilter constructors.

Now that all creation of SkImageFilters goes through
factory Create() methods, there's no real reason for the
convenience constructors. Some SkImageFilter subclasses
which actually have zero DAG-able inputs were passing NULL
to the superclass constructor. This actually means 1 input,
with a NULL value, not zero inputs. This becomes more
relevant for the upcoming cache infrastructure, where this
indicates that the filter will use its src input, where in
fact some of these filters do not (they are image generators
only).

Limiting SkImageFilter to a single constructor resolves this
ambiguity.

Along the way, I removed all of the default parameters to
the constructors, since the Create methods always call them
with the full argument list.

BUG=skia:
R=reed@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/376953003
/external/skia/gm/imagefiltersgraph.cpp
60c8d24f84105dd341e36a7fc97e25f88ceef309 27-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove some unnecessary uses of SkOnce.

- gm/imagefiltersgraph.cpp can just use a global registrar
- SkScaledImageCache always accesses its global under a lock

BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/297273006

git-svn-id: http://skia.googlecode.com/svn/trunk@14897 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
a90c6803865766d28e92091f56f718f5e41fe80f 30-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Turn on quilt mode in DM.
- 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
/external/skia/gm/imagefiltersgraph.cpp
2077427227de9bf2627c819d82d2b951886796c8 18-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Put SimpleOffsetFilter on heap.

Effects want to live on the heap!

BUG=skia:
R=senorblanco@chromium.org, dominikg@chromium.org, scroggo@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/203273002

git-svn-id: http://skia.googlecode.com/svn/trunk@13848 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
118252962f89a80db661a0544f1bd61cbaab6321 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for expanding crop rects in image filters

NOTE: this patch set is based on https://codereview.chromium.org/189913021/,
and needs that patch to land first.

Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.

In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/.

Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().

BUG=skia:
R=bsalomon@google.com, reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=13805

Review URL: https://codereview.chromium.org/198003008

git-svn-id: http://skia.googlecode.com/svn/trunk@13809 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
29089179a66c06ef70da387111af75970f04ed53 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Implement support for expanding crop rects in image filters"

Breaking ImageFilterTests unit test.

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/196353021

git-svn-id: http://skia.googlecode.com/svn/trunk@13806 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
0ef0501baf615149d6d84398d7594cd89f6e928d 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for expanding crop rects in image filters

NOTE: this patch set is based on https://codereview.chromium.org/189913021/,
and needs that patch to land first.

Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.

In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/.

Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().

BUG=skia:
R=bsalomon@google.com, reed@google.com

Review URL: https://codereview.chromium.org/198003008

git-svn-id: http://skia.googlecode.com/svn/trunk@13805 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
4cb543d6057b692e1099e9f115155f0bf323a0c8 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for a Context parameter in image filters

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
/external/skia/gm/imagefiltersgraph.cpp
cac5fd597f6e2495f50aaa6bcbe3dadc56f0b977 10-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Factory methods for heap-allocated SkImageFilter objects.

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
/external/skia/gm/imagefiltersgraph.cpp
727a352f7412753d2a3e4d30eab6500a1a4de135 21-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Factory methods for heap-allocated SkColorFilter objects.

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 SkColorFilter 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@google.com, reed@google.com

Author: dominikg@chromium.org

Review URL: https://codereview.chromium.org/175293002

git-svn-id: http://skia.googlecode.com/svn/trunk@13539 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
c3bd8af6d5722e854feca70c40d92f4954c5b67b 13-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> add peekPixels to SkCanvas and SkSurface

fix reference to SkBaseDevice, which was only a problem in no-gpu build

This reverts commit 4fa44a6bf73891b21917fb90d02beef9143bffa3.

R=reed@google.com

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/163603003

git-svn-id: http://skia.googlecode.com/svn/trunk@13432 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
bda591c739001b41d77048d680f81e05723cbc05 13-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of add peekPixels to SkCanvas and SkSurface (https://codereview.chromium.org/161733002/)

Reason for revert:
compile issues with gm/xfermodes3

Original issue's description:
> add peekPixels to SkCanvas and SkSurface
>
> clone of https://codereview.chromium.org/159723006/
>
> Committed: https://code.google.com/p/skia/source/detail?r=13427

R=jvanverth@google.com
NOTREECHECKS=true
NOTRY=true

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/163823002

git-svn-id: http://skia.googlecode.com/svn/trunk@13428 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
b2d93a91222dac2edb3c19128fd58fa2e74272aa 13-Feb-2014 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> add peekPixels to SkCanvas and SkSurface

clone of https://codereview.chromium.org/159723006/

Review URL: https://codereview.chromium.org/161733002

git-svn-id: http://skia.googlecode.com/svn/trunk@13427 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
ae761f7545d8ebf181d220169afac2056b057b8c 05-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make SkImageFilter methods const.

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
/external/skia/gm/imagefiltersgraph.cpp
8b0e8ac5f582de80356019406e2975079bf0829d 30-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactor read and write buffers.

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
/external/skia/gm/imagefiltersgraph.cpp
eb9a46cbbb475e862a084aa2224ec18d4ac5e95b 25-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add legacy/helper allocN32Pixels, and convert gm to use it

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
/external/skia/gm/imagefiltersgraph.cpp
6776b82d466fa93ccffd251fdf556fe058395444 03-Jan-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make SkImageFilter crop rects relative to the primitive origin, instead of relative to their parent's crop rect. This is required by SVG semantics, and is more sane anyway.

To do this, this patch changes the "offset/loc" parameter in filterImage() / onFilterImage() from an inout-param to an out-param only, so that the calling filter can know how much the input filter wants its result offset (and doesn't include the original primitive position). This offset can then be applied to the current filter's crop rect. (I've renamed the parameter "offset" in all cases to make this clear.) This makes the call sites in SkCanvas/SkGpuDevice responsible for applying the resulting offset to the primitive's position, which is actually a fairly small change.

This change also fixes SkTileImageFilter and SkOffsetImageFilter to correctly handle an input offset, which they weren't before. This required modifying the GM's, since they assumed the broken behaviour.

NOTE: this will require rebaselining the imagefiltersgraph test, since it has a new test case.

NOTE: this will "break" the Blink layout tests css3/filters/effect-reference-subregion-chained-hw.html and css3/filters/effect-reference-subregion-hw.html, but it actually makes them give correct results. It should be suppressed on the skia roll, and I'll rebaseline it.

R=reed@google.com

Review URL: https://codereview.chromium.org/112803004

git-svn-id: http://skia.googlecode.com/svn/trunk@12895 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
ce33d60187718e7bb01944ee130c9f5d9fb335ec 25-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Adding more validation

- 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
/external/skia/gm/imagefiltersgraph.cpp
4b413c8bb123e42ca4b9c7bfa6bc2167283cb84c 25-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> remove SkFloatToScalar macro

BUG=
R=reed@google.com, djsollen@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/85463005

git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
6c4e71a5d65419c9978706081211dbe88e30e4b5 20-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove unnamed namespace usage from 'gm'.

Skia prefers static over unnamed namespaces.

BUG=None
TEST=None
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/79173002

git-svn-id: http://skia.googlecode.com/svn/trunk@12326 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
34a849d00dcaea94e257501dac086bd34a9f0ae7 24-Oct-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix drawBitmap() of scratch texture.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/40163004

git-svn-id: http://skia.googlecode.com/svn/trunk@11947 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
bbfe4541ef154696313374de2130b1ac90e28482 24-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Apply matrix early in draw bitmap

Committed: http://code.google.com/p/skia/source/detail?r=11930

Reverted: https://code.google.com/p/skia/source/detail?r=11932

R=robertphillips@google.com, senorblanco@chromium.org

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/30593003

git-svn-id: http://skia.googlecode.com/svn/trunk@11933 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
e9821871ecebbeed06aaef54741a71607ccc9720 24-Oct-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Apply matrix early in draw bitmap"

This reverts commit 4c446c8eb50b7a6e6f917fae7b4c4ffe5658a949.

Fix build.

git-svn-id: http://skia.googlecode.com/svn/trunk@11932 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
25e5a20e656a3d895753b61be3fc3645039c57ab 23-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Apply matrix early in draw bitmap

R=robertphillips@google.com, senorblanco@chromium.org

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/30593003

git-svn-id: http://skia.googlecode.com/svn/trunk@11930 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
1f2f338e23789f3eef168dcbd8171a28820ba6c1 29-Aug-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Split SkDevice into SkBaseDevice and SkBitmapDevice

https://codereview.chromium.org/22978012/



git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
9b051a375ba6d6b61cea98f35834cd032aaa5347 20-Aug-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready.



git-svn-id: http://skia.googlecode.com/svn/trunk@10835 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
3055b700189afdd02486ed8f2279cea1d8897243 20-Aug-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Split SkDevice out of SkBitmapDevice

https://codereview.chromium.org/22978012/



git-svn-id: http://skia.googlecode.com/svn/trunk@10830 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
350b4d50ea4a9a151d8049ad1d3f411bb2f2602f 01-Aug-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove SkBlendImageFilter, and all tests. Its functionality has been subsumed by SkXfermodeImageFilter.

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/21404002

git-svn-id: http://skia.googlecode.com/svn/trunk@10482 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
e16efc1882ab34a0bb3ae361a2d37f840044cf87 26-Jan-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
4a9a612b5200597cca0bda0a356250835cbdc7d6 04-Dec-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Pull SkMergeImageFilter out into its own file.

Review URL: https://codereview.appspot.com/6873052

git-svn-id: http://skia.googlecode.com/svn/trunk@6662 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
cd9f55989e680b7f52fa21766dde0ac67ac9911f 26-Oct-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add a factory Create function for SkColorFilterImageFilter, and move the 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
/external/skia/gm/imagefiltersgraph.cpp
985fa79141a82ec5e9bb5b01d9090aef76fac234 24-Oct-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Protect filter_texture() against render target change.
Fix blend filters when input textures are "sloppy" (approx scratch texture match)
Add a new test case to gm/imagefiltersgraph, and reduce its size.

NOTE: this will require new baselines for the imagefiltersgraph GM.

BUG=950

Review URL: https://codereview.appspot.com/6769043

git-svn-id: http://skia.googlecode.com/svn/trunk@6073 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
3961aac79ef9e9d20f279e4757fde730eff21f39 28-Aug-2012 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reenable pipe for imagefiltersgraph GM on Android.

This test was fixed with r5269.

Review URL: https://codereview.appspot.com/6490045

git-svn-id: http://skia.googlecode.com/svn/trunk@5324 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
ae933ce0ea5fd9d21cb6ef2cee7e729d32690aac 23-Aug-2012 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)

This CL is part III of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6475053

git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
44888c66d4bf03da58eb9fbd3db92eb477141aab 20-Aug-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Move SkColorFilterImageFilter into its own file.

Review URL: https://codereview.appspot.com/6463072/



git-svn-id: http://skia.googlecode.com/svn/trunk@5197 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
facc95a87b4247c53eeb7838dff9b02d60f29fa2 20-Aug-2012 scroggo <scroggo@2bbb7eff-a529-9590-31e7-b0007b416f81> Disable imagefiltersgraph from running through pipe on android

While we figure out what the problem is.
Review URL: https://codereview.appspot.com/6441164

git-svn-id: http://skia.googlecode.com/svn/trunk@5193 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp
f1369ce607adf55ffffe58fb93893bafb6ff6ebe 20-Aug-2012 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implements a new class, SkSingleInputImageFilter, to handle DAG connectivity
for filters with a single image input. This provides functionality to store,
flatten and unflatten a single SkImageFilter input, as well as to recursively
evaluate it on the CPU or GPU. The following classes were re-parented to
implement DAG connectivity: SkBlurImageFilter, SkDilateImageFilter,
SkErodeImageFilter, SkColorFilterImageFilter. The constructors for each
have been appended with a new parameter, representing the input filter
(default NULL).

This change also implements an arbitrary SkBitmap input source for filtering,
SkBitmapSource.

NOTE: This CL will require gyp file changes when rolling past this revision.

Review URL: https://codereview.appspot.com/6462071/



git-svn-id: http://skia.googlecode.com/svn/trunk@5170 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/imagefiltersgraph.cpp