Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(50)

Issue 6585069: GPU path for SkMatrixConvolutionImageFilter (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by Stephen White
Modified:
11 years, 11 months ago
Reviewers:
bsalomon, TomH
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This patch implements GPU processing for SkMatrixConvolutionImageFilter. All parameters from the raster path are supported. Note that the premultiplying is done less efficiently than in the raster path: it's done on each texture access, rather than as a pre-processing pass. This was so I could do the filter as a single custom stage; will try the optimization separately. Implementing the GPU path revealed a bug in the raster path: when not convolving alpha, the convolved RGB should be clamped to 255, not to the original alpha, since it will be remultiplied against original alpha anyway. In order to test this more thoroughly, I've added a gradient alpha to the source bitmap in the matrixconvolution GM, and added test cases for all the tiling modes in the !convolveAlpha case.

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix no-GPU build #

Patch Set 3 : add test; fix public/private/protected #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -7 lines) Patch
M gm/matrixconvolution.cpp View 3 chunks +16 lines, -6 lines 0 comments Download
M include/effects/SkMatrixConvolutionImageFilter.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 4 chunks +318 lines, -1 line 1 comment Download

Messages

Total messages: 7
Stephen White
11 years, 11 months ago (2012-10-03 16:56:11 UTC) #1
bsalomon
Can we add it to the unit test? (GR_DECLARE_CUSTOM_STAGE_TEST / GR_DEFINE_CUSTOM_STAGE_TEST) https://codereview.appspot.com/6585069/diff/1/src/effects/SkMatrixConvolutionImageFilter.cpp File src/effects/SkMatrixConvolutionImageFilter.cpp (right): ...
11 years, 11 months ago (2012-10-03 17:48:18 UTC) #2
Stephen White
Can we add it to the unit test? (GR_DECLARE_CUSTOM_STAGE_TEST /GR_DEFINE_CUSTOM_STAGE_TEST) Done. This revealed that I ...
11 years, 11 months ago (2012-10-04 13:55:22 UTC) #3
bsalomon
LGTM https://codereview.appspot.com/6585069/diff/9/src/effects/SkMatrixConvolutionImageFilter.cpp File src/effects/SkMatrixConvolutionImageFilter.cpp (right): https://codereview.appspot.com/6585069/diff/9/src/effects/SkMatrixConvolutionImageFilter.cpp#newcode414 src/effects/SkMatrixConvolutionImageFilter.cpp:414: } cool!
11 years, 11 months ago (2012-10-04 13:58:43 UTC) #4
TomH
On 2012/10/04 13:55:22, Stephen White wrote: > > Done. This revealed that I was using ...
11 years, 11 months ago (2012-10-04 14:04:55 UTC) #5
Stephen White
On 2012/10/04 14:04:55, TomH wrote: > On 2012/10/04 13:55:22, Stephen White wrote: > > > ...
11 years, 11 months ago (2012-10-04 14:08:34 UTC) #6
Stephen White
11 years, 11 months ago (2012-10-05 14:37:44 UTC) #7
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b