Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: skia/BUILD.gn

Issue 1431143002: GYP+GN plumbing for SSE4.2, AVX, and AVX2 in Skia. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/skia_library_opts.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/BUILD.gn
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index f3fd404da5bfce94e9fb783a2df8752ce54bb28d..e6fc643357486c02e44413308d1b6b7c80248eb0 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -520,7 +520,7 @@ if (current_cpu == "x86" || current_cpu == "x64") {
"//build/config/compiler:no_chromium_code",
]
}
- source_set("skia_opts_sse4") {
+ source_set("skia_opts_sse41") {
sources = gypi_skia_opts.sse41_sources
if (!is_win || is_clang) {
cflags = [ "-msse4.1" ]
@@ -536,6 +536,54 @@ if (current_cpu == "x86" || current_cpu == "x64") {
"//build/config/compiler:no_chromium_code",
]
}
+ source_set("skia_opts_sse42") {
+ sources = gypi_skia_opts.sse42_sources
+ if (!is_win || is_clang) {
+ cflags = [ "-msse4.2" ]
+ }
+ if (is_win) {
+ defines = [ "SK_CPU_SSE_LEVEL=42" ]
+ }
+ visibility = [ ":skia_opts" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":skia_config",
+ ":skia_library_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ }
+ source_set("skia_opts_avx") {
+ sources = gypi_skia_opts.avx_sources
+ if (!is_win || is_clang) {
+ cflags = [ "-mavx" ]
+ }
+ if (is_win) {
+ cflags = [ "/arch:AVX" ]
+ }
+ visibility = [ ":skia_opts" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":skia_config",
+ ":skia_library_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ }
+ source_set("skia_opts_avx2") {
+ sources = gypi_skia_opts.avx2_sources
+ if (!is_win || is_clang) {
+ cflags = [ "-mavx2" ]
+ }
+ if (is_win) {
+ cflags = [ "/arch:AVX2" ]
+ }
+ visibility = [ ":skia_opts" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":skia_config",
+ ":skia_library_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ }
}
source_set("skia_opts") {
cflags = []
@@ -549,7 +597,10 @@ source_set("skia_opts") {
sources = gypi_skia_opts.sse2_sources
deps += [
":skia_opts_sse3",
- ":skia_opts_sse4",
+ ":skia_opts_sse41",
+ ":skia_opts_sse42",
+ ":skia_opts_avx",
+ ":skia_opts_avx2",
]
} else if (current_cpu == "arm") {
# The assembly uses the frame pointer register (r7 in Thumb/r11 in
« no previous file with comments | « no previous file | skia/skia_library_opts.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698