mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1684599 - Rename qcms_supports_iccv4 to SUPPORTS_ICCV4. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D100570
This commit is contained in:
parent
db42508fcb
commit
5136e6e774
@ -29,7 +29,7 @@ use std::{
|
||||
use crate::transform::{precache_output, set_rgb_colorants};
|
||||
use crate::{matrix::Matrix, s15Fixed16Number, s15Fixed16Number_to_float, Intent, Intent::*};
|
||||
|
||||
pub static qcms_supports_iccv4: AtomicBool = AtomicBool::new(false);
|
||||
pub static SUPPORTS_ICCV4: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
pub type icColorSpaceSignature = u32;
|
||||
pub const icMaxEnumData: icColorSpaceSignature = 4294967295;
|
||||
@ -1268,9 +1268,7 @@ impl Profile {
|
||||
profile.mBA = read_tag_lutmABType(src, B2A0)
|
||||
}
|
||||
}
|
||||
if find_tag(&index, TAG_rXYZ).is_some()
|
||||
|| !qcms_supports_iccv4.load(Ordering::Relaxed)
|
||||
{
|
||||
if find_tag(&index, TAG_rXYZ).is_some() || !SUPPORTS_ICCV4.load(Ordering::Relaxed) {
|
||||
profile.redColorant = read_tag_XYZType(src, &index, TAG_rXYZ);
|
||||
profile.greenColorant = read_tag_XYZType(src, &index, TAG_gXYZ);
|
||||
profile.blueColorant = read_tag_XYZType(src, &index, TAG_bXYZ)
|
||||
@ -1279,9 +1277,7 @@ impl Profile {
|
||||
return None;
|
||||
}
|
||||
|
||||
if find_tag(&index, TAG_rTRC).is_some()
|
||||
|| !qcms_supports_iccv4.load(Ordering::Relaxed)
|
||||
{
|
||||
if find_tag(&index, TAG_rTRC).is_some() || !SUPPORTS_ICCV4.load(Ordering::Relaxed) {
|
||||
profile.redTRC = read_tag_curveType(src, &index, TAG_rTRC);
|
||||
profile.greenTRC = read_tag_curveType(src, &index, TAG_gTRC);
|
||||
profile.blueTRC = read_tag_curveType(src, &index, TAG_bTRC);
|
||||
|
@ -29,7 +29,7 @@ use crate::transform_neon::{
|
||||
use crate::{
|
||||
chain::chain_transform,
|
||||
double_to_s15Fixed16Number,
|
||||
iccread::qcms_supports_iccv4,
|
||||
iccread::SUPPORTS_ICCV4,
|
||||
matrix::*,
|
||||
transform_util::{
|
||||
build_colorant_matrix, build_input_gamma_table, build_output_lut, compute_precache,
|
||||
@ -1054,7 +1054,7 @@ pub extern "C" fn qcms_profile_precache_output_transform(mut profile: &mut Profi
|
||||
if profile.color_space != RGB_SIGNATURE {
|
||||
return;
|
||||
}
|
||||
if qcms_supports_iccv4.load(Ordering::Relaxed) {
|
||||
if SUPPORTS_ICCV4.load(Ordering::Relaxed) {
|
||||
/* don't precache since we will use the B2A LUT */
|
||||
if profile.B2A0.is_some() {
|
||||
return;
|
||||
@ -1165,7 +1165,7 @@ pub fn transform_create(
|
||||
precache = true
|
||||
}
|
||||
// This precache assumes RGB_SIGNATURE (fails on GRAY_SIGNATURE, for instance)
|
||||
if qcms_supports_iccv4.load(Ordering::Relaxed) as i32 != 0
|
||||
if SUPPORTS_ICCV4.load(Ordering::Relaxed) as i32 != 0
|
||||
&& (in_type == DATA_RGB_8 || in_type == DATA_RGBA_8 || in_type == DATA_BGRA_8)
|
||||
&& (in_0.A2B0.is_some() || out.B2A0.is_some() || in_0.mAB.is_some() || out.mAB.is_some())
|
||||
{
|
||||
@ -1366,5 +1366,5 @@ impl Transform {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn qcms_enable_iccv4() {
|
||||
qcms_supports_iccv4.store(true, Ordering::Relaxed);
|
||||
SUPPORTS_ICCV4.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user