1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # This gypi file handles the removal of platform-specific files from the
14 [ 'OS != "android"', {
16 ['exclude', '_android\\.(cc|cpp)$'],
19 [ 'OS == "android"', {
21 'SK_FONTHOST_DOES_NOT_USE_FONTMGR',
26 ['exclude', '_ios\\.(cc|cpp|mm?)$'],
36 ['exclude', '_mac\\.(cc|cpp|mm?)$'],
45 'sources/': [ ['exclude', '_win\\.(cc|cpp)$'] ],
49 # On windows, GDI handles are a scarse system-wide resource so we have to keep
50 # the glyph cache, which holds up to 4 GDI handles per entry, to a fairly small
52 # http://crbug.com/314387
53 'SK_DEFAULT_FONT_CACHE_COUNT_LIMIT=256',
56 [ 'desktop_linux == 0 and chromeos == 0', {
57 'sources/': [ ['exclude', '_linux\\.(cc|cpp)$'] ],
60 'sources/': [ ['exclude', '_cairo\\.(cc|cpp)$'] ],
63 #Settings for text blitting, chosen to approximate the system browser.
66 'SK_GAMMA_EXPONENT=1.2',
67 'SK_GAMMA_CONTRAST=0.2',
72 'SK_GAMMA_APPLY_TO_A8',
73 'SK_GAMMA_EXPONENT=1.4',
74 'SK_GAMMA_CONTRAST=0.0',
80 'SK_GAMMA_CONTRAST=0.5',
86 'SK_GAMMA_CONTRAST=0.0',
90 # For POSIX platforms, prefer the Mutex implementation provided by Skia
91 # since it does not generate static initializers.
94 'SK_USE_POSIX_THREADS',
96 'direct_dependent_settings': {
98 'SK_USE_POSIX_THREADS',
104 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', {
109 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon_optional == 1', {
111 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
120 'skia_support_gpu': 0,
122 'skia_support_gpu': 1,
124 ['OS=="ios" or enable_printing == 0', {
125 'skia_support_pdf': 0,
127 'skia_support_pdf': 1,
131 'skia_support_gpu': '<(skia_support_gpu)',
132 'skia_support_pdf': '<(skia_support_pdf)',
134 # These two set the paths so we can include skia/gyp/core.gypi
135 'skia_src_path': '../third_party/skia/src',
136 'skia_include_path': '../third_party/skia/include',
138 # This list will contain all defines that also need to be exported to
139 # dependent components.
140 'skia_export_defines': [
141 'SK_ENABLE_INST_COUNT=0',
142 'SK_SUPPORT_GPU=<(skia_support_gpu)',
143 'GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"',
144 'SK_ENABLE_LEGACY_API_ALIASING=1',
145 'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1',
146 'SK_SUPPORT_LEGACY_COLORTYPE=1',
147 'GR_GL_IGNORE_ES3_MSAA=0',
148 'SK_SUPPORT_DEPRECATED_SCALARROUND',
149 'SK_SUPPORT_LEGACY_SK64',
150 'SK_SUPPORT_LEGACY_ONLOCKPIXELS',
153 'default_font_cache_limit%': '(20*1024*1024)',
157 # Android devices are typically more memory constrained, so
158 # default to a smaller glyph cache (it may be overriden at runtime
159 # when the renderer starts up, depending on the actual device memory).
160 'default_font_cache_limit': '(1*1024*1024)',
161 'skia_export_defines': [
162 'SK_BUILD_FOR_ANDROID',
169 '<@(skia_export_defines)',
171 # skia uses static initializers to initialize the serialization logic
172 # of its "pictures" library. This is currently not used in chrome; if
173 # it ever gets used the processes that use it need to call
174 # SkGraphics::Init().
175 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0',
177 # Forcing the unoptimized path for the offset image filter in skia until
178 # all filters used in Blink support the optimized path properly
179 'SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION',
181 # Disable this check because it is too strict for some Chromium-specific
182 # subclasses of SkPixelRef. See bug: crbug.com/171776.
183 'SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK',
185 'IGNORE_ROT_AA_RECT_OPT',
187 'SK_IGNORE_BLURRED_RRECT_OPT',
189 'SK_IGNORE_QUAD_RR_CORNERS_OPT',
191 # this flag forces Skia not to use typographic metrics with GDI.
192 'SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS',
194 'SK_DEFAULT_FONT_CACHE_LIMIT=<(default_font_cache_limit)',
197 'direct_dependent_settings': {
199 '<@(skia_export_defines)',
203 # We would prefer this to be direct_dependent_settings,
204 # however we currently have no means to enforce that direct dependents
205 # re-export if they include Skia headers in their public headers.
206 'all_dependent_settings': {
213 'msvs_disabled_warnings': [4244, 4267, 4341, 4345, 4390, 4554, 4748, 4800],