skia2/gyp/SampleApp.gyp

277 lines
10 KiB
Plaintext
Raw Normal View History

# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
{
'includes': [
'apptype_console.gypi',
],
'variables': {
#manually set sample_pdf_file_viewer to 1 to have the PdfViewer in SampleApp
'sample_pdf_file_viewer%': 0,
},
'targets': [
{
'target_name': 'SampleApp',
'type': 'executable',
'include_dirs' : [
'../src/core',
'../src/effects', #needed for BlurMask.h
'../src/gpu', # needed by SkLua.cpp
Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache Removed SkBitmapFactory since no clients were using it. New cache selection mechanism can simply pass a SkDiscardableMemory::Factory into the SkDiscardablePixelRef if non-default SkDiscardableMemory should be used. Removed BitmapFactoryTest. SkDiscardableMemory::Factory interface. Android will need this functionality in the future inside their BitmapFactory. Removed SkLazyPixelRef, since it's functionality is now subsumed into SkDiscardablePixelRef. Removed LazyPixelRef test. Modified SkDiscardablePixelRef to optionally allow it to use a SkDiscardableMemory::Factory. This tiny change makes it a replacement for SkLazyPixelRef. This functioanlity is also necessary for moving Android over to SkDiscardablePixelRef from SkImageRef in a later CL. Added a test for this. SkDecodingImageGenerator::Install can optionally pass a factory in to SkDiscardablePixelRef. Removed SkImageCache, SkLruImageCache, and SkPurgeableImageCache. This functionality can be handled much more cleanly by SkDiscardableMemory. New SkDiscardableMemoryPool class to replace SkLruImageCache. In a later CL, we will replace SkImageRef_GlobalPool (used by android) as well. This is a concrete implementation of SkDiscardableMemory::Factory. Added a test for this. modified gm/factory.cpp to remove dependnce on SkBitmapFactory + SkLruImageCache. Now uses SkDecodingImageGenerator + SkDiscardablePixelRef + SkDiscardableMemoryPool. SkImageDecoder::Target replaces SkBitmapFactory::Target. The DecodeMemoryToTarget function may disappear in the future. Moved SkLazyCachingPixelRef::DecodeProc replaces SkBitmapFactory::DecodeProc. This is a short term change, since another CL changes SkLazyCachingPixelRef to use SkImageGenerator instead of DecodeProc. Modified DrawBitmapRectTest to use SkDiscardablePixelRef instead of SkLazyPixelRef. tools/LazyDecodeBitmap.cpp now uses SkDecodingImageGenerator + SkDiscardablePixelRef instead of a SkBitmapFactory. bench_pictures uses the Global SkDiscardableMemoryPool instead of a global gLruImageCache. R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/103033002 git-svn-id: http://skia.googlecode.com/svn/trunk@12515 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 18:31:42 +00:00
'../src/images',
'../src/lazy',
'../gm', # needed to pull gm.h
'../samplecode', # To pull SampleApp.h and SampleCode.h
'../src/pipe/utils', # For TiledPipeController
'../src/utils/debugger',
],
'includes': [
'gmslides.gypi',
],
'sources': [
'../gm/gm.cpp',
'../samplecode/GMSampleView.h',
'../samplecode/GMSampleView.cpp',
'../samplecode/ClockFaceView.cpp',
'../samplecode/OverView.cpp',
'../samplecode/OverView.h',
'../samplecode/Sample2PtRadial.cpp',
'../samplecode/SampleAAClip.cpp',
'../samplecode/SampleAARects.cpp',
'../samplecode/SampleAARectModes.cpp',
'../samplecode/SampleAll.cpp',
'../samplecode/SampleAnimator.cpp',
'../samplecode/SampleAnimBlur.cpp',
'../samplecode/SampleApp.cpp',
'../samplecode/SampleArc.cpp',
'../samplecode/SampleAtlas.cpp',
'../samplecode/SampleBigBlur.cpp',
'../samplecode/SampleBigGradient.cpp',
'../samplecode/SampleBitmapRect.cpp',
'../samplecode/SampleBlur.cpp',
'../samplecode/SampleCamera.cpp',
'../samplecode/SampleChart.cpp',
'../samplecode/SampleCircle.cpp',
'../samplecode/SampleClip.cpp',
'../samplecode/SampleClipDrawMatch.cpp',
'../samplecode/SampleClock.cpp',
'../samplecode/SampleCode.h',
'../samplecode/SampleColorFilter.cpp',
'../samplecode/SampleComplexClip.cpp',
'../samplecode/SampleConcavePaths.cpp',
'../samplecode/SampleCull.cpp',
'../samplecode/SampleDegenerateTwoPtRadials.cpp',
'../samplecode/SampleDither.cpp',
'../samplecode/SampleDitherBitmap.cpp',
'../samplecode/SampleEffects.cpp',
'../samplecode/SampleEmboss.cpp',
'../samplecode/SampleEmptyPath.cpp',
'../samplecode/SampleEncode.cpp',
'../samplecode/SampleFatBits.cpp',
'../samplecode/SampleFillType.cpp',
'../samplecode/SampleFilter.cpp',
'../samplecode/SampleFilter2.cpp',
'../samplecode/SampleFilterQuality.cpp',
'../samplecode/SampleFilterFuzz.cpp',
'../samplecode/SampleFontCache.cpp',
'../samplecode/SampleFontScalerTest.cpp',
'../samplecode/SampleFuzz.cpp',
'../samplecode/SampleGradients.cpp',
'../samplecode/SampleHairCurves.cpp',
'../samplecode/SampleHairline.cpp',
'../samplecode/SampleHairModes.cpp',
'../samplecode/SampleHT.cpp',
'../samplecode/SampleIdentityScale.cpp',
'../samplecode/SampleLayerMask.cpp',
'../samplecode/SampleLayers.cpp',
'../samplecode/SampleLCD.cpp',
'../samplecode/SampleLighting.cpp',
'../samplecode/SampleLines.cpp',
'../samplecode/SampleLua.cpp',
'../samplecode/SampleManyRects.cpp',
'../samplecode/SampleMeasure.cpp',
'../samplecode/SamplePatch.cpp',
'../samplecode/SamplePath.cpp',
'../samplecode/SamplePathClip.cpp',
'../samplecode/SamplePathFuzz.cpp',
'../samplecode/SamplePathEffects.cpp',
'../samplecode/SamplePicture.cpp',
'../samplecode/SamplePictFile.cpp',
'../samplecode/SamplePoints.cpp',
'../samplecode/SamplePolyToPoly.cpp',
'../samplecode/SampleQuadStroker.cpp',
'../samplecode/SampleRectanizer.cpp',
'../samplecode/SampleRegion.cpp',
'../samplecode/SampleRepeatTile.cpp',
'../samplecode/SampleShaders.cpp',
'../samplecode/SampleShaderText.cpp',
'../samplecode/SampleSkLayer.cpp',
'../samplecode/SampleSlides.cpp',
'../samplecode/SampleStringArt.cpp',
'../samplecode/SampleStrokePath.cpp',
'../samplecode/SampleSubpixelTranslate.cpp',
'../samplecode/SampleText.cpp',
'../samplecode/SampleTextAlpha.cpp',
'../samplecode/SampleTextBox.cpp',
'../samplecode/SampleTextOnPath.cpp',
'../samplecode/SampleTextureDomain.cpp',
'../samplecode/SampleTiling.cpp',
'../samplecode/SampleTinyBitmap.cpp',
'../samplecode/SampleUnpremul.cpp',
'../samplecode/SampleVertices.cpp',
'../samplecode/SampleXfermodesBlur.cpp',
# DrawingBoard
#'../experimental/DrawingBoard/SkColorPalette.h',
#'../experimental/DrawingBoard/SkColorPalette.cpp',
#'../experimental/DrawingBoard/SkNetPipeController.h',
#'../experimental/DrawingBoard/SkNetPipeController.cpp',
#'../experimental/DrawingBoard/SampleDrawingClient.cpp',
#'../experimental/DrawingBoard/SampleDrawingServer.cpp',
# Networking
#'../experimental/Networking/SampleNetPipeReader.cpp',
#'../experimental/Networking/SkSockets.cpp',
#'../experimental/Networking/SkSockets.h',
# TiledPipeController
'../src/pipe/utils/SamplePipeControllers.h',
'../src/pipe/utils/SamplePipeControllers.cpp',
# Lua
'../src/utils/SkLuaCanvas.cpp',
'../src/utils/SkLua.cpp',
],
'sources!': [
'../samplecode/SampleSkLayer.cpp', #relies on SkMatrix44 which doesn't compile
'../samplecode/SampleFontCache.cpp',
],
'dependencies': [
'animator.gyp:animator',
'etc1.gyp:libetc1',
'experimental.gyp:experimental',
'flags.gyp:flags',
'lua.gyp:lua',
'pdf.gyp:pdf',
'skia_lib.gyp:skia_lib',
'tools.gyp:resources',
'tools.gyp:sk_tool_utils',
'views.gyp:views',
'views_animated.gyp:views_animated',
'xml.gyp:xml',
],
'conditions' : [
[ 'sample_pdf_file_viewer == 1', {
'defines': [
'SAMPLE_PDF_FILE_VIEWER',
],
'dependencies': [
'pdfviewer_lib.gyp:pdfviewer_lib',
],
'include_dirs' : [
'../experimental/PdfViewer/inc',
],
'sources': [
'../samplecode/SamplePdfFileViewer.cpp',
]
}],
[ 'skia_os == "win"', {
'sources!': [
# require UNIX functions
'../samplecode/SampleEncode.cpp',
],
}],
[ 'skia_os == "ios"', {
# TODO: This doesn't build properly yet, but it's getting there.
'sources!': [
'../samplecode/SampleDecode.cpp',
'../experimental/SimpleiOSApp/SimpleApp.mm',
],
'sources': [
'../src/views/mac/SkEventNotifier.mm',
'../experimental/iOSSampleApp/SkSampleUIView.mm',
'../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
'../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
'../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
'../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
'../experimental/iOSSampleApp/Shared/SkOptionListController.mm',
'../experimental/iOSSampleApp/Shared/SkUIRootViewController.mm',
'../experimental/iOSSampleApp/Shared/SkOptionsTableViewController.mm',
'../experimental/iOSSampleApp/Shared/SkUIView.mm',
'../experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm',
'../experimental/iOSSampleApp/Shared/skia_ios.mm',
# iPad
'../experimental/iOSSampleApp/iPad/AppDelegate_iPad.mm',
'../experimental/iOSSampleApp/iPad/SkUISplitViewController.mm',
'../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
# iPhone
'../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.mm',
'../experimental/iOSSampleApp/iPhone/SkUINavigationController.mm',
'../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
'../src/views/ios/SkOSWindow_iOS.mm',
'../src/utils/mac/SkCreateCGImageRef.cpp',
'../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
'../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
'$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework',
'$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
'$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
],
},
'include_dirs' : [
'../experimental/iOSSampleApp',
'../experimental/iOSSampleApp/iPad',
'../experimental/iOSSampleApp/iPhone',
'../experimental/iOSSampleApp/Shared',
'../include/utils/ios',
'../src/views/mac',
],
'xcode_settings' : {
'INFOPLIST_FILE' : '../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
},
'xcode_config_file': '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
'mac_bundle_resources' : [
'../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
'../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
],
}],
[ 'skia_os == "android"', {
'sources!': [
'../samplecode/SampleAnimator.cpp',
],
'dependencies!': [
'animator.gyp:animator',
'experimental.gyp:experimental',
],
'dependencies': [
'android_deps.gyp:Android_SampleApp',
],
}],
[ 'skia_os == "chromeos"', {
'sources!': [
'../samplecode/SampleLighting.cpp', #doesn't compile due to gpu dependencies
],
}],
[ 'skia_gpu == 1', {
'dependencies': [
'gputest.gyp:skgputest',
],
}],
],
},
],
}