[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-layout
Subject:    Re: clipping rounded borders, and layers
From:       "Robert O'Callahan" <robert () ocallahan ! org>
Date:       2010-08-31 21:56:42
Message-ID: 0K2dncFGEsUB5-DRnZ2dnUVZ_u-dnZ2d () mozilla ! org
[Download RAW message or body]

On 1/09/10 8:20 AM, L. David Baron wrote:
> Now that we have layers, it doesn't seem this straightforward.  I
> recognize that I'd need the wrapping display item in more cases (for
> the replaced elements that have layers:  canvas and video).  But it
> also seems that nsDisplayClip works differently; we now accumulate
> clip rects in ContainerState::ProcessDisplayItems, and I think
> layers only support a single clip rect.

Correct.

> However, it seems like I ought to be able to make things work the
> same way SVG effects work; they (in
> nsSVGIntegrationUtils::PaintFramesWithEffects) paint their display
> list to a thebes context.  (Presumably that still works even if
> there are child layers inside that list?)  This seems slow, though,
> but it also seems like it's probably ok if some of these edge cases
> are slow.

Correct.

You can call nsDisplayList::PaintForFrame to paint a display list to an 
arbitrary context. Just pass PAINT_DEFAULT. This will work even if the 
content underneath has child layers. It'll be slow for those layers, in 
particular video layers, but for normal Web content this should be just 
fine.

Post-FF4 we need to add clip-path/mask functionality to layers so we 
don't need to do this.

Rob
_______________________________________________
dev-tech-layout mailing list
dev-tech-layout@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-layout
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic