aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/bench.gyp
blob: d404000fcece0d5d0308588cdc6d30fda708b15a (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
# GYP file to build performance testbench.
#
{
  'includes': [
    'apptype_console.gypi',
  ],
  'targets': [
    {
      'target_name': 'bench',
      'type': 'executable',
      'include_dirs' : [
        '../src/core',
        '../src/effects',
        '../src/utils',
      ],
      'dependencies': [
        'skia_lib.gyp:skia_lib',
        'bench_timer',
        'flags.gyp:flags',
        'jsoncpp.gyp:jsoncpp',
      ],
      'sources': [
        '../bench/AAClipBench.cpp',
        '../bench/BicubicBench.cpp',
        '../bench/BitmapBench.cpp',
        '../bench/BitmapRectBench.cpp',
        '../bench/BitmapScaleBench.cpp',
        '../bench/BlurBench.cpp',
        '../bench/BlurImageFilterBench.cpp',
        '../bench/BlurRectBench.cpp',
        '../bench/BlurRoundRectBench.cpp',
        '../bench/ChartBench.cpp',
        '../bench/ChecksumBench.cpp',
        '../bench/ChromeBench.cpp',
        '../bench/CmapBench.cpp',
        '../bench/ColorFilterBench.cpp',
        '../bench/ColorPrivBench.cpp',
        '../bench/CoverageBench.cpp',
        '../bench/DashBench.cpp',
        '../bench/DecodeBench.cpp',
        '../bench/DeferredCanvasBench.cpp',
        '../bench/DeferredSurfaceCopyBench.cpp',
        '../bench/DisplacementBench.cpp',
        '../bench/FSRectBench.cpp',
        '../bench/FontCacheBench.cpp',
        '../bench/FontScalerBench.cpp',
        '../bench/GameBench.cpp',
        '../bench/GrMemoryPoolBench.cpp',
        '../bench/GrResourceCacheBench.cpp',
        '../bench/GradientBench.cpp',
        '../bench/HairlinePathBench.cpp',
        '../bench/ImageCacheBench.cpp',
        '../bench/ImageDecodeBench.cpp',
        '../bench/InterpBench.cpp',
        '../bench/LightingBench.cpp',
        '../bench/LineBench.cpp',
        '../bench/MagnifierBench.cpp',
        '../bench/MathBench.cpp',
        '../bench/Matrix44Bench.cpp',
        '../bench/MatrixBench.cpp',
        '../bench/MatrixConvolutionBench.cpp',
        '../bench/MemoryBench.cpp',
        '../bench/MemsetBench.cpp',
        '../bench/MergeBench.cpp',
        '../bench/MorphologyBench.cpp',
        '../bench/MutexBench.cpp',
        '../bench/PathBench.cpp',
        '../bench/PathIterBench.cpp',
        '../bench/PathUtilsBench.cpp',
        '../bench/PerlinNoiseBench.cpp',
        '../bench/PicturePlaybackBench.cpp',
        '../bench/PictureRecordBench.cpp',
        '../bench/PremulAndUnpremulAlphaOpsBench.cpp',
        '../bench/RTreeBench.cpp',
        '../bench/ReadPixBench.cpp',
        '../bench/RectBench.cpp',
        '../bench/RectoriBench.cpp',
        '../bench/RefCntBench.cpp',
        '../bench/RegionBench.cpp',
        '../bench/RegionContainBench.cpp',
        '../bench/RepeatTileBench.cpp',
        '../bench/ScalarBench.cpp',
        '../bench/ShaderMaskBench.cpp',
        '../bench/SkipZeroesBench.cpp',
        '../bench/SortBench.cpp',
        '../bench/StackBench.cpp',
        '../bench/StrokeBench.cpp',
        '../bench/TableBench.cpp',
        '../bench/TextBench.cpp',
        '../bench/TileBench.cpp',
        '../bench/VertBench.cpp',
        '../bench/WritePixelsBench.cpp',
        '../bench/WriterBench.cpp',
        '../bench/XfermodeBench.cpp',

        '../bench/SkBenchLogger.cpp',
        '../bench/SkBenchLogger.h',
        '../bench/SkBenchmark.cpp',
        '../bench/SkBenchmark.h',
        '../bench/benchmain.cpp',
      ],
      'conditions': [
        ['skia_gpu == 1',
          {
            'include_dirs' : [
              '../src/gpu',
            ],
            'dependencies': [
              'gputest.gyp:skgputest',
            ],
          },
        ],
      ],
    },
    {
      'target_name' : 'bench_timer',
      'type': 'static_library',
      'sources': [
        '../bench/BenchTimer.h',
        '../bench/BenchTimer.cpp',
        '../bench/BenchSysTimer_mach.h',
        '../bench/BenchSysTimer_mach.cpp',
        '../bench/BenchSysTimer_posix.h',
        '../bench/BenchSysTimer_posix.cpp',
        '../bench/BenchSysTimer_windows.h',
        '../bench/BenchSysTimer_windows.cpp',
      ],
        'include_dirs': [
        '../src/core',
        '../src/gpu',
      ],
      'dependencies': [
        'skia_lib.gyp:skia_lib',
      ],
      'conditions': [
        [ 'skia_os not in ["mac", "ios"]', {
          'sources!': [
            '../bench/BenchSysTimer_mach.h',
            '../bench/BenchSysTimer_mach.cpp',
          ],
        }],
        [ 'skia_os not in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
          'sources!': [
            '../bench/BenchSysTimer_posix.h',
            '../bench/BenchSysTimer_posix.cpp',
          ],
        }],
        [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
          'link_settings': {
            'libraries': [
              '-lrt',
            ],
          },
        }],
        [ 'skia_os != "win"', {
          'sources!': [
            '../bench/BenchSysTimer_windows.h',
            '../bench/BenchSysTimer_windows.cpp',
          ],
        }],
        ['skia_gpu == 1', {
          'sources': [
            '../bench/BenchGpuTimer_gl.h',
            '../bench/BenchGpuTimer_gl.cpp',
          ],
        }],
      ],
    }
  ],
}