suggest inlining Harrogate render helper
This commit is contained in:
parent
bc018751c8
commit
1ad2db3960
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,7 @@ pub struct Harrogate<PB, PF> {
|
||||||
pub porch_front: PF,
|
pub porch_front: PF,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn white_balance(HardwareRgb(r, g, b): HardwareRgb, white: Rgb) -> HardwareRgb {
|
fn white_balance(HardwareRgb(r, g, b): HardwareRgb, white: Rgb) -> HardwareRgb {
|
||||||
let Rgb(r, g, b) = Rgb(r, g, b) * white;
|
let Rgb(r, g, b) = Rgb(r, g, b) * white;
|
||||||
HardwareRgb(r, g, b)
|
HardwareRgb(r, g, b)
|
||||||
|
@ -26,6 +27,7 @@ where
|
||||||
PB: IntoIterator<Item = Rgb>,
|
PB: IntoIterator<Item = Rgb>,
|
||||||
PF: IntoIterator<Item = Rgb>,
|
PF: IntoIterator<Item = Rgb>,
|
||||||
{
|
{
|
||||||
|
#[inline]
|
||||||
pub fn render_to<L: Lights<Pixel = HardwareRgb>>(self, lights: &mut L) {
|
pub fn render_to<L: Lights<Pixel = HardwareRgb>>(self, lights: &mut L) {
|
||||||
let mut buffer = [HardwareRgb(255,0,255); PORCH_BACK_LEN + PORCH_FRONT_LEN];
|
let mut buffer = [HardwareRgb(255,0,255); PORCH_BACK_LEN + PORCH_FRONT_LEN];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue