Chromium Code Reviews| 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) { |