summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wr_glyph_rasterizer
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/wr/wr_glyph_rasterizer')
-rw-r--r--gfx/wr/wr_glyph_rasterizer/Cargo.toml6
-rw-r--r--gfx/wr/wr_glyph_rasterizer/src/gamma_lut.rs10
-rw-r--r--gfx/wr/wr_glyph_rasterizer/src/lib.rs10
3 files changed, 13 insertions, 13 deletions
diff --git a/gfx/wr/wr_glyph_rasterizer/Cargo.toml b/gfx/wr/wr_glyph_rasterizer/Cargo.toml
index 1d94a460cc..b06cd0f084 100644
--- a/gfx/wr/wr_glyph_rasterizer/Cargo.toml
+++ b/gfx/wr/wr_glyph_rasterizer/Cargo.toml
@@ -25,7 +25,7 @@ tracy-rs = "0.1.2"
log = "0.4"
lazy_static = "1"
fxhash = "0.2.1"
-glean = { version = "57.0.0", optional = true }
+glean = { version = "58.1.0", optional = true }
firefox-on-glean = { version = "0.1.0", optional = true }
serde = { optional = true, version = "1.0", features = ["serde_derive"] }
@@ -37,14 +37,14 @@ glutin = "0.28"
rayon = "1"
winit = "0.26"
-[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
+[target.'cfg(any(target_os = "android", all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies]
freetype = { version = "0.7", default-features = false }
libc = "0.2"
[target.'cfg(target_os = "windows")'.dependencies]
dwrote = "0.11"
-[target.'cfg(target_os = "macos")'.dependencies]
+[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
core-foundation = "0.9.2"
core-graphics = "0.23"
core-text = { version = "20.1", default-features = false }
diff --git a/gfx/wr/wr_glyph_rasterizer/src/gamma_lut.rs b/gfx/wr/wr_glyph_rasterizer/src/gamma_lut.rs
index 15075bacbf..82555c8a06 100644
--- a/gfx/wr/wr_glyph_rasterizer/src/gamma_lut.rs
+++ b/gfx/wr/wr_glyph_rasterizer/src/gamma_lut.rs
@@ -168,7 +168,7 @@ impl ColorLut for ColorU {
// so we can get linear values.
// CoreGraphics obscurely defaults to 2.0 as the smoothing gamma value.
// The color space used does not appear to affect this choice.
-#[cfg(target_os="macos")]
+#[cfg(any(target_os="macos", target_os = "ios"))]
fn get_inverse_gamma_table_coregraphics_smoothing() -> [u8; 256] {
let mut table = [0u8; 256];
@@ -250,7 +250,7 @@ pub fn build_gamma_correcting_lut(table: &mut [u8; 256], src: u8, contrast: f32,
pub struct GammaLut {
tables: [[u8; 256]; 1 << LUM_BITS],
- #[cfg(target_os="macos")]
+ #[cfg(any(target_os="macos", target_os="ios"))]
cg_inverse_gamma: [u8; 256],
}
@@ -280,12 +280,12 @@ impl GammaLut {
}
pub fn new(contrast: f32, paint_gamma: f32, device_gamma: f32) -> GammaLut {
- #[cfg(target_os="macos")]
+ #[cfg(any(target_os="macos", target_os="ios"))]
let mut table = GammaLut {
tables: [[0; 256]; 1 << LUM_BITS],
cg_inverse_gamma: get_inverse_gamma_table_coregraphics_smoothing(),
};
- #[cfg(not(target_os="macos"))]
+ #[cfg(not(any(target_os="macos", target_os="ios")))]
let mut table = GammaLut {
tables: [[0; 256]; 1 << LUM_BITS],
};
@@ -337,7 +337,7 @@ impl GammaLut {
}
}
- #[cfg(target_os="macos")]
+ #[cfg(any(target_os="macos", target_os="ios"))]
pub fn coregraphics_convert_to_linear(&self, pixels: &mut [u8]) {
for pixel in pixels.chunks_mut(4) {
pixel[0] = self.cg_inverse_gamma[pixel[0] as usize];
diff --git a/gfx/wr/wr_glyph_rasterizer/src/lib.rs b/gfx/wr/wr_glyph_rasterizer/src/lib.rs
index 27ceb71992..3cf95d7c31 100644
--- a/gfx/wr/wr_glyph_rasterizer/src/lib.rs
+++ b/gfx/wr/wr_glyph_rasterizer/src/lib.rs
@@ -9,7 +9,7 @@
//! ## Usage
//!
-#[cfg(any(target_os = "macos", target_os = "windows"))]
+#[cfg(any(target_os = "macos", target_os = "ios", target_os = "windows"))]
mod gamma_lut;
mod rasterizer;
mod telemetry;
@@ -38,18 +38,18 @@ extern crate serde;
extern crate malloc_size_of;
pub mod platform {
- #[cfg(target_os = "macos")]
+ #[cfg(any(target_os = "macos", target_os = "ios"))]
pub use crate::platform::macos::font;
- #[cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))]
+ #[cfg(any(target_os = "android", all(unix, not(any(target_os = "ios", target_os = "macos")))))]
pub use crate::platform::unix::font;
#[cfg(target_os = "windows")]
pub use crate::platform::windows::font;
- #[cfg(target_os = "macos")]
+ #[cfg(any(target_os = "ios", target_os = "macos"))]
pub mod macos {
pub mod font;
}
- #[cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))]
+ #[cfg(any(target_os = "android", all(unix, not(any(target_os = "macos", target_os = "ios")))))]
pub mod unix {
pub mod font;
}