History log of /external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
29bee0fe657fabf7c396502b69c9167fba13eaaa 29-Apr-2015 egdaniel <egdaniel@google.com> Make XPFragmentBuilder only Builder with access to DstCopy.
Plus a bunch of renaming.

BUG=skia:

Review URL: https://codereview.chromium.org/1110033004
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
cfc18867d982119d9dc2888bf09f1093012daadd 28-Apr-2015 jvanverth <jvanverth@google.com> Use GLSLCaps for creating processor keys and GLSL-specific programs

Effectively all this does is future-proof any GLSL-specific code, as
GLSLCaps is just a typedef of GLCaps.

BUG=skia:

Review URL: https://codereview.chromium.org/1109863004
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
d0d37cace08f12abf8d316e6949e947551d418e6 02-Apr-2015 senorblanco <senorblanco@chromium.org> Implement approx-match support in image filter saveLayer() offscreen.

Currently, the GPU-side image filter implementation creates
exact-match textures for the offscreen backing stores for
saveLayer(). This is because several filters have GPU
implementations which depend on the texture coordinates
being 0..1.

The fix is three-fold:

1) Store the actual requested size in the SkGpuDevice, so
that when wrapping it in an SkBitmap for passing to
filterImage(), we can give it the original size.
2) Fix the filters (SkMagnifierImageFilter,
SkLightingImageFilter, SkMatrixConvolutionImageFilter,
SkMatrixImageFilter) whose GPU implementation depends on
0..1 texture coordinates.
3) Remove the exception for GPU-side image filters in
SkCanvas::internalSaveLayer().

For the lighting filters, there were two bugs which were
cancelling each other out: the sobel filter matrix was
being computed upside down, but then we'd negate the
resulting normal. This worked fine in the exact-match case,
but in the approx-match case we'd sample garbage along
the edge pixels. Also, we never implemented the edge pixels
according to spec in the GPU case. It requires a
different fragment shader for each edge of the nine-patch,
which meant we couldn't use asFragmentProcessor(), and had
to implement the drawing via a filterImageGPU() override.
In order to avoid polluting the public API, I inserted a
new base class, SkLightingImageFilterInternal above
Sk[Diffuse|Specular]LightingImageFilter to handle the
implementation.

For the SkMatrixConvolutionImageFilter, it seems the
GLSL clamp() function occasionally returns values outside
the clamped range, resulting in access of garbage
texels even in GL_NEAREST. The fix here is to clamp to a
rect inset by half a texel. There was also a bug in
the unpremultiply step when fConvolveAlpha is false.

For SkMatrixImageFilter, the fix was to make the generic
draw path be more careful about when to use texture domain.
If the bitmap already has a texture, use texture domain
if the srcRect is smaller than the entire texture (not
the entire bitmap).

N.B.: this change will cause some minor pixel diffs in the
GPU results of the following GMs (and possibly more):
matriximagefilter, matrixconvolution, imagefiltersscaled,
lighting, imagemagnifier, filterfastbounds,
complexclip_aa_Layer_invert, complexclip_aa_layer,
complexclip_bw_layer_invert, complexclip_bw_layer.

BUG=skia:3532

Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9

Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641

Committed: https://skia.googlesource.com/skia/+/46112cf2a7c7307f1c9eebb5f881cbda15aa460c

Review URL: https://codereview.chromium.org/1034733002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
82973dbf4f22928e8dd75c8bc5b155f842c8a557 02-Apr-2015 rmistry <rmistry@google.com> Revert of Implement approx-match support in image filter saveLayer() offscreen. (patchset #31 id:590001 of https://codereview.chromium.org/1034733002/)

Reason for revert:
Spoke to Stephen about this. Reverting because failing debug builds:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/51
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/54

Original issue's description:
> Implement approx-match support in image filter saveLayer() offscreen.
>
> Currently, the GPU-side image filter implementation creates
> exact-match textures for the offscreen backing stores for
> saveLayer(). This is because several filters have GPU
> implementations which depend on the texture coordinates
> being 0..1.
>
> The fix is three-fold:
>
> 1) Store the actual requested size in the SkGpuDevice, so
> that when wrapping it in an SkBitmap for passing to
> filterImage(), we can give it the original size.
> 2) Fix the filters (SkMagnifierImageFilter,
> SkLightingImageFilter, SkMatrixConvolutionImageFilter,
> SkMatrixImageFilter) whose GPU implementation depends on
> 0..1 texture coordinates.
> 3) Remove the exception for GPU-side image filters in
> SkCanvas::internalSaveLayer().
>
> For the lighting filters, there were two bugs which were
> cancelling each other out: the sobel filter matrix was
> being computed upside down, but then we'd negate the
> resulting normal. This worked fine in the exact-match case,
> but in the approx-match case we'd sample garbage along
> the edge pixels. Also, we never implemented the edge pixels
> according to spec in the GPU case. It requires a
> different fragment shader for each edge of the nine-patch,
> which meant we couldn't use asFragmentProcessor(), and had
> to implement the drawing via a filterImageGPU() override.
> In order to avoid polluting the public API, I inserted a
> new base class, SkLightingImageFilterInternal above
> Sk[Diffuse|Specular]LightingImageFilter to handle the
> implementation.
>
> For the SkMatrixConvolutionImageFilter, it seems the
> GLSL clamp() function occasionally returns values outside
> the clamped range, resulting in access of garbage
> texels even in GL_NEAREST. The fix here is to clamp to a
> rect inset by half a texel. There was also a bug in
> the unpremultiply step when fConvolveAlpha is false.
>
> For SkMatrixImageFilter, the fix was to make the generic
> draw path be more careful about when to use texture domain.
> If the bitmap already has a texture, use texture domain
> if the srcRect is smaller than the entire texture (not
> the entire bitmap).
>
> N.B.: this change will cause some minor pixel diffs in the
> GPU results of the following GMs (and possibly more):
> matriximagefilter, matrixconvolution, imagefiltersscaled,
> lighting, imagemagnifier, filterfastbounds,
> complexclip_aa_Layer_invert, complexclip_aa_layer,
> complexclip_bw_layer_invert, complexclip_bw_layer.
>
> BUG=skia:3532
>
> Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9
>
> Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641
>
> Committed: https://skia.googlesource.com/skia/+/46112cf2a7c7307f1c9eebb5f881cbda15aa460c

