mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1884279 - compute_precache always returns true so drop the return value. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D203986
This commit is contained in:
parent
ad72058ded
commit
446cd9fd80
@ -1174,30 +1174,27 @@ pub extern "C" fn qcms_profile_precache_output_transform(profile: &mut Profile)
|
||||
}
|
||||
if profile.output_table_r.is_none() {
|
||||
let mut output_table_r = precache_create();
|
||||
if compute_precache(
|
||||
compute_precache(
|
||||
profile.redTRC.as_deref().unwrap(),
|
||||
&mut Arc::get_mut(&mut output_table_r).unwrap().data,
|
||||
) {
|
||||
profile.output_table_r = Some(output_table_r);
|
||||
}
|
||||
);
|
||||
profile.output_table_r = Some(output_table_r);
|
||||
}
|
||||
if profile.output_table_g.is_none() {
|
||||
let mut output_table_g = precache_create();
|
||||
if compute_precache(
|
||||
compute_precache(
|
||||
profile.greenTRC.as_deref().unwrap(),
|
||||
&mut Arc::get_mut(&mut output_table_g).unwrap().data,
|
||||
) {
|
||||
profile.output_table_g = Some(output_table_g);
|
||||
}
|
||||
);
|
||||
profile.output_table_g = Some(output_table_g);
|
||||
}
|
||||
if profile.output_table_b.is_none() {
|
||||
let mut output_table_b = precache_create();
|
||||
if compute_precache(
|
||||
compute_precache(
|
||||
profile.blueTRC.as_deref().unwrap(),
|
||||
&mut Arc::get_mut(&mut output_table_b).unwrap().data,
|
||||
) {
|
||||
profile.output_table_b = Some(output_table_b);
|
||||
}
|
||||
);
|
||||
profile.output_table_b = Some(output_table_b);
|
||||
};
|
||||
}
|
||||
/* Replace the current transformation with a LUT transformation using a given number of sample points */
|
||||
|
@ -471,7 +471,7 @@ pub fn compute_precache_linear(output: &mut [u8; PRECACHE_OUTPUT_SIZE]) {
|
||||
output[v] = (v / (PRECACHE_OUTPUT_SIZE / 256)) as u8;
|
||||
}
|
||||
}
|
||||
pub(crate) fn compute_precache(trc: &curveType, output: &mut [u8; PRECACHE_OUTPUT_SIZE]) -> bool {
|
||||
pub(crate) fn compute_precache(trc: &curveType, output: &mut [u8; PRECACHE_OUTPUT_SIZE]) {
|
||||
match trc {
|
||||
curveType::Parametric(params) => {
|
||||
let mut gamma_table_uint: [u16; 256] = [0; 256];
|
||||
@ -512,7 +512,6 @@ pub(crate) fn compute_precache(trc: &curveType, output: &mut [u8; PRECACHE_OUTPU
|
||||
}
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
fn build_linear_table(length: usize) -> Vec<u16> {
|
||||
let mut output = Vec::with_capacity(length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user