Commit 5a1d14ba authored by David Michael Barr's avatar David Michael Barr Committed by Thomas Daede

Reduce overhead of tiling abstraction

The tail call confuses the compiler, preventing inlining.
parent c1446adb
......@@ -87,11 +87,16 @@ impl Area {
width,
height,
},
Area::BlockStartingAt { bo } => Area::StartingAt {
x: (bo.x >> xdec << BLOCK_TO_PLANE_SHIFT) as isize,
y: (bo.y >> ydec << BLOCK_TO_PLANE_SHIFT) as isize,
}
.to_rect(xdec, ydec, parent_width, parent_height),
Area::BlockStartingAt { bo } => {
let x = (bo.x >> xdec << BLOCK_TO_PLANE_SHIFT) as isize;
let y = (bo.y >> ydec << BLOCK_TO_PLANE_SHIFT) as isize;
Rect {
x,
y,
width: (parent_width as isize - x) as usize,
height: (parent_height as isize - y) as usize,
}
},
}
}
}
......
......@@ -176,6 +176,7 @@ impl TileBlocksMut<'_> {
self.for_each(bo, bsize, |block| block.mode = mode);
}
#[inline(always)]
pub fn set_block_size(&mut self, bo: BlockOffset, bsize: BlockSize) {
let n4_w = bsize.width_mi();
let n4_h = bsize.height_mi();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment