[Webkit-unassigned] [Bug 105300] [Skia] Animated transformations on bitmap images shake

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 19 05:51:36 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=105300





--- Comment #7 from Florin Malita <fmalita at chromium.org>  2012-12-19 05:53:52 PST ---
(In reply to comment #4)
> Looks like the issue is constrained to Skia-backed platforms (not CG / iOS). ImageSkia's RESAMPLE_AWESOME clamps to integer boundaries which is great for beautiful static images but not that awesome for animations (see http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp#L268). Forcing linear resampling fixes this and the bouncing goes away.
> 
> A couple ideas:
> 1) Add an additional resampling parameter to GraphicsContext::drawImage so we would have something like LOW (nearestneighbor), DEFAULT (linear), and STATIC_HIGH (bilinear awesome).
> 2) Only RESAMPLE_AWESOME for identity matrices (alternatively, only for integer scales or translates). I have a simple patch to do this but the problem will still exist for animations of width/height.
> 
> @fmalita, @schenney, opinions here?

We're already limiting RESAMPLE_AWESOME to scaling/translation matrices. I guess we could limit it further to identity-only but that would diminish its awesomeness :)

I don't think making it dependent on integer scales/translations would be good though - switching between different interpolation methods during animation as we're hitting integer values is going to look much worse than what's going on now.

Maybe there's a way to pass back clamping info and adjust the sizing/position to compensate with subpixel positioning?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list