[Webkit-unassigned] [Bug 35544] New: [OpenVG] Use masks to implement non-rectilinear clipping

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 1 14:03:51 PST 2010


           Summary: [OpenVG] Use masks to implement non-rectilinear
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jpetsovits at rim.com

Rectilinear regions (a.k.a. upright rectangles) can be clipped in OpenVG using
its scissoring functionality. For all other shapes (i.e. paths and rotated
rectangles), we want mask clipping instead. Only OpenVG >= 1.1 provides the
required functions for managing masks, so all the masking code in this patch is
put into an #ifdef.

Mask layers (which are bitmaps of 1 or 8 bit depth per pixel) are a bit hairy
because, unlike the other state that we're keeping track of, they can't easily
be captured like colors, boolean enable-blah values, or stuff. Also, OpenVG
implementations can optimize on the plain bitmap concept by storing masks and
mask layers as set of paths. So we don't really want to read out mask layers in
memory for context state storage, we keep them as native VGMaskLayer. That
requires us to make sure the correct surface is current when the painter state
is stored (which we didn't ensure before) so a bit of surface management code
is added here as well.

vgRenderToMask() is affected by the current OpenVG path transformation, so we
don't have to manually transform the path like we do for scissor rectangles.
PainterOpenVG restricts the clipping modes to Intersect and Subtract, because
additive clipping a.k.a. removing clip regions would require too much (and
unnecessary) overhead for scissor rectangles which would need to be "unclipped"
as well. Right now PainterOpenVG can only add clips but never remove them
(except with restore()), and that's in line with GraphicsContext's

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