Commit 1bf9e8fe authored by wtc's avatar wtc Committed by Commit bot

Support MIPS DSP application-specific extension (ASE).

Define gypi_skia_gpu and gypi_skia_pdf only if they will be used.

R=alokp@chromium.org,reed@google.com
BUG=none

Review URL: https://codereview.chromium.org/1008603002

Cr-Commit-Position: refs/heads/master@{#320978}
parent 3de6ad4c
...@@ -8,6 +8,9 @@ import("//testing/test.gni") ...@@ -8,6 +8,9 @@ import("//testing/test.gni")
if (current_cpu == "arm") { if (current_cpu == "arm") {
import("//build/config/arm.gni") import("//build/config/arm.gni")
} }
if (current_cpu == "mipsel" || current_cpu == "mips64el") {
import("//build/config/mips.gni")
}
skia_support_gpu = !is_ios skia_support_gpu = !is_ios
skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview)
...@@ -48,26 +51,30 @@ gypi_skia_core = ...@@ -48,26 +51,30 @@ gypi_skia_core =
[ "//third_party/skia/gyp/core.gypi" ]) [ "//third_party/skia/gyp/core.gypi" ])
# The list of Skia gpu sources that are to be set for chromium. # The list of Skia gpu sources that are to be set for chromium.
gypi_skia_gpu = if (skia_support_gpu) {
exec_script("//build/gypi_to_gn.py", gypi_skia_gpu =
[ exec_script("//build/gypi_to_gn.py",
rebase_path("//third_party/skia/gyp/gpu.gypi"), [
"--replace=<(skia_include_path)=//third_party/skia/include", rebase_path("//third_party/skia/gyp/gpu.gypi"),
"--replace=<(skia_src_path)=//third_party/skia/src", "--replace=<(skia_include_path)=//third_party/skia/include",
], "--replace=<(skia_src_path)=//third_party/skia/src",
"scope", ],
[ "//third_party/skia/gyp/gpu.gypi" ]) "scope",
[ "//third_party/skia/gyp/gpu.gypi" ])
}
# The list of Skia pdf sources that are to be set for chromium. # The list of Skia pdf sources that are to be set for chromium.
gypi_skia_pdf = if (skia_support_pdf) {
exec_script("//build/gypi_to_gn.py", gypi_skia_pdf =
[ exec_script("//build/gypi_to_gn.py",
rebase_path("//third_party/skia/gyp/pdf.gypi"), [
"--replace=<(skia_include_path)=//third_party/skia/include", rebase_path("//third_party/skia/gyp/pdf.gypi"),
"--replace=<(skia_src_path)=//third_party/skia/src", "--replace=<(skia_include_path)=//third_party/skia/include",
], "--replace=<(skia_src_path)=//third_party/skia/src",
"scope", ],
[ "//third_party/skia/gyp/pdf.gypi" ]) "scope",
[ "//third_party/skia/gyp/pdf.gypi" ])
}
# The list of Skia effects that are to be set for chromium. # The list of Skia effects that are to be set for chromium.
gypi_skia_effects = gypi_skia_effects =
...@@ -550,6 +557,7 @@ source_set("skia_opts") { ...@@ -550,6 +557,7 @@ source_set("skia_opts") {
[ [
# Chrome-specific. # Chrome-specific.
"ext/convolver_SSE2.cc", "ext/convolver_SSE2.cc",
"ext/convolver_SSE2.h",
] ]
if (is_linux || is_mac) { if (is_linux || is_mac) {
...@@ -577,7 +585,19 @@ source_set("skia_opts") { ...@@ -577,7 +585,19 @@ source_set("skia_opts") {
} }
} else if (current_cpu == "mipsel") { } else if (current_cpu == "mipsel") {
cflags += [ "-fomit-frame-pointer" ] cflags += [ "-fomit-frame-pointer" ]
sources = gypi_skia_opts.none_sources
if (mips_dsp_rev >= 1) {
sources = gypi_skia_opts.mips_dsp_sources
if (mips_dsp_rev >= 2) {
sources += [
# Chrome-specific.
"ext/convolver_mips_dspr2.cc",
"ext/convolver_mips_dspr2.h",
]
}
} else {
sources = gypi_skia_opts.none_sources
}
} else { } else {
assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment