mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-12-22 04:18:21 -06:00
update more deps
This commit is contained in:
parent
3358465be9
commit
1fea554560
|
@ -11,7 +11,7 @@ hui-painter = { path = "../hui-painter" }
|
|||
hui-glium = { path = "../hui-glium" }
|
||||
hui-winit = { path = "../hui-winit" }
|
||||
kubi-logging = { git = "https://github.com/griffi-gh/kubi", rev = "be1e24ba0c9e6d24128e7d0e74bebd8b90c23be7" }
|
||||
glium = "0.35"
|
||||
glium = "0.36"
|
||||
winit = "0.30"
|
||||
glam = "0.29"
|
||||
log = "0.4"
|
||||
|
|
|
@ -19,6 +19,6 @@ hui-shared = { version = "0.1.0-alpha.5", path = "../hui-shared" }
|
|||
glam = "0.29"
|
||||
log = "0.4"
|
||||
rect_packer = "0.2" # TODO: use sth else like `crunch` instead?
|
||||
hashbrown = "0.14"
|
||||
hashbrown = "0.15"
|
||||
nohash-hasher = "0.2"
|
||||
fontdue = "0.9"
|
||||
|
|
|
@ -29,7 +29,7 @@ impl FontHandleManager {
|
|||
/// - If the font data is invalid.
|
||||
pub fn add_font(&mut self, data: &[u8]) -> FontHandle {
|
||||
let font = fontdue::Font::from_bytes(data, fontdue::FontSettings::default()).unwrap();
|
||||
self.fonts.insert_unique_unchecked(self.idc, FontRepr { font });
|
||||
unsafe { self.fonts.insert_unique_unchecked(self.idc, FontRepr { font }); }
|
||||
self.idc += 1;
|
||||
FontHandle(self.idc - 1)
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ impl FontTextureManager {
|
|||
/// - If the partition for the font already exists.
|
||||
pub(crate) fn init_font(&mut self, font: FontHandle) {
|
||||
assert!(!self.partition.contains_key(&font.0), "Font handle already initialized");
|
||||
self.partition.insert_unique_unchecked(font.0, HashMap::default());
|
||||
unsafe { self.partition.insert_unique_unchecked(font.0, HashMap::default()) };
|
||||
}
|
||||
|
||||
/// Render a glyph and cache it in the texture atlas.
|
||||
|
@ -81,7 +81,7 @@ impl FontTextureManager {
|
|||
|
||||
// Create a texture item struct and insert it into the partition
|
||||
let itm = RasterizedGlyphInternal { handle, metrics };
|
||||
partition.insert_unique_unchecked(config, itm);
|
||||
unsafe { partition.insert_unique_unchecked(config, itm); }
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
|
|
@ -204,12 +204,14 @@ impl TextureAtlas {
|
|||
if allocation.max_size.x >= size.x && allocation.max_size.y >= size.y {
|
||||
let allocation = self.reuse_allocations.remove(idx);
|
||||
let handle = self.next_handle(size);
|
||||
self.allocations.insert_unique_unchecked(handle.id, TextureAllocation {
|
||||
handle,
|
||||
offset: allocation.offset,
|
||||
size,
|
||||
max_size: allocation.max_size,
|
||||
});
|
||||
unsafe {
|
||||
self.allocations.insert_unique_unchecked(handle.id, TextureAllocation {
|
||||
handle,
|
||||
offset: allocation.offset,
|
||||
size,
|
||||
max_size: allocation.max_size,
|
||||
});
|
||||
}
|
||||
return handle;
|
||||
}
|
||||
}
|
||||
|
@ -228,7 +230,9 @@ impl TextureAtlas {
|
|||
// Allocate the texture
|
||||
let handle = self.next_handle(size);
|
||||
let allocation = TextureAllocation::new(handle, offset, size);
|
||||
self.allocations.insert_unique_unchecked(handle.id, allocation);
|
||||
unsafe {
|
||||
self.allocations.insert_unique_unchecked(handle.id, allocation);
|
||||
}
|
||||
|
||||
handle
|
||||
}
|
||||
|
|
|
@ -19,16 +19,16 @@ include = [
|
|||
hui-derive = { version = "0.1.0-alpha.5", path = "../hui-derive", optional = true }
|
||||
hui-shared = { version = "0.1.0-alpha.5", path = "../hui-shared" }
|
||||
# hui-painter = { version = "0.1.0-alpha.5", path = "../hui-painter" }
|
||||
hashbrown = "0.14"
|
||||
hashbrown = "0.15"
|
||||
nohash-hasher = "0.2"
|
||||
glam = "0.29""
|
||||
glam = "0.29"
|
||||
fontdue = "0.9"
|
||||
rect_packer = "0.2"
|
||||
log = "0.4"
|
||||
document-features = "0.2"
|
||||
derive_setters = "0.1"
|
||||
derive_more = "0.99"
|
||||
tinyset = "0.4"
|
||||
derive_more = { version = "1.0", features = [ "full" ] }
|
||||
tinyset = "0.5"
|
||||
image = { version = "0.25", default-features = false, optional = true }
|
||||
rustc-hash = "2.0"
|
||||
|
||||
|
|
|
@ -163,7 +163,9 @@ impl TextureAtlasManager {
|
|||
//If the size does not match the requested size, the texture was rotated
|
||||
rotated: ALLOW_ROTATION && (result.width != size.x as i32),
|
||||
};
|
||||
self.allocations.insert_unique_unchecked(index, allocation);
|
||||
unsafe {
|
||||
self.allocations.insert_unique_unchecked(index, allocation);
|
||||
}
|
||||
Some(ImageHandle { index })
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
// #![deny(unsafe_code)]
|
||||
#![forbid(unsafe_op_in_unsafe_fn)]
|
||||
#![allow(unused_parens)]
|
||||
|
||||
|
|
|
@ -53,7 +53,9 @@ impl FontTextureManager {
|
|||
metrics,
|
||||
texture
|
||||
});
|
||||
self.glyph_cache.insert_unique_unchecked(key, Arc::clone(&entry));
|
||||
unsafe {
|
||||
self.glyph_cache.insert_unique_unchecked(key, Arc::clone(&entry));
|
||||
}
|
||||
entry
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue