mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add font-fallback on OpenHarmony and fix several compilation issues (#32141)
* Add OpenHarmony support for allocator / profile Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * gfx: Build harfbuzz from source on OHOS Updates `freetype-sys` to v0.20.1, which includes a build fix for OpenHarmony. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * gfx: Don't depend on fontconfig on OpenHarmony Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * gfx: Add ohos font fallback Hardcode HarmonyOS_Sans_SC_Regular for Chinese Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * libservo: OHOS useragent, and explicitly opt out of sandboxing Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * libservo: Disable get_native_media_display_and_gl_context on ohos Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This commit is contained in:
parent
9acf2182cd
commit
ca064eaa51
8 changed files with 307 additions and 27 deletions
|
@ -387,16 +387,16 @@ impl ReportsForest {
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
mod system_reporter {
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android", target_env = "ohos")))]
|
||||
use std::ffi::CString;
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android", target_env = "ohos")))]
|
||||
use std::mem::size_of;
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android", target_env = "ohos")))]
|
||||
use std::ptr::null_mut;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
use libc::c_int;
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android", target_env = "ohos")))]
|
||||
use libc::{c_void, size_t};
|
||||
use profile_traits::mem::{Report, ReportKind, ReporterRequest};
|
||||
use profile_traits::path;
|
||||
|
@ -499,10 +499,10 @@ mod system_reporter {
|
|||
None
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android", target_env = "ohos")))]
|
||||
use jemalloc_sys::mallctl;
|
||||
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android")))]
|
||||
#[cfg(not(any(target_os = "windows", target_os = "android", target_env = "ohos")))]
|
||||
fn jemalloc_stat(value_name: &str) -> Option<usize> {
|
||||
// Before we request the measurement of interest, we first send an "epoch"
|
||||
// request. Without that jemalloc gives cached statistics(!) which can be
|
||||
|
@ -549,7 +549,7 @@ mod system_reporter {
|
|||
Some(value as usize)
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "android"))]
|
||||
#[cfg(any(target_os = "windows", target_os = "android", target_env = "ohos"))]
|
||||
fn jemalloc_stat(_value_name: &str) -> Option<usize> {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue