Skip to content

Commit

Permalink
Merge branch 'lookup' of https://github.com/Kirk-Fox/palette into lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Aug 19, 2024
2 parents d38dfea + 558fc78 commit 6a78473
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion palette/build/lut.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{fs::File, io::Write};
use std::fs::File;

pub fn build() {
use std::path::Path;
Expand Down Expand Up @@ -79,6 +79,8 @@ impl LutEntryU16 {

#[cfg(any(feature = "float_lut", feature = "fast_uint_lut"))]
pub fn build_transfer_fn(writer: &mut File) {
use std::io::Write;

let entries_u8: Vec<LutEntryU8> = vec![
LutEntryU8::new(
"Srgb",
Expand Down Expand Up @@ -180,6 +182,8 @@ pub fn build_transfer_fn(_writer: &mut File) {}

#[cfg(feature = "float_lut")]
fn gen_into_linear_lut_u8(writer: &mut File, entries: &[LutEntryU8]) {
use std::io::Write;

for LutEntryU8 {
fn_type,
fn_type_uppercase,
Expand Down Expand Up @@ -234,6 +238,8 @@ fn gen_into_linear_lut_u8(writer: &mut File, entries: &[LutEntryU8]) {

#[cfg(feature = "float_lut16")]
fn gen_into_linear_lut_u16(writer: &mut File, entries: &[LutEntryU16]) {
use std::io::Write;

for LutEntryU16 {
fn_type,
fn_type_uppercase,
Expand Down Expand Up @@ -288,6 +294,8 @@ fn gen_into_linear_lut_u16(writer: &mut File, entries: &[LutEntryU16]) {

#[cfg(feature = "fast_uint_lut")]
fn gen_from_linear_lut_u8(writer: &mut File, entries: &[LutEntryU8]) {
use std::io::Write;

for LutEntryU8 {
fn_type,
fn_type_uppercase,
Expand Down Expand Up @@ -414,6 +422,8 @@ fn gen_from_linear_lut_u8(writer: &mut File, entries: &[LutEntryU8]) {

#[cfg(feature = "fast_uint_lut16")]
fn gen_from_linear_lut_u16(writer: &mut File, entries: &[LutEntryU16]) {
use std::io::Write;

for LutEntryU16 {
fn_type,
fn_type_uppercase,
Expand Down

0 comments on commit 6a78473

Please sign in to comment.