summaryrefslogtreecommitdiffstats
path: root/skia/SConscript
blob: 0178f3823c699ed96d5e78e061043af03e85f5bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# 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',
  '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_VDMX.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/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)