skia2/gyp/gm.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

122 lines
3.0 KiB
Python

# GYP file to build the "gm" (golden master) executable.
{
'includes': [
'apptype_console.gypi',
],
'targets': [
{
'target_name': 'gm_expectations',
'type': 'static_library',
'include_dirs' : [
'../src/utils/',
],
'sources': [
'../gm/gm_expectations.h',
'../gm/gm_expectations.cpp',
],
'dependencies': [
'skia_lib.gyp:skia_lib',
'jsoncpp.gyp:jsoncpp',
],
'direct_dependent_settings': {
'include_dirs': [
'../gm/',
],
},
},
{
'target_name': 'gm',
'type': 'executable',
'include_dirs' : [
'../src/core',
'../src/effects',
'../src/pipe/utils/',
'../src/utils/',
'../src/utils/debugger',
],
'includes': [
'gmslides.gypi',
],
'sources': [
'../gm/gm.cpp',
'../gm/gmmain.cpp',
'../gm/system_preferences_default.cpp',
'../src/pipe/utils/SamplePipeControllers.h',
'../src/pipe/utils/SamplePipeControllers.cpp',
'../src/utils/debugger/SkDrawCommand.h',
'../src/utils/debugger/SkDrawCommand.cpp',
'../src/utils/debugger/SkDebugCanvas.h',
'../src/utils/debugger/SkDebugCanvas.cpp',
'../src/utils/debugger/SkObjectParser.h',
'../src/utils/debugger/SkObjectParser.cpp',
],
'dependencies': [
'skia_lib.gyp:skia_lib',
'flags.gyp:flags',
'gm.gyp:gm_expectations',
'jsoncpp.gyp:jsoncpp',
'pdf.gyp:pdf',
],
'conditions': [
['skia_run_pdfviewer_in_gm', {
'defines': [
'SK_BUILD_NATIVE_PDF_RENDERER',
],
'include_dirs' : [
'../experimental/PdfViewer/inc',
],
'dependencies': [
'pdfviewer_lib.gyp:pdfviewer_lib',
],
}],
['skia_os in ["linux", "mac", "win"]', {
'dependencies': [
'poppler.gyp:libpoppler-cpp-gpl',
],
'sources': [
'../src/utils/SkPDFRasterizer.cpp',
],
'defines': [
'SK_BUILD_POPPLER',
],
}],
['skia_os == "mac"', {
'sources!': [
'../gm/system_preferences_default.cpp',
],
'sources': [
'../gm/system_preferences_mac.mm',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
],
},
}],
['skia_os == "win"', {
'dependencies': [
'xps.gyp:xps',
],
}],
['skia_gpu == 1', {
'include_dirs': [
'../src/gpu',
],
'dependencies': [
'gputest.gyp:skgputest',
],
}],
],
},
],
}
# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2: