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

Issue 7033049: Implement a bicubic resampling image filter, with raster and GPU backends. (Closed)

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

Description

(Relanding r7275 with assert fix, plus fixes from r7276, r7280, r7283.) Implement a bicubic resampling image filter, with raster and GPU backends. In order to get this to work on the GPU side, I had to modify the width and height of the drawn texture in drawSprite() and drawDevice() to use the filtered texture's dimensions, instead of the source texture. (This wasn't a problem before since all other image filters produce results the same dimensions as their input texture.) For now, this implementation only does axis-aligned scaling (same as the Lanczos-3 implementation in Chrome). It's also done for correctness and clarity, not speed, so there are lots of opportunities for speedups. Committed: https://code.google.com/p/skia/source/detail?r=7275 Committed: https://code.google.com/p/skia/source/detail?r=7287

Patch Set 1 #

Patch Set 2 : Fix serialization; move mitchell filter into a factory fn. #

Total comments: 1

Patch Set 3 : Rename onFilterImageGPU -> filterImageGPU(). #

Patch Set 4 : Switch to new TestCreate semantics. Use drawBitmap() instead of drawSprite(). Update to ToT. #

Patch Set 5 : Update to ToT; implement onIsEqual() and getConstantColorComponents(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+513 lines, -4 lines) Patch
A gm/bicubicfilter.cpp View 1 2 3 1 chunk +84 lines, -0 lines 0 comments Download
M gyp/effects.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M gyp/gmslides.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A include/effects/SkBicubicImageFilter.h View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A src/effects/SkBicubicImageFilter.cpp View 1 2 3 4 1 chunk +362 lines, -0 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 3 chunks +8 lines, -4 lines 0 comments Download
M src/ports/SkGlobalInitialization_default.cpp View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16
Stephen White
Mike, Brian: Ping?
11 years, 3 months ago (2013-01-08 23:20:43 UTC) #1
reed1
+humper Is there a target use for this right now, or is it just experimental? ...
11 years, 3 months ago (2013-01-09 13:25:36 UTC) #2
Stephen White
On 2013/01/09 13:25:36, reed1 wrote: > +humper > > Is there a target use for ...
11 years, 3 months ago (2013-01-09 17:22:47 UTC) #3
bsalomon
If in practice we would always use Mitchell would it make sense to have the ...
11 years, 3 months ago (2013-01-09 17:57:55 UTC) #4
reed1
If it can be used to improve the existing GPU blur code, then that sounds ...
11 years, 3 months ago (2013-01-09 18:11:43 UTC) #5
Stephen White
On 2013/01/09 18:11:43, reed1 wrote: > If it can be used to improve the existing ...
11 years, 3 months ago (2013-01-09 21:12:24 UTC) #6
Stephen White
On 2013/01/09 17:57:55, bsalomon wrote: > If in practice we would always use Mitchell would ...
11 years, 3 months ago (2013-01-09 21:18:18 UTC) #7
bsalomon
https://codereview.appspot.com/7033049/diff/2001/src/gpu/SkGpuDevice.cpp#newcode1497 > > src/gpu/SkGpuDevice.cpp:1497: w = filteredTexture->width(); > > Does this mean that any size ...
11 years, 3 months ago (2013-01-09 21:44:09 UTC) #8
Stephen White
On 2013/01/09 21:44:09, bsalomon wrote: > https://codereview.appspot.com/7033049/diff/2001/src/gpu/SkGpuDevice.cpp#newcode1497 > > > src/gpu/SkGpuDevice.cpp:1497: w = filteredTexture->width(); > ...
11 years, 3 months ago (2013-01-10 17:26:53 UTC) #9
reed1
On 2013/01/10 17:26:53, Stephen White wrote: > On 2013/01/09 21:44:09, bsalomon wrote: > > > ...
11 years, 3 months ago (2013-01-10 18:50:45 UTC) #10
Stephen White
On 2013/01/10 18:50:45, reed1 wrote: > On 2013/01/10 17:26:53, Stephen White wrote: > > On ...
11 years, 3 months ago (2013-01-10 19:25:12 UTC) #11
reed1
Can't we already efficiently return a subset of an existing bitmap, via extract-subset? I don't ...
11 years, 3 months ago (2013-01-10 19:34:11 UTC) #12
bsalomon
On 2013/01/10 19:34:11, reed1 wrote: > Can't we already efficiently return a subset of an ...
11 years, 3 months ago (2013-01-10 19:41:57 UTC) #13
Stephen White
On 2013/01/10 19:41:57, bsalomon wrote: > On 2013/01/10 19:34:11, reed1 wrote: > > Can't we ...
11 years, 3 months ago (2013-01-10 23:23:34 UTC) #14
Stephen White
I've logged https://code.google.com/p/skia/issues/detail?id=1055 for the API differences between filterImageGPU() and onFilterImage(). Since this filter doesn't ...
11 years, 3 months ago (2013-01-11 15:42:21 UTC) #15
bsalomon
11 years, 3 months ago (2013-01-11 16:04:35 UTC) #16
On 2013/01/11 15:42:21, Stephen White wrote:
> I've logged https://code.google.com/p/skia/issues/detail?id=1055 for the API
> differences between filterImageGPU() and onFilterImage().
> 
> Since this filter doesn't need either subpixel or pixel-based offsets, I think
> we can leave those questions aside for now.
> 
> Are there any other issues you guys would like to see addressed before this
> lands?

lgtm
Sign in to reply to this message.

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