[Webkit-unassigned] [Bug 53055] REGRESSION: Rendering artifacts on a rotated, pattern filled shape

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 31 05:48:48 PDT 2011


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





--- Comment #52 from Nikolas Zimmermann <zimmermann at kde.org>  2011-08-31 05:48:47 PST ---
(From update of attachment 105719)
View in context: https://bugs.webkit.org/attachment.cgi?id=105719&action=review

>> LayoutTests/svg/custom/pattern-rotate-gaps.svg:22
>> +      <tspan x="0" y="15">square should be pure white. </tspan>
> 
> FWIW, this is not what I'm seeing in expected results - there is a rotated white square inside a black one.

Yeah, this should better read "For this test case to be successful, the rotated shape in the black square should be pure white.

>> Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp:122
>> +        FloatRect absoluteTileBoundaries = absoluteTransformIgnoringRotation.mapRect(tileBoundaries);
> 
> Have you tried to make this a inherent part of calculateTransformationToOutermostSVGCoordinateSystem? This could be interesting for masking and clipping as well. It might need more work to check the behavior of SVGFilter. Nevertheless, it would be interesting for filters as well!

Hm, I don't think you want this for non-patterns. For example when rendering into a mask image buffer, you want the content to be equal as if you would render the <mask> children on screen, including any rotation etc. Of course the underlying mask image buffer must be large enough to hold the transformed content -- here you can't ignore the rotation.
(Same for my RenderSVGDuplicate work - where I'm using SVGImageBufferTools to render the referenced <use> content to an image buffer - rotation needs to be included there as well).

>>> Source/WebCore/rendering/svg/SVGImageBufferTools.cpp:128
>>> +    // FIXME67242: Don't round-trip through TransformationMatrix.
>> 
>> This is not our usual format. Ramming the bug number up against FIXME is not how we do it.
>> 
>> I’m not sure this really needs a FIXME. Sure, it would be more elegant, but what’s the big deal? Probably overkill to include the comment. Unless you said in the comment *why* it needs to be fixed.
> 
> I don't agree. First, I think this should be fixed before landing. SVGImageBufferTools is not really fast, we shouldn't make it slower with unnecessary copy operations. We never use TransformationMatrix in SVG, and even if we have to switch to TransformationMatrix for supporting semi-3D, we can't use this function as is. Second, if we add a fix me instead of fixing it at once, it is very likely that it will never get fixed. I don't see a big deal to add a new decompose function to AffineTransform. The necessary coder for affine matrices can be found online.

I tend to agree with Dirk - though if you want to work on this right after landing this patch, I'm fine with it.
Ideally, you'd refactor the decomposition code first in a seperated patch, and then make use of it here, after it landed.

> Source/WebKit2/ChangeLog:9
> +        Introduce wkCGPatternCreateWithImageAndTransform.

I agree this could be landed first and

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