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(). #
MessagesTotal messages: 16
|