constant: Add support for other expressions WebRender uses.
This commit is contained in:
@@ -21,5 +21,34 @@ bitflags! {
|
||||
}
|
||||
}
|
||||
|
||||
/// An arbitrary identifier for a native (OS compositor) surface
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq)]
|
||||
pub struct NativeSurfaceId(pub u64);
|
||||
|
||||
impl NativeSurfaceId {
|
||||
/// A special id for the native surface that is used for debug / profiler overlays.
|
||||
pub const DEBUG_OVERLAY: NativeSurfaceId = NativeSurfaceId(u64::MAX);
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "capture", derive(Serialize))]
|
||||
#[cfg_attr(feature = "replay", derive(Deserialize))]
|
||||
pub struct NativeTileId {
|
||||
pub surface_id: NativeSurfaceId,
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
}
|
||||
|
||||
impl NativeTileId {
|
||||
/// A special id for the native surface that is used for debug / profiler overlays.
|
||||
pub const DEBUG_OVERLAY: NativeTileId = NativeTileId {
|
||||
surface_id: NativeSurfaceId::DEBUG_OVERLAY,
|
||||
x: 0,
|
||||
y: 0,
|
||||
};
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn root(flags: AlignFlags) {}
|
||||
pub extern "C" fn root(flags: AlignFlags, tile: NativeTileId) {}
|
||||
|
||||
Reference in New Issue
Block a user