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 # blink_skia_config.gypi defines blink_skia_defines
10 '../third_party/WebKit/public/blink_skia_config.gypi',
12 # skia_for_chromium_defines.gypi defines skia_for_chromium_defines
13 '../third_party/skia/gyp/skia_for_chromium_defines.gypi',
22 [ 'OS != "android"', {
24 ['exclude', '_android\\.(cc|cpp)$'],
29 ['exclude', '_ios\\.(cc|cpp|mm?)$'],
39 ['exclude', '_mac\\.(cc|cpp|mm?)$'],
48 'sources/': [ ['exclude', '_win\\.(cc|cpp)$'] ],
52 # On windows, GDI handles are a scarse system-wide resource so we have to keep
53 # the glyph cache, which holds up to 4 GDI handles per entry, to a fairly small
55 # http://crbug.com/314387
56 'SK_DEFAULT_FONT_CACHE_COUNT_LIMIT=256',
59 [ 'desktop_linux == 0 and chromeos == 0', {
60 'sources/': [ ['exclude', '_linux\\.(cc|cpp)$'] ],
63 'sources/': [ ['exclude', '_cairo\\.(cc|cpp)$'] ],
66 #Settings for text blitting, chosen to approximate the system browser.
69 'SK_GAMMA_EXPONENT=1.2',
70 'SK_GAMMA_CONTRAST=0.2',
75 'SK_GAMMA_APPLY_TO_A8',
76 'SK_GAMMA_EXPONENT=1.4',
77 'SK_GAMMA_CONTRAST=0.0',
83 'SK_GAMMA_CONTRAST=0.5',
89 'SK_GAMMA_CONTRAST=0.0',
94 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', {
99 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 0 and arm_neon_optional == 1', {
101 'SK_ARM_HAS_OPTIONAL_NEON',
110 'skia_support_gpu': 0,
112 'skia_support_gpu': 1,
114 ['OS=="ios" or (enable_basic_printing==0 and enable_print_preview==0)', {
115 'skia_support_pdf': 0,
117 'skia_support_pdf': 1,
121 'skia_support_gpu': '<(skia_support_gpu)',
122 'skia_support_pdf': '<(skia_support_pdf)',
124 # These two set the paths so we can include skia/gyp/core.gypi
125 'skia_src_path': '../third_party/skia/src',
126 'skia_include_path': '../third_party/skia/include',
128 # This list will contain all defines that also need to be exported to
129 # dependent components.
130 'skia_export_defines': [
131 'SK_SUPPORT_GPU=<(skia_support_gpu)',
133 # This variable contains additional defines, specified in blink's
134 # blink_skia_config.gypi file.
135 '<@(blink_skia_defines)',
137 # This variable contains additional defines, specified in skia's
138 # skia_for_chromium_defines.gypi file.
139 '<@(skia_for_chromium_defines)',
142 'default_font_cache_limit%': '(20*1024*1024)',
146 # Android devices are typically more memory constrained, so
147 # default to a smaller glyph cache (it may be overriden at runtime
148 # when the renderer starts up, depending on the actual device memory).
149 'default_font_cache_limit': '(1*1024*1024)',
150 'skia_export_defines': [
151 'SK_BUILD_FOR_ANDROID',
158 '<@(skia_export_defines)',
160 'SK_DEFAULT_FONT_CACHE_LIMIT=<(default_font_cache_limit)',
163 'direct_dependent_settings': {
165 '<@(skia_export_defines)',
169 # We would prefer this to be direct_dependent_settings,
170 # however we currently have no means to enforce that direct dependents
171 # re-export if they include Skia headers in their public headers.
172 'all_dependent_settings': {
179 'msvs_disabled_warnings': [4244, 4267, 4341, 4345, 4390, 4554, 4748, 4800],