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
9 # skia_for_chromium_defines.gypi defines skia_for_chromium_defines
10 '../third_party/skia/gyp/skia_for_chromium_defines.gypi',
19 [ 'OS != "android"', {
21 ['exclude', '_android\\.(cc|cpp)$'],
24 [ 'OS == "android"', {
26 'SK_FONTHOST_DOES_NOT_USE_FONTMGR',
31 ['exclude', '_ios\\.(cc|cpp|mm?)$'],
41 ['exclude', '_mac\\.(cc|cpp|mm?)$'],
50 'sources/': [ ['exclude', '_win\\.(cc|cpp)$'] ],
54 # On windows, GDI handles are a scarse system-wide resource so we have to keep
55 # the glyph cache, which holds up to 4 GDI handles per entry, to a fairly small
57 # http://crbug.com/314387
58 'SK_DEFAULT_FONT_CACHE_COUNT_LIMIT=256',
61 [ 'desktop_linux == 0 and chromeos == 0', {
62 'sources/': [ ['exclude', '_linux\\.(cc|cpp)$'] ],
65 'sources/': [ ['exclude', '_cairo\\.(cc|cpp)$'] ],
68 #Settings for text blitting, chosen to approximate the system browser.
71 'SK_GAMMA_EXPONENT=1.2',
72 'SK_GAMMA_CONTRAST=0.2',
73 'SK_HIGH_QUALITY_IS_LANCZOS',
78 'SK_GAMMA_APPLY_TO_A8',
79 'SK_GAMMA_EXPONENT=1.4',
80 'SK_GAMMA_CONTRAST=0.0',
86 'SK_GAMMA_CONTRAST=0.5',
87 'SK_HIGH_QUALITY_IS_LANCZOS',
93 'SK_GAMMA_CONTRAST=0.0',
94 'SK_HIGH_QUALITY_IS_LANCZOS',
98 # For POSIX platforms, prefer the Mutex implementation provided by Skia
99 # since it does not generate static initializers.
102 'SK_USE_POSIX_THREADS',
104 'direct_dependent_settings': {
106 'SK_USE_POSIX_THREADS',
112 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', {
117 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon_optional == 1', {
119 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
128 'skia_support_gpu': 0,
130 'skia_support_gpu': 1,
132 ['OS=="ios" or enable_printing == 0', {
133 'skia_support_pdf': 0,
135 'skia_support_pdf': 1,
139 'skia_support_gpu': '<(skia_support_gpu)',
140 'skia_support_pdf': '<(skia_support_pdf)',
142 # These two set the paths so we can include skia/gyp/core.gypi
143 'skia_src_path': '../third_party/skia/src',
144 'skia_include_path': '../third_party/skia/include',
146 # This list will contain all defines that also need to be exported to
147 # dependent components.
148 'skia_export_defines': [
149 'SK_ENABLE_INST_COUNT=0',
150 'SK_SUPPORT_GPU=<(skia_support_gpu)',
151 'GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"',
152 'SK_ENABLE_LEGACY_API_ALIASING=1',
153 'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1',
154 'GR_GL_IGNORE_ES3_MSAA=0',
155 'SK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT',
157 # This variable contains additional defines, specified in skia's
158 # skia_for_chromium_defines.gypi file.
159 '<@(skia_for_chromium_defines)',
160 'SK_SUPPORT_LEGACY_GETTOTALCLIP',
163 'default_font_cache_limit%': '(20*1024*1024)',
167 # Android devices are typically more memory constrained, so
168 # default to a smaller glyph cache (it may be overriden at runtime
169 # when the renderer starts up, depending on the actual device memory).
170 'default_font_cache_limit': '(1*1024*1024)',
171 'skia_export_defines': [
172 'SK_BUILD_FOR_ANDROID',
179 '<@(skia_export_defines)',
181 # skia uses static initializers to initialize the serialization logic
182 # of its "pictures" library. This is currently not used in chrome; if
183 # it ever gets used the processes that use it need to call
184 # SkGraphics::Init().
185 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0',
187 # Forcing the unoptimized path for the offset image filter in skia until
188 # all filters used in Blink support the optimized path properly
189 'SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION',
191 # Disable this check because it is too strict for some Chromium-specific
192 # subclasses of SkPixelRef. See bug: crbug.com/171776.
193 'SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK',
195 'IGNORE_ROT_AA_RECT_OPT',
197 'SK_IGNORE_BLURRED_RRECT_OPT',
199 'SK_IGNORE_QUAD_RR_CORNERS_OPT',
201 # this flag forces Skia not to use typographic metrics with GDI.
202 'SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS',
204 'SK_DEFAULT_FONT_CACHE_LIMIT=<(default_font_cache_limit)',
206 'SK_USE_DISCARDABLE_SCALEDIMAGECACHE',
209 'direct_dependent_settings': {
211 '<@(skia_export_defines)',
215 # We would prefer this to be direct_dependent_settings,
216 # however we currently have no means to enforce that direct dependents
217 # re-export if they include Skia headers in their public headers.
218 'all_dependent_settings': {
225 'msvs_disabled_warnings': [4244, 4267, 4341, 4345, 4390, 4554, 4748, 4800],