skia2/gyp/pdfviewer_lib.gyp
scroggo@google.com 909228992c Pdfviewer refactoring.
Mostly superficial changes, to help me make sure I understand the
code while making modifications.

SkPdfRenderer:
First class I'm modifying. Move it into include/ and src/ directories.
Inherit from SkNoncopyable.
Replace load() with factory function which returns NULL if the load
fails.
Remove unload() and loaded(), which no longer make sense, since the
factory will return NULL on a failure to load, and unload() happens
on destruction.
Use a const char* for loading a PDF, following the convention of
SkStream::NewFromFile.
Remove unnecessary call to sqrt in SkPDFNativeRenderToBitmap.
Also in SkPDFNativeRenderToBitmap, use an appropriate SkScalar macro
to convert to an integer.
Use this-> when calling member functions.

pdf_viewer_main.cpp:
Call the new interface for SkPdfRenderer.

gyp files:
Refer to the new location of SkPdfRenderer.

R=edisonn@google.com

Review URL: https://codereview.chromium.org/59493011

git-svn-id: http://skia.googlecode.com/svn/trunk@12296 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 19:09:27 +00:00

50 lines
1.7 KiB
Python

# GYP file to build pdfviewer.
#
# To build on Linux:
# ./gyp_skia pdfviewer.gyp && make pdfviewer
#
{
'targets': [
{
'target_name': 'pdfviewer_lib',
'type': 'static_library',
'sources': [
# FIXME: Include directory is named "inc" (instead of "include") in
# order to not be considered the public API.
'../experimental/PdfViewer/inc/SkPdfRenderer.h',
'../experimental/PdfViewer/src/SkPdfRenderer.cpp',
'../experimental/PdfViewer/SkPdfGraphicsState.cpp',
'../experimental/PdfViewer/SkPdfFont.cpp',
'../experimental/PdfViewer/SkPdfReporter.cpp',
'../experimental/PdfViewer/SkPdfUtils.cpp',
#'../experimental/PdfViewer/SkPdfNYI.cpp',
'../experimental/PdfViewer/SkTrackDevice.cpp',
'../experimental/PdfViewer/SkTracker.cpp',
'../experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp',
'../experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp',
'../experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp',
'../experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfMapper_autogen.cpp',
'../experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfHeaders_autogen.cpp',
],
'include_dirs': [
'../experimental/PdfViewer',
'../experimental/PdfViewer/inc',
'../experimental/PdfViewer/pdfparser',
'../experimental/PdfViewer/pdfparser/native',
'../experimental/PdfViewer/pdfparser/native/pdfapi',
],
'dependencies': [
'skia_lib.gyp:skia_lib',
'zlib.gyp:zlib',
],
},
],
}
# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2: