'pdf.gyp:pdf',
],
'conditions': [
+ ['skia_run_pdfviewer_in_gm or skia_poppler_enabled', {
+ 'sources': [
+ '../src/utils/SkPDFRasterizer.cpp',
+ ],
+ }],
['skia_run_pdfviewer_in_gm', {
'defines': [
'SK_BUILD_NATIVE_PDF_RENDERER',
'dependencies': [
'poppler.gyp:libpoppler-cpp-gpl',
],
- 'sources': [
- '../src/utils/SkPDFRasterizer.cpp',
- ],
'defines': [
'SK_BUILD_POPPLER',
],
#pragma warning(disable : 4530)
#endif
-#include <poppler-document.h>
-#include <poppler-image.h>
-#include <poppler-page.h>
-#include <poppler-page-renderer.h>
-
#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) {
size_t size = pdf->getLength();
SkAutoFree buffer(sk_malloc_throw(size));
return true;
}
+#endif // SK_BUILD_POPPLER
#ifdef SK_BUILD_NATIVE_PDF_RENDERER
bool SkNativeRasterizePDF(SkStream* pdf, SkBitmap* output) {
#include "SkBitmap.h"
#include "SkStream.h"
+#ifdef SK_BUILD_POPPLER
bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output);
+#endif // SK_BUILD_POPPLER
#ifdef SK_BUILD_NATIVE_PDF_RENDERER
bool SkNativeRasterizePDF(SkStream* pdf, SkBitmap* output);