[Webkit-unassigned] [Bug 76527] Mask deformations when masked content is rotated

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 26 14:46:25 PST 2012


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





--- Comment #6 from Florin Malita <fmalita at google.com>  2012-01-26 14:46:25 PST ---
(In reply to comment #5)
> (From update of attachment 124002 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=124002&action=review
> 
> > Source/WebCore/ChangeLog:24
> > +        Track the target rect used when creating the mask/clip image buffer, and re-generate the data
> > +        on changes.
> 
> This seems like the wrong approach - we expect the resources to be invalidated, if they need to be updated.

I've already looked at the invalidation path.

RenderSVGResource::markForLayoutAndParentResourceInvalidation walks the ancestor chain and invalidates any resource container it finds:

     while (current) {
        removeFromFilterCache(current);

        if (current->isSVGResourceContainer()) {
            // This will process the rest of the ancestors.
            current->toRenderSVGResourceContainer()->removeAllClientsFromCache();
            break;
        }

        current = current->parent();
    }


The problem is that in this case the resource container is not an ancestor of RenderSVGRect, but a sibling:

        RenderSVGContainer {g}
          [masker="mask"] RenderSVGResourceMasker {mask}
          RenderSVGRect {rect}


So walking RenderSVGRect's ancestor chain doesn't hit any resource containers. We can tweak the implementation to query and invalidate the resources for each ancestor - let me know if you prefer this approach and I'll update the patch.

But do we really want to invalidate the mask data on target updates?

1) with the test submitted by honyk for example, there's only a narrow range of angles which cause variation in the target rect - so the current patch saves a bunch of mask redraws. I guess we could filter this on the invalidation path also, but...

2) the fact that the mask image buffer depends on its target repaint rect seems like a local implementation detail (optimization) which should not leak into the framework

Could we just size the mask image buffer independently of the target instead and avoid all this?

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