909228992c
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
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
# GYP file to build pdfviewer.
|
|
#
|
|
# To build on Linux:
|
|
# ./gyp_skia pdfviewer.gyp && make pdfviewer
|
|
#
|
|
{
|
|
'includes': [
|
|
'apptype_console.gypi',
|
|
],
|
|
'targets': [
|
|
{
|
|
'target_name': 'pdfviewer',
|
|
'type': 'executable',
|
|
'sources': [
|
|
'../experimental/PdfViewer/pdf_viewer_main.cpp',
|
|
],
|
|
'include_dirs': [
|
|
'../experimental/PdfViewer',
|
|
'../experimental/PdfViewer/inc',
|
|
'../experimental/PdfViewer/pdfparser',
|
|
'../experimental/PdfViewer/pdfparser/native',
|
|
],
|
|
'dependencies': [
|
|
'chop_transparency',
|
|
'flags.gyp:flags',
|
|
'pdfviewer_lib.gyp:pdfviewer_lib',
|
|
'skia_lib.gyp:skia_lib',
|
|
],
|
|
},
|
|
{
|
|
'target_name': 'chop_transparency',
|
|
'type': 'executable',
|
|
'sources': [
|
|
'../experimental/PdfViewer/chop_transparency_main.cpp',
|
|
],
|
|
'include_dirs': [
|
|
# For SkBitmapHasher.h
|
|
'../src/utils/',
|
|
],
|
|
'dependencies': [
|
|
'flags.gyp:flags',
|
|
'skia_lib.gyp:skia_lib',
|
|
],
|
|
},
|
|
],
|
|
}
|
|
|
|
# Local Variables:
|
|
# tab-width:2
|
|
# indent-tabs-mode:nil
|
|
# End:
|
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|