TBR=bsalomon@google.com,reed@chromium.org,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3532

Review URL: https://codereview.chromium.org/1057693002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
fd40a249d814c3ca990422348266662a1521fb45 02-Apr-2015 rmistry <rmistry@google.com> Revert of Fix GLSL error on Android. (patchset #2 id:20001 of https://codereview.chromium.org/1053873002/)

Reason for revert:
Spoke to Stephan about this. Reverting because failing debug builds:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/51
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/54

Original issue's description:
> Fix GLSL error on Android.
>
> BUG=skia:
> TBR=bsalomon
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/f90cd8e0e39af02c3826c80366efa3c06e88f642

TBR=bsalomon@google.com,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1056713002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
f90cd8e0e39af02c3826c80366efa3c06e88f642 02-Apr-2015 senorblanco <senorblanco@chromium.org> Fix GLSL error on Android.

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

Review URL: https://codereview.chromium.org/1053873002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
46112cf2a7c7307f1c9eebb5f881cbda15aa460c 01-Apr-2015 senorblanco <senorblanco@chromium.org> Implement approx-match support in image filter saveLayer() offscreen.

Currently, the GPU-side image filter implementation creates
exact-match textures for the offscreen backing stores for
saveLayer(). This is because several filters have GPU
implementations which depend on the texture coordinates
being 0..1.

The fix is three-fold:

1) Store the actual requested size in the SkGpuDevice, so
that when wrapping it in an SkBitmap for passing to
filterImage(), we can give it the original size.
2) Fix the filters (SkMagnifierImageFilter,
SkLightingImageFilter, SkMatrixConvolutionImageFilter,
SkMatrixImageFilter) whose GPU implementation depends on
0..1 texture coordinates.
3) Remove the exception for GPU-side image filters in
SkCanvas::internalSaveLayer().

For the lighting filters, there were two bugs which were
cancelling each other out: the sobel filter matrix was
being computed upside down, but then we'd negate the
resulting normal. This worked fine in the exact-match case,
but in the approx-match case we'd sample garbage along
the edge pixels. Also, we never implemented the edge pixels
according to spec in the GPU case. It requires a
different fragment shader for each edge of the nine-patch,
which meant we couldn't use asFragmentProcessor(), and had
to implement the drawing via a filterImageGPU() override.
In order to avoid polluting the public API, I inserted a
new base class, SkLightingImageFilterInternal above
Sk[Diffuse|Specular]LightingImageFilter to handle the
implementation.

For the SkMatrixConvolutionImageFilter, it seems the
GLSL clamp() function occasionally returns values outside
the clamped range, resulting in access of garbage
texels even in GL_NEAREST. The fix here is to clamp to a
rect inset by half a texel. There was also a bug in
the unpremultiply step when fConvolveAlpha is false.

For SkMatrixImageFilter, the fix was to make the generic
draw path be more careful about when to use texture domain.
If the bitmap already has a texture, use texture domain
if the srcRect is smaller than the entire texture (not
the entire bitmap).

N.B.: this change will cause some minor pixel diffs in the
GPU results of the following GMs (and possibly more):
matriximagefilter, matrixconvolution, imagefiltersscaled,
lighting, imagemagnifier, filterfastbounds,
complexclip_aa_Layer_invert, complexclip_aa_layer,
complexclip_bw_layer_invert, complexclip_bw_layer.

BUG=skia:3532

Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9

Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641

Review URL: https://codereview.chromium.org/1034733002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.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/src/gpu/effects/GrMatrixConvolutionEffect.cpp
2467d71346c66835daee5d51db9fcbb264cf637a 19-Jan-2015 cwallez <cwallez@google.com> Remove a few unused statements.

