New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 1924 link

Starred by 7 users

Issue metadata

Status: Accepted
Area: ----
NextAction: ----
Priority: Medium
Type: Defect

Sign in to add a comment

The clipped-bitmap-shaders-* family of tests draw quite differently in GPU and CPU backends

Project Member Reported by, Dec 16 2013

Issue description

The GPU images are fuzzier while the CPU images have hard boundaries within the rendered bitmap. I'm not sure which is more correct. The CPU images jitter when zooming (using up/down arrow in SampleApp) while the GPU ones of smooth.
Project Member

Comment 1 by, Feb 19 2014

Hi Brian, are you still look at this issue? I simply investigated it. Found that: 
1) Only images with high-quality filters show difference. 
2) Only repeat tilemode(clipped-bitmap-shaders-tile-hq.png) show biggest difference both in pixels and perception in cpu and gpu backends. The other 2 tile modes(clamp and mirror) are different in pixels in raster vs gpu, while the perceptual difference is insignificant.

According to my observation, the perceptual difference is that: clipped-bitmap-shaders-tile-hq_8888.png has hard boundries, but clipped-bitmap-shaders-tile-hq_gpu.png is blurred. It is the same with yours.

I simply revised the gm cases, added low-quality filters, medium-quality filters, compared with the original images of no filters and high-quality filters. The images indicate that the cpu image is wrong. you can see these images below.
4.4 KB View Download
17.9 KB View Download
17.8 KB View Download
23.2 KB View Download
Project Member

Comment 2 by, Feb 19 2014

CPU images of low-quality filters, medium-quality filters are both fuzzier, while CPU image of high-quality filter has hard boundaries between each tile. GPU images of low-quality, medium-quality and high-quality filters are all fuzzier.

I will continue to investigate this issue if you are not work on it.
Project Member

Comment 3 by, Feb 20 2014

I am not looking into this.
Project Member

Comment 4 by, Feb 25 2014

Seems that SkResizeFilter::computeFilter written by @humper introduces the visual difference. This function resample the image for high-quality filter to improve the performance, but it confines interpolation within the src tile, making boundaries of dst tiles quite clear. As a result, the rendering result of raster for high-quality filter is not aligned with low-quality and middle-quality filters. Maybe Greg can fix this.
Project Member

Comment 5 by, Feb 25 2014

Thanks for tracking down the cause. Please assign me the bug and I'll take
a look next week.
Project Member

Comment 6 by, Jul 17 2014

looks like this got lost in the shuffle
Project Member

Comment 7 by, Oct 13 2014

Labels: Area-ImageFilter
Project Member

Comment 8 by, Dec 2 2014

Labels: -Area-ImageFilter
SkResizeFilter is not an SkImageFilter.
Project Member

Comment 9 by, Sep 5 2015


Sign in to add a comment