|
Erode and dilate effects, CPU and GPU implementations.
The GPU implementation behaves like a filtering mode, and re-uses the kernelWidth parameter from the convolution shader. The convolution was also refactored to remove imageIncrement from GrContext, replace it with a FilterDirection (also used by the morphology), and push imageIncrement computation down to GrGpuGLShaders.
On the CPU side, SkMorphologyImageFilter is an abstract base class, with SkErodeImageFilter and SkDilateImageFilter derived from it. The software implementation is fairly straightforward, with a two-pass separable process like the GPU side.
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+671 lines, -74 lines) |
Patch |
|
A |
gm/morphology.cpp
|
View
|
1
|
1 chunk |
+95 lines, -0 lines |
0 comments
|
Download
|
|
M |
gyp/effects.gyp
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
gyp/gmslides.gypi
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
include/core/SkImageFilter.h
|
View
|
1
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
|
A |
include/effects/SkMorphologyImageFilter.h
|
View
|
1
|
1 chunk |
+65 lines, -0 lines |
0 comments
|
Download
|
|
M |
include/gpu/GrContext.h
|
View
|
1
|
2 chunks |
+16 lines, -19 lines |
0 comments
|
Download
|
|
M |
include/gpu/GrSamplerState.h
|
View
|
1
2
|
7 chunks |
+48 lines, -23 lines |
0 comments
|
Download
|
|
M |
src/core/SkPaint.cpp
|
View
|
1
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/effects/SkMorphologyImageFilter.cpp
|
View
|
1
2
3
|
1 chunk |
+221 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/GrContext.cpp
|
View
|
1
|
2 chunks |
+28 lines, -25 lines |
0 comments
|
Download
|
|
M |
src/gpu/SkGpuDevice.cpp
|
View
|
1
|
6 chunks |
+59 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLProgram.h
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLProgram.cpp
|
View
|
1
|
4 chunks |
+79 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGpuGL.cpp
|
View
|
1
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGpuGLShaders.cpp
|
View
|
1
|
5 chunks |
+28 lines, -3 lines |
0 comments
|
Download
|
Total messages: 14
|