[Webkit-unassigned] [Bug 177037] "background-repeat: repeat" incompatible with "image-rendering: pixelated"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 21 07:07:04 PDT 2017


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

Zhifei Fang <facetothefate at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |facetothefate at gmail.com

--- Comment #6 from Zhifei Fang <facetothefate at gmail.com> ---
Have check the code:

We finally reach GraphicsContext::drawPattern to draw the background

On Mac it will call core graphics to draw the background image

With "image-rendering: pixelated" , we will disable the interpolation about scaling an image. it happend in GraphicsContext::drawTiledImage,

InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_interpolationQuality);

this will finally call
CGContextSetInterpolationQuality

to set the InterpolateNone
So far so good, we have disable the interpolation.

However,
When we call:
CGContextDrawTiledImage(context, FloatRect(adjustedX, adjustedY, scaledTileWidth, scaledTileHeight), subImage.get()); to finally draw the background image

Looks like the core graphics ignore the InterpolateNone to scale the tile image.

It will be easily verified if we write down a very simple code just using same setting to call the CGContextDrawTiledImage to see the result.

We should also test the other callpath which is when we need clip the background image, it will use CGPatternCreate series method to draw background instead of CGContextDrawTiledImage.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170921/3d82491d/attachment.html>


More information about the webkit-unassigned mailing list