Separate measured-answer dependencies from retained drawing validity
This commit is contained in:
1 parent
c44bd198ee
commit
f860f716e6
7 files changed
+188
-356
No files matched your search
+1
-16
@@ -41,7 +41,7 @@ pub struct ActiveData {
|
||||
pub textures: Vec<TextureHandle>,
|
||||
pub primitives: Vec<RetainedPrimitive>,
|
||||
pub mask_region: Option<DrawRegion>,
|
||||
pub(crate) extent_children: Vec<(WidgetId, ExtentPlacement)>,
|
||||
pub inherited_children: Vec<WidgetId>,
|
||||
pub children: Vec<WidgetId>,
|
||||
/// The children whose size this widget read while drawing.
|
||||
pub size_deps: Vec<WidgetId>,
|
||||
@@ -87,18 +87,3 @@ impl ActiveData {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub(crate) enum ExtentPlacement {
|
||||
Inherit,
|
||||
Within(UiRegion),
|
||||
}
|
||||
|
||||
impl ExtentPlacement {
|
||||
pub fn resolve(self, extent: UiRegion) -> (UiRegion, [Option<crate::UiSpan>; 2]) {
|
||||
match self {
|
||||
Self::Inherit => (UiRegion::FULL, [Some(extent.x), Some(extent.y)]),
|
||||
Self::Within(local) => (local.within(&extent), [None; 2]),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user