[Webkit-unassigned] [Bug 72073] [Skia] Computing the resampling mode ignores scale applied to the canvas

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 11 18:52:43 PST 2011


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





--- Comment #5 from Daniel Sievers <sievers at chromium.org>  2011-11-11 18:52:43 PST ---
(In reply to comment #4)
> (From update of attachment 114597 [details])
> I'm not sure about this change.  Checking the affine mask means the mapping won't be done when a bitmap is rotated.  Could this mean that an object would switch from high to low quality as it falls in and out of the zero rotation position?


Yes, but that is already the case now whenever we hit the cached awesome sampling path. (Probably more likely from high to bilinear rather than low.)

Are you suggesting we should allow awesome filtering with all rotations or multiples of 90 degrees only? It's probably a bit tricky and would require rewriting drawResampledBitmap() to handle this by transforming the dimensions only in this case etc.


> 
> Also, the check should probably be done in computeResamplingMode itself, and we just pass in the canvas matrix, so that it applies to patterns as well as images.  Also, there is already a check for the perspective flag in computeResamplingMode, so this change should probably be unified with that check somehow.  I must admit that this logic is already getting so complex that I'm loathe to add more complexity to it.


Hrm, this doesn't affect tiles/drawPattern, because the canvas scale is applied at the very end, right? I.e. we would only sample and cache one tile.

I think the current bug/flaw is in the mismatch of how computeResamplingMode() is used in paintSkBitmap() (not incorporating canvas scale) vs. what drawResampledBitmap() does (incorporate canvas scale). It calculates the wrong mode for what it ends up scaling.

Question about drawPattern(): Is patternTransform in that routine always going to be a pure scale/translate transform? I'm not sure I believe the way it undoes the scale in that routine (matrix.setScaleX(SkIntToScalar(1)) works if there is also a rotation or skew.

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