Bring back compiling third_party/libpng in public.bzl
authorscroggo <scroggo@google.com>
Tue, 21 Jun 2016 21:13:40 +0000 (14:13 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 21 Jun 2016 21:13:40 +0000 (14:13 -0700)
Disable the optimizations for simplicity, as suggested in [1].

Remove PNG_SKIP_SETJMP_CHECK, which is not defined in version 1.6.22.

[1] https://codereview.chromium.org/2033063003/diff/20001/public.bzl#newcode84

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2044703006

Review-Url: https://codereview.chromium.org/2044703006

public.bzl

index f84abc0..5ba5612 100644 (file)
@@ -79,6 +79,9 @@ BASE_SRCS_ALL = struct(
         "third_party/etc1/*.h",
         "third_party/ktx/*.cpp",
         "third_party/ktx/*.h",
+
+        "third_party/libpng/*.c",
+        "third_party/libpng/*.h",
     ],
     exclude = PRIVATE_HDRS_LIST + [
         # Exclude platform-dependent files.
@@ -383,6 +386,7 @@ INCLUDES = [
     "src/utils",
     "third_party/etc1",
     "third_party/ktx",
+    "third_party/libpng",
 ]
 
 ################################################################################
@@ -547,15 +551,17 @@ COPTS_ALL = []
 ################################################################################
 
 DEFINES_UNIX = [
-    "PNG_SKIP_SETJMP_CHECK",
     "SK_BUILD_FOR_UNIX",
     "SK_SAMPLES_FOR_X",
     "SK_SFNTLY_SUBSETTER",
     "SK_CODEC_DECODES_RAW",
     "SK_HAS_GIF_LIBRARY",
     "SK_HAS_JPEG_LIBRARY",
-    "SK_HAS_PNG_LIBRARY",
     "SK_HAS_WEBP_LIBRARY",
+    "SK_HAS_PNG_LIBRARY",
+    "PNG_ARM_NEON_OPT=0",
+    "PNG_INTEL_SSE_OPT=0",
+    "PNG_ARM_NEON_IMPLEMENTATION=0",
 ]
 
 DEFINES_ANDROID = [
@@ -563,8 +569,11 @@ DEFINES_ANDROID = [
     "SK_CODEC_DECODES_RAW",
     "SK_HAS_GIF_LIBRARY",
     "SK_HAS_JPEG_LIBRARY",
-    "SK_HAS_PNG_LIBRARY",
     "SK_HAS_WEBP_LIBRARY",
+    "SK_HAS_PNG_LIBRARY",
+    "PNG_ARM_NEON_OPT=0",
+    "PNG_INTEL_SSE_OPT=0",
+    "PNG_ARM_NEON_IMPLEMENTATION=0",
 ]
 
 DEFINES_IOS = [