Introduce a visible_bounds parameter to Element::paint
We're not using this yet but this will be useful to avoid rendering unnecessary portions of text.
This commit is contained in:
@@ -44,10 +44,11 @@ impl Element for EventHandler {
|
||||
fn paint(
|
||||
&mut self,
|
||||
bounds: RectF,
|
||||
visible_bounds: RectF,
|
||||
_: &mut Self::LayoutState,
|
||||
cx: &mut PaintContext,
|
||||
) -> Self::PaintState {
|
||||
self.child.paint(bounds.origin(), cx);
|
||||
self.child.paint(bounds.origin(), visible_bounds, cx);
|
||||
}
|
||||
|
||||
fn dispatch_event(
|
||||
|
||||
Reference in New Issue
Block a user