# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. Import('env') env = env.Clone() env.Prepend( CPPPATH = [ 'include', 'include/corecg', 'corecg', 'sgl', 'picture', '$CHROME_SRC_DIR', ], ) env.Append( CPPDEFINES = [ 'SKIA_DISABLE_SUPPORT_FOR_DECODERS', ], ) if env['PLATFORM'] == 'win32': env.Append( CCFLAGS = [ '/TP', '/wd4244', '/wd4267', '/wd4345', '/wd4390', '/wd4554', '/wd4800', ], ) elif env['PLATFORM'] in ('posix', 'darwin'): # Because images/SkStream.cpp has len asserts. env.Append(CCFLAGS = ['-Wno-unused-variable']) input_files = [ 'animator/SkTime.cpp', 'corecg/Sk64.cpp', 'corecg/SkBuffer.cpp', 'corecg/SkChunkAlloc.cpp', 'corecg/SkCordic.cpp', 'corecg/SkDebug.cpp', 'corecg/SkDebug_stdio.cpp', 'corecg/SkFloat.cpp', 'corecg/SkInterpolator.cpp', 'corecg/SkMath.cpp', 'corecg/SkMatrix.cpp', 'corecg/SkMemory_stdlib.cpp', 'corecg/SkPoint.cpp', 'corecg/SkRect.cpp', 'corecg/SkRegion.cpp', 'effects/Sk1DPathEffect.cpp', 'effects/Sk2DPathEffect.cpp', 'effects/SkAvoidXfermode.cpp', 'effects/SkBlurDrawLooper.cpp', 'effects/SkBlurMask.cpp', 'effects/SkBlurMaskFilter.cpp', 'effects/SkCamera.cpp', 'effects/SkColorFilters.cpp', 'effects/SkColorMatrix.cpp', 'effects/SkColorMatrixFilter.cpp', 'effects/SkCornerPathEffect.cpp', 'effects/SkCullPoints.cpp', 'effects/SkDashPathEffect.cpp', 'effects/SkDiscretePathEffect.cpp', 'effects/SkEmbossMask.cpp', 'effects/SkEmbossMaskFilter.cpp', 'effects/SkGradientShader.cpp', 'effects/SkKernel33MaskFilter.cpp', 'effects/SkLayerRasterizer.cpp', 'effects/SkPaintFlagsDrawFilter.cpp', 'effects/SkPixelXorXfermode.cpp', 'effects/SkShaderExtras.cpp', 'effects/SkTransparentShader.cpp', 'effects/SkUnitMappers.cpp', 'ext/image_operations.cc', 'ext/convolver.cc', 'ext/skia_utils.cc', 'images/SkImageDecoder.cpp', 'images/SkImageRef.cpp', 'images/SkStream.cpp', 'picture/SkPictureFlat.cpp', 'picture/SkPicturePlayback.cpp', 'picture/SkPictureRecord.cpp', 'ports/SkFontHost_none.cpp', 'ports/SkGlobals_global.cpp', 'ports/SkImageDecoder_Factory.cpp', 'ports/SkOSFile_stdio.cpp', 'sgl/SkAlphaRuns.cpp', 'sgl/SkBitmap.cpp', 'sgl/SkBitmapProcShader.cpp', 'sgl/SkBitmapProcState.cpp', 'sgl/SkBitmapProcState_matrixProcs.cpp', 'sgl/SkBitmapSampler.cpp', 'sgl/SkBitmapShader.cpp', 'sgl/SkBlitRow_D16.cpp', 'sgl/SkBlitRow_D4444.cpp', 'sgl/SkBlitter.cpp', 'sgl/SkBlitter_4444.cpp', 'sgl/SkBlitter_A1.cpp', 'sgl/SkBlitter_A8.cpp', 'sgl/SkBlitter_ARGB32.cpp', 'sgl/SkBlitter_RGB16.cpp', 'sgl/SkBlitter_Sprite.cpp', 'sgl/SkCanvas.cpp', 'sgl/SkColor.cpp', 'sgl/SkColorFilter.cpp', 'sgl/SkColorTable.cpp', 'sgl/SkDeque.cpp', 'sgl/SkDevice.cpp', 'sgl/SkDither.cpp', 'sgl/SkDraw.cpp', 'sgl/SkEdge.cpp', 'sgl/SkFilterProc.cpp', 'sgl/SkFlattenable.cpp', 'sgl/SkGeometry.cpp', 'sgl/SkGlobals.cpp', 'sgl/SkGlyphCache.cpp', 'sgl/SkGraphics.cpp', 'sgl/SkMask.cpp', 'sgl/SkMaskFilter.cpp', 'sgl/SkPackBits.cpp', 'sgl/SkPaint.cpp', 'sgl/SkPath.cpp', 'sgl/SkPathEffect.cpp', 'sgl/SkPathMeasure.cpp', 'sgl/SkPicture.cpp', 'sgl/SkPixelRef.cpp', 'sgl/SkProcSpriteBlitter.cpp', 'sgl/SkPtrRecorder.cpp', 'sgl/SkRasterizer.cpp', 'sgl/SkRefCnt.cpp', 'sgl/SkRegion_path.cpp', 'sgl/SkScalerContext.cpp', 'sgl/SkScan.cpp', 'sgl/SkScan_Antihair.cpp', 'sgl/SkScan_AntiPath.cpp', 'sgl/SkScan_Hairline.cpp', 'sgl/SkScan_Path.cpp', 'sgl/SkShader.cpp', 'sgl/SkSpriteBlitter_ARGB32.cpp', 'sgl/SkSpriteBlitter_RGB16.cpp', 'sgl/SkString.cpp', 'sgl/SkStroke.cpp', 'sgl/SkStrokerPriv.cpp', 'sgl/SkTSearch.cpp', 'sgl/SkTypeface_fake.cpp', 'sgl/SkUtils.cpp', 'sgl/SkWriter32.cpp', 'sgl/SkXfermode.cpp', ] if env['PLATFORM'] == 'posix': input_files.append('ext/bitmap_platform_device_linux.cc') input_files.append('ext/platform_canvas_linux.cc') input_files.append('ext/platform_device_linux.cc') # On Linux we use Skia to render fonts with FreeType and fontconfig input_files.remove('sgl/SkTypeface_fake.cpp') input_files.remove('ports/SkFontHost_none.cpp') input_files.append('sgl/SkTypeface.cpp') input_files.append('ports/SkFontHost_FreeType.cpp') input_files.append('ports/SkFontHost_TrueType_Tables.cpp') input_files.append('ports/SkFontHost_gamma_none.cpp') input_files.append('ports/SkFontHost_fontconfig.cpp') input_files.append('images/SkMMapStream.cpp') if env['PLATFORM'] in ('darwin', 'posix'): input_files.append('ports/SkThread_pthread.cpp') if env['PLATFORM'] == 'darwin': input_files.append('ext/bitmap_platform_device_mac.cc') input_files.append('ext/platform_canvas_mac.cc') input_files.append('ext/platform_device_mac.cc') if env['PLATFORM'] == 'win32': input_files.append('ext/bitmap_platform_device_win.cc') input_files.append('ext/platform_canvas_win.cc') input_files.append('ext/platform_device_win.cc') input_files.append('ext/skia_utils_win.cc') input_files.append('ext/vector_canvas.cc') input_files.append('ext/vector_device.cc') input_files.append('ports/SkThread_win.cpp') env_p = env.Clone( PCHSTOP = 'SkTypes.h', PDB = 'vc80.pdb', ) # TODO(rspangler): This step forces -Zi, but doesn't actually use it. Need to # fix so it doesn't override our -Z7. -Zi also causes vc80.pdb to be created # in the skia directory. # TODO(bradnelson): This step creates a skia.pch.ib_tag file to be created. # It's a 0-length file so likely harmless. Is this a side effect of having # IncrediBuild installed on the build machine? pch, obj = env_p.PCH(['skia.pch', 'precompiled.obj'], 'precompiled.cc') env_p['PCH'] = pch input_files += [obj] env.ChromeStaticLibrary('skia', input_files)