BUG=

Review URL: https://codereview.chromium.org/837643003
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.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/src/gpu/effects/GrMatrixConvolutionEffect.cpp
422f56f6e51c2f6a6ab425573b4d790f0157f883 09-Dec-2014 bsalomon <bsalomon@google.com> Make addUniform take a precision

Review URL: https://codereview.chromium.org/788733003
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
eb2a6761654307e8aeeeaabdd63c6bf9ab0411e9 04-Dec-2014 joshualitt <joshualitt@chromium.org> Remove backend factories

BUG=skia:

Review URL: https://codereview.chromium.org/778453002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
267ce482b54f46097584e0f9350ec74aa6a2cd44 25-Nov-2014 joshualitt <joshualitt@chromium.org> remove proc key

BUG=skia:

Review URL: https://codereview.chromium.org/755363002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
420d7e9a79358908850c74192b4949375563449a 16-Oct-2014 bsalomon <bsalomon@google.com> Auto-compare GrProcessors' texture accesses in isEqual().

R=joshualitt@google.com

Review URL: https://codereview.chromium.org/654313002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
0e08fc17e4718f7ce4e38f793695896473e96948 15-Oct-2014 bsalomon <bsalomon@google.com> Push isEqual/onIsEqual down from GrProcessor to subclasses.

R=joshualitt@google.com

Review URL: https://codereview.chromium.org/654273002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
ccb2e384a036f29d989d3c1468f879324e81a678 13-Oct-2014 egdaniel <egdaniel@google.com> Create helper functions to use in computeInvariantOutput calls

BUG=skia:

Review URL: https://codereview.chromium.org/643743003
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
1598899975ecc85b003a59740b588d1ddbcedb09 10-Oct-2014 joshualitt <joshualitt@chromium.org> FPs now use the correct builder types(just a rename)

BUG=skia:

Review URL: https://codereview.chromium.org/648463003
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
089f8de82d6c342faa9170d8c19d8504177bf5fb 09-Oct-2014 egdaniel <egdaniel@google.com> Remove tab parameter from GrGLSLMulVarBy4f function

With pretty printing of shader code, there is no longer a need to explictily
have tabs in our code.

BUG=skia:

Review URL: https://codereview.chromium.org/648463002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
b0a8a377f832c59cee939ad721e1f87d378b7142 23-Sep-2014 joshualitt <joshualitt@chromium.org> Patch to create a distinct geometry processor. The vast majority of this patch
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
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
49586bec7383d4ccb81f85f8e2dc4162e2d4f6a8 16-Sep-2014 joshualitt <joshualitt@chromium.org> removing GrDrawEffect

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e

R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/571163002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
08da4f22d790cfc51bbeb10b4b84dab49cf0eaec 16-Sep-2014 joshualitt <joshualitt@chromium.org> Revert of removing GrDrawEffect (patchset #4 id:60001 of https://codereview.chromium.org/571163002/)

Reason for revert:
reverting to unblock another revert

Original issue's description:
> removing GrDrawEffect
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/577593003
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e 16-Sep-2014 joshualitt <joshualitt@chromium.org> removing GrDrawEffect

BUG=skia:
R=bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/571163002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
6267f81f3d60ce144ab2b09ea369420984d5c9d9 30-Aug-2014 bsalomon <bsalomon@google.com> Move MakeDivByTextureWHMatrix to GrCoordTransform

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/522873005
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
30ba436f04e61d4505fb854d5fc56079636e0788 22-Aug-2014 joshualitt <joshualitt@chromium.org> Initial refactor of shaderbuilder to prepare for geometry shaders

gitignore for eclipse

BUG=skia:
R=bsalomon@google.com, bsalomon@chromium.org

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/491673002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
5acfea789d39106dbc706c6ee85cd8f027fce3ed 11-Aug-2014 joshualitt <joshualitt@chromium.org> 2D kernel initial wiring for Guassian

BUG=skia:
R=senorblanco@chromium.org, bsalomon@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/418223009
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
7510b224e52b9518a8ddf7418db0e9c258f79539 30-Jul-2014 kkinnunen <kkinnunen@nvidia.com> Rename GrGLUniformManager to GrGLProgramDataManager

Rename GrGLUniformManager to GrGLProgramDataManager in anticipation that the
class would be used to manage shader resources that are not uniforms.

This is needed in order to implement NVPR on GLES.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/365853002
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
5ae5fc59b27a48711e514b3ede548b228e393e9b 29-Jul-2014 joshualitt <joshualitt@chromium.org> Adding repeat mode to texture domain

BUG=skia:
R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com, junov@chromium.org

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/422123003
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp
ac9779234ef7a8cf3d791ab7690ef8c388662836 22-Jul-2014 joshualitt <joshualitt@chromium.org> Initial change to move 2D kernel to its own file.

BUG=skia:
R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/379253003
/external/skia/src/gpu/effects/GrMatrixConvolutionEffect.cpp