]
}
+ if (is_winrt) {
+ sources -= [
+ get_path_info("src/utils/win/SkWGL.h", "abspath"),
+ get_path_info("src/utils/win/SkWGL_win.cpp", "abspath"),
+ ]
+ }
+
if (is_android) {
deps += [ "//third_party/expat" ]
- if (is_skia_standalone && ndk != "") {
+ if (defined(ndk) && ndk != "") {
deps += [ "//third_party/cpu-features" ]
}
sources += [ "src/ports/SkDebug_android.cpp" ]
cc_wrapper = ""
malloc = ""
+
+ enable_bitcode = false
+ if (is_tvos) {
+ enable_bitcode = true
+ }
}
+ declare_args() {
+ if (msvc == 2015) {
+ windk = "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
+ } else {
+ windk = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional"
+ }
+ }
if (host_os == "win") {
python = "python.bat"
"-mfpu=neon",
"-mthumb",
]
- } else if (current_cpu == "mipsel") {
+ } else if (current_cpu == "mipsel" && !is_win) {
cflags += [
+ "-no-integrated-as", # Clang <4.0 doesn't understand 'usw' mnemonic.
"-march=mips32r2",
- "-mdspr2",
]
} else if (current_cpu == "x86" && !is_win) {
asmflags += [ "-m32" ]
]
} else {
cflags = [
- "-O3",
- "-fdata-sections",
- "-ffunction-sections",
+ "-Os",
- "-momit-leaf-frame-pointer",
]
+ if (!enable_bitcode) {
+ cflags += [
+ "-fdata-sections",
+ "-ffunction-sections",
+ ]
+ }
if (is_mac || is_ios) {
ldflags = [ "-dead_strip" ]
} else {
toolchain("msvc") {
lib_dir_switch = "/LIBPATH:"
- if (msvc == 2015) {
- bin = "$windk/VC/bin/amd64"
- env_setup = ""
- if (target_cpu == "x86") {
- bin += "_x86"
- env_setup = "cmd /c $windk/win_sdk/bin/SetEnv.cmd /x86 && "
- }
- } else {
- bin = "$windk/VC/Tools/MSVC/14.10.25017/bin/HostX64/$target_cpu"
- env_setup = ""
+ _target = "amd64"
+ env_setup = ""
+ env_setup_end = ""
+ if (target_cpu != "x64") {
if (target_cpu == "x86") {
- print("Be sure to run")
- print("$windk/VC/Auxiliary/Build/vcvarsall.bat amd64_x86")
- print("to set up your environment before running ninja.")
+ _target += "_x86"
+ } else if (target_cpu == "arm") {
+ _target += "_arm"
}
+ env_setup = "cmd /c \"\"$windk/VC/vcvarsall.bat\" $_target && "
+ env_setup_end = "\""
}
+ bin = "$windk/VC/bin/$_target"
tool("asm") {
- command = "$env_setup$bin/ml64.exe /nologo /c /Fo {{output}} {{source}}"
+ _ml = "ml"
+ if (target_cpu == "x64") {
+ _ml += "64"
+ }
+ command = "$env_setup$bin/$_ml.exe /nologo /c /Fo {{output}} {{source}}"
outputs = [
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
]
}
HRESULT SkFontMgr_DirectWrite::getDefaultFontFamily(IDWriteFontFamily** fontFamily) const {
+#ifdef SK_BUILD_FOR_WINRT
+ const wchar_t* default_font_family_name = L"Segoe UI";
+#else // SK_BUILD_FOR_WINRT
NONCLIENTMETRICSW metrics;
metrics.cbSize = sizeof(metrics);
- if (0 == SystemParametersInfoW(SPI_GETNONCLIENTMETRICS,
- sizeof(metrics),
- &metrics,
- 0)) {
+ if (0 == SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(metrics), &metrics, 0)) {
return E_UNEXPECTED;
}
- HRM(this->getByFamilyName(metrics.lfMessageFont.lfFaceName, fontFamily),
+ wchar_t* default_font_family_name = metrics.lfMessageFont.lfFaceName;
+#endif // SK_BUILD_FOR_WINRT
+ HRM(this->getByFamilyName(default_font_family_name, fontFamily),
"Could not create DWrite font family from LOGFONT.");
return S_OK;
}