diff options
-rw-r--r-- | gyp/common_variables.gypi | 6 | ||||
-rw-r--r-- | gyp/dm.gyp | 5 | ||||
-rw-r--r-- | gyp/freetype.gyp | 28 | ||||
-rw-r--r-- | gyp/poppler.gyp | 15 | ||||
-rw-r--r-- | site/user/quick/linux.md | 2 | ||||
-rw-r--r-- | src/utils/SkPDFRasterizer.cpp | 88 | ||||
-rw-r--r-- | src/utils/SkPDFRasterizer.h | 23 | ||||
-rwxr-xr-x | tools/install_dependencies.sh | 1 | ||||
-rw-r--r-- | tools/tsan.supp | 5 |
9 files changed, 1 insertions, 172 deletions
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index bbd09a6eee..60dcccc1a9 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -86,11 +86,6 @@ }, { 'os_posix%': 1, }], - [ 'skia_os in ["linux"]', { - 'skia_poppler_enabled%': 1, - }, { - 'skia_poppler_enabled%': 0, - }], ['"64" in skia_arch_type', { 'skia_arch_width%': 64, }, { @@ -224,7 +219,6 @@ 'skia_resource_cache_mb_limit%': '<(skia_resource_cache_mb_limit)', 'skia_resource_cache_count_limit%': '<(skia_resource_cache_count_limit)', 'skia_angle%': '<(skia_angle)', - 'skia_poppler_enabled%': '<(skia_poppler_enabled)', 'skia_arch_width%': '<(skia_arch_width)', 'skia_arch_type%': '<(skia_arch_type)', 'skia_chrome_utils%': '<(skia_chrome_utils)', diff --git a/gyp/dm.gyp b/gyp/dm.gyp index c05826b9f5..dc75729dc6 100644 --- a/gyp/dm.gyp +++ b/gyp/dm.gyp @@ -25,11 +25,6 @@ '../dm/DMSrcSinkAndroid.cpp', ], }], - ['skia_poppler_enabled', { - 'sources': [ '../src/utils/SkPDFRasterizer.cpp' ], - 'defines': [ 'SK_BUILD_POPPLER' ], - 'dependencies': [ 'poppler.gyp:*' ], - }], ], }] } diff --git a/gyp/freetype.gyp b/gyp/freetype.gyp index fc528d426d..ed6e97b945 100644 --- a/gyp/freetype.gyp +++ b/gyp/freetype.gyp @@ -81,8 +81,7 @@ 'libpng.gyp:libpng', ], 'includes': [ - # common freetype sources needed for both the base Skia build and the - # libpoppler build for testing only + # TODO: merge this back in here? 'freetype.gypi', ], 'include_dirs': [ @@ -109,30 +108,5 @@ }], ], }, - { - 'target_name': 'freetype_poppler', - 'type': 'static_library', - 'standalone_static_library': 1, - 'includes': [ - 'freetype.gypi', - ], - 'sources': [ - # additional components used by poppler - '../third_party/externals/freetype/src/base/ftbdf.c', - '../third_party/externals/freetype/src/base/ftpfr.c', - - '../third_party/externals/freetype/src/bdf/bdf.c', - '../third_party/externals/freetype/src/cid/type1cid.c', - '../third_party/externals/freetype/src/pcf/pcf.c', - '../third_party/externals/freetype/src/pfr/pfr.c', - '../third_party/externals/freetype/src/psaux/psaux.c', - '../third_party/externals/freetype/src/type1/type1.c', - '../third_party/externals/freetype/src/type42/type42.c', - '../third_party/externals/freetype/src/winfonts/winfnt.c', - - '../third_party/externals/freetype/src/gzip/ftgzip.c', - '../third_party/externals/freetype/src/lzw/ftlzw.c', - ], - }, ], } diff --git a/gyp/poppler.gyp b/gyp/poppler.gyp deleted file mode 100644 index 6b7685d1f7..0000000000 --- a/gyp/poppler.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Poppler, assuming it's been installed to the (Linux) system. -{ - 'targets': [{ - 'target_name': 'poppler', - 'type': 'none', - 'direct_dependent_settings': { - 'libraries': [ - '-lpoppler-cpp', - ], - 'include_dirs': [ - '/usr/include/poppler/cpp', - ], - }, - }], -} diff --git a/site/user/quick/linux.md b/site/user/quick/linux.md index 7b345654f9..ef4f95b667 100644 --- a/site/user/quick/linux.md +++ b/site/user/quick/linux.md @@ -33,8 +33,6 @@ Make sure the following have been installed: * mesa-common-dev * GL * such as freeglut3-dev - * Poppler PDF rendering library C++ development files - * suggested Ubuntu package: libpoppler-cpp-dev Check out the source code ------------------------- diff --git a/src/utils/SkPDFRasterizer.cpp b/src/utils/SkPDFRasterizer.cpp deleted file mode 100644 index d44dfa30b9..0000000000 --- a/src/utils/SkPDFRasterizer.cpp +++ /dev/null @@ -1,88 +0,0 @@ - -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifdef SK_BUILD_FOR_WIN32 -#pragma warning(push) -#pragma warning(disable : 4530) -#endif - -#include "SkPDFRasterizer.h" -#include "SkColorPriv.h" - -#ifdef SK_BUILD_NATIVE_PDF_RENDERER -#include "SkPdfRenderer.h" -#endif // SK_BUILD_NATIVE_PDF_RENDERER - -#ifdef SK_BUILD_POPPLER -#include <poppler-document.h> -#include <poppler-image.h> -#include <poppler-page.h> -#include <poppler-page-renderer.h> -#endif // SK_BUILD_POPPLER - -#ifdef SK_BUILD_POPPLER -bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) { - SkAutoTDelete<SkStream> streamDeleter(pdf); - size_t size = pdf->getLength(); - SkAutoFree buffer(sk_malloc_throw(size)); - pdf->read(buffer.get(), size); - - SkAutoTDelete<poppler::document> doc( - poppler::document::load_from_raw_data((const char*)buffer.get(), size)); - if (!doc.get() || doc->is_locked()) { - return false; - } - - SkAutoTDelete<poppler::page> page(doc->create_page(0)); - poppler::page_renderer renderer; - poppler::image image = renderer.render_page(page.get()); - - if (!image.is_valid() || image.format() != poppler::image::format_argb32) { - return false; - } - - int width = image.width(), height = image.height(); - size_t rowSize = image.bytes_per_row(); - char *imgData = image.data(); - - SkBitmap bitmap; - if (!bitmap.tryAllocN32Pixels(width, height)) { - return false; - } - bitmap.eraseColor(SK_ColorWHITE); - SkPMColor* bitmapPixels = (SkPMColor*)bitmap.getPixels(); - - // do pixel-by-pixel copy to deal with RGBA ordering conversions - for (int y = 0; y < height; y++) { - char *rowData = imgData; - for (int x = 0; x < width; x++) { - uint8_t a = rowData[3]; - uint8_t r = rowData[2]; - uint8_t g = rowData[1]; - uint8_t b = rowData[0]; - - *bitmapPixels = SkPreMultiplyARGB(a, r, g, b); - - bitmapPixels++; - rowData += 4; - } - imgData += rowSize; - } - - output->swap(bitmap); - - return true; -} -#endif // SK_BUILD_POPPLER - -#ifdef SK_BUILD_NATIVE_PDF_RENDERER -bool SkNativeRasterizePDF(SkStream* pdf, SkBitmap* output) { - SkAutoTDelete<SkStream> streamDeleter(pdf); - return SkPDFNativeRenderToBitmap(pdf, output); -} -#endif // SK_BUILD_NATIVE_PDF_RENDERER diff --git a/src/utils/SkPDFRasterizer.h b/src/utils/SkPDFRasterizer.h deleted file mode 100644 index 36bd086c74..0000000000 --- a/src/utils/SkPDFRasterizer.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#ifndef SkPDFRasterizer_DEFINED -#define SkPDFRasterizer_DEFINED - -#include "SkBitmap.h" -#include "SkStream.h" - -#ifdef SK_BUILD_POPPLER -// Deletes pdf when finished. -bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output); -#endif // SK_BUILD_POPPLER - -#ifdef SK_BUILD_NATIVE_PDF_RENDERER -// Deletes pdf when finished. -bool SkNativeRasterizePDF(SkStream* pdf, SkBitmap* output); -#endif // SK_BUILD_NATIVE_PDF_RENDERER - -#endif diff --git a/tools/install_dependencies.sh b/tools/install_dependencies.sh index 5769602115..ae98884d1e 100755 --- a/tools/install_dependencies.sh +++ b/tools/install_dependencies.sh @@ -15,7 +15,6 @@ if command -v lsb_release > /dev/null ; then Ubuntu) sudo apt-get install \ build-essential \ - libpoppler-cpp-dev \ libfreetype6-dev \ libfontconfig-dev \ libpng12-dev \ diff --git a/tools/tsan.supp b/tools/tsan.supp index 6158bf864c..0401197165 100644 --- a/tools/tsan.supp +++ b/tools/tsan.supp @@ -5,11 +5,6 @@ # WebP races (harmlessly) choosing function pointers for SIMD versions of some of its functions. race:third_party/externals/libwebp -# Poppler races on startup. -race:libpoppler.so -# LCMS is used by poppler, and also races. -race:liblcms2.so - # skia:2459 Seemingly misdiagnosed use-after-free, having something to do with software GL drivers. # Having trouble getting this suppression to match. # We've tried: race:swrast_dri.so |