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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 19 08:38:05 PST 2012


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





--- Comment #9 from Stephen White <senorblanco at chromium.org>  2012-12-19 08:40:21 PST ---
(In reply to comment #8)
> (In reply to comment #6)
> > One typical way to solve this is to use fast and dirty resampling while moving and then clean it up when static. I doubt that's practical here, as we would have to detect and redraw the last frame of an animation.
> 
> Wouldn't we have the same issue when animating with JS? There's no way to really know when the image turns static (if at all).

Regular DOM content uses the timer-based resize which animates using bilinear and switches to Lanczos when the animation is complete, as Stephen C describes.  Take a look at the ImageQualityController in RenderBoxModelObject.cpp.  The basic algorithm is: 

1)  When an object is first resized, use high-quality resampling, stash the RBMO in a hash table and set a 500ms timer.
2)  If another resize request for the same object comes in before the timer expires, it's considered to be animating, and drawn using bilinear.  The timer is kicked forward.
3)  When the timer expires without further resize requests, all hashed objects are redrawn using Lanczos.

Not sure if SVG can use this directly, but perhaps it could do something similar.

-- 
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