SkPDF: fewer GYP_DEFINES
authorhalcanary <halcanary@google.com>
Wed, 3 Aug 2016 21:17:53 +0000 (14:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 3 Aug 2016 21:17:53 +0000 (14:17 -0700)
also: hack a unit test

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

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

gyp/pdf.gyp
tests/PDFPrimitivesTest.cpp

index 5e26de0334d172bddaf806040a99b690e05dcfa3..aa8d6bfa79201a5e450341809001c17d0e4da3df 100644 (file)
@@ -18,7 +18,6 @@
       'standalone_static_library': 1,
       'variables': {
         'skia_pdf_use_sfntly%': 1,
-        'skia_pdf_less_compression%': 0,  # enable for debugging only
       },
       'dependencies': [
         'skia_lib.gyp:skia_lib',
@@ -41,9 +40,6 @@
            skia_os in ["win", "android", "linux", "mac"]',
           { 'dependencies': [ 'sfntly.gyp:sfntly' ] }
         ],
-        [ 'skia_pdf_less_compression',
-          {'defines': ['SK_PDF_LESS_COMPRESSION'] }
-        ],
         [ 'skia_android_framework', {
             # Add SFTNLY support for PDF (which in turns depends on ICU)
             'include_dirs': [
index 6d89dd1585c8ad299dfe8d6a5abad22ab70cd026..554f1ee720a818503d40b7de31ec72f54c4bcd0c 100644 (file)
@@ -114,10 +114,12 @@ static void TestPDFStream(skiatest::Reporter* reporter) {
         expected.writeText("\nendstream");
         sk_sp<SkData> expectedResultData2(expected.copyToData());
         SkString result = emit_to_string(*stream);
+        #ifndef SK_PDF_LESS_COMPRESSION
         assert_eql(reporter,
                    result,
                    (const char*)expectedResultData2->data(),
                    expectedResultData2->size());
+        #endif
     }
 }