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

Unified Diff: third_party/libpng/BUILD.gn

Issue 2119813003: Fix for png encoding performance regressions (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No need for inline flag on Win Created 4 years, 6 months 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 | third_party/libpng/libpng.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libpng/BUILD.gn
diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn
index 7e4bd5e4048067059b18027feebda638e3d4a771..16df1a12ebea803f6d5bb89ab65bf63f64c9fb26 100644
--- a/third_party/libpng/BUILD.gn
+++ b/third_party/libpng/BUILD.gn
@@ -33,6 +33,29 @@ config("clang_warnings") {
}
}
+# Must be in a config because of how GN orders flags (otherwise the default
+# flags will appear after this and turn these back off). This is a fix for
+# png encoding performance regressions (crbug.com/619850).
+config("android_gcc_optimizations") {
+ if (is_android && !is_clang) {
+ cflags = [
+ "-O2",
+ "-finline-functions",
+ ]
+ }
+}
+
+# Must be in a config because of how GN orders flags (otherwise the default
+# flags will appear after this and turn these back off). This is a fix for
+# png encoding performance regressions (crbug.com/619850).
+config("msvs_optimizations") {
+ if (is_win && !is_clang) {
Nico 2016/07/01 14:12:33 why `!is_clang`?
msarett 2016/07/01 14:44:33 Possibly this is unnecessary... I'll remove if yo
+ cflags = [
+ "/O2",
+ ]
+ }
+}
+
source_set("libpng_sources") {
sources = [
"png.c",
@@ -98,6 +121,8 @@ source_set("libpng_sources") {
]
configs += [ ":clang_warnings" ]
+ configs += [ ":android_gcc_optimizations" ]
+ configs += [ ":msvs_optimizations" ]
}
if (is_win) {
« no previous file with comments | « no previous file | third_party/libpng/libpng.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698