Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: skia/BUILD.gn

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
7 import("//testing/test.gni") 7 import("//testing/test.gni")
8 if (cpu_arch == "arm") { 8 if (cpu_arch == "arm") {
9 import("//build/config/arm.gni") 9 import("//build/config/arm.gni")
10 } 10 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 "//third_party/skia/include/config", 109 "//third_party/skia/include/config",
110 "//third_party/skia/include/core", 110 "//third_party/skia/include/core",
111 "//third_party/skia/include/effects", 111 "//third_party/skia/include/effects",
112 "//third_party/skia/include/images", 112 "//third_party/skia/include/images",
113 "//third_party/skia/include/lazy", 113 "//third_party/skia/include/lazy",
114 "//third_party/skia/include/pathops", 114 "//third_party/skia/include/pathops",
115 "//third_party/skia/include/pdf", 115 "//third_party/skia/include/pdf",
116 "//third_party/skia/include/pipe", 116 "//third_party/skia/include/pipe",
117 "//third_party/skia/include/ports", 117 "//third_party/skia/include/ports",
118 "//third_party/skia/include/utils", 118 "//third_party/skia/include/utils",
119
120 # need to move this to internal. see crbug.com/457691
119 "//third_party/skia/src/core", 121 "//third_party/skia/src/core",
120 "//third_party/skia/src/image",
121 "//third_party/skia/src/opts",
122 "//third_party/skia/src/pdf",
123 "//third_party/skia/src/ports",
124 "//third_party/skia/src/sfnt",
125 "//third_party/skia/src/utils",
126 "//third_party/skia/src/lazy",
127 ] 122 ]
128 123
129 defines = gypi_skia_defines.skia_for_chromium_defines 124 defines = gypi_skia_defines.skia_for_chromium_defines
130 125
131 defines += [ 126 defines += []
132 "SK_ENABLE_INST_COUNT=0",
133 "GR_GL_CUSTOM_SETUP_HEADER=\"GrGLConfig_chrome.h\"",
134 "SK_ENABLE_LEGACY_API_ALIASING=1",
135 "SK_ATTR_DEPRECATED=SK_NOTHING_ARG1",
136 "GR_GL_IGNORE_ES3_MSAA=0",
137 "SK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT",
138 "SK_SUPPORT_LEGACY_GETTOTALCLIP",
139 ]
140 127
141 if (component_mode == "shared_library") { 128 if (component_mode == "shared_library") {
142 defines += [ "SKIA_DLL" ] 129 defines += [ "SKIA_DLL" ]
143 } 130 }
144 131
145 if (skia_support_gpu) { 132 if (skia_support_gpu) {
146 include_dirs += [ 133 include_dirs += [
147 "//third_party/skia/include/gpu", 134 "//third_party/skia/include/gpu",
148 "//third_party/skia/src/gpu", 135 "//third_party/skia/src/gpu",
149 ] 136 ]
150 defines += [ "SK_SUPPORT_GPU=1" ] 137 defines += [ "SK_SUPPORT_GPU=1" ]
151 } else { 138 } else {
152 defines += [ "SK_SUPPORT_GPU=0" ] 139 defines += [ "SK_SUPPORT_GPU=0" ]
153 } 140 }
154 141
155 # For POSIX platforms, prefer the Mutex implementation provided by Skia
156 # since it does not generate static initializers.
157 if (is_posix) {
158 defines += [ "SK_USE_POSIX_THREADS" ]
159 }
160
161 if (is_android) { 142 if (is_android) {
162 defines += [ 143 defines += [
163 "SK_BUILD_FOR_ANDROID", 144 "SK_BUILD_FOR_ANDROID",
164 "USE_CHROMIUM_SKIA", 145 "USE_CHROMIUM_SKIA",
165 ] 146 ]
166 } 147 }
167 148
168 if (is_mac) { 149 if (is_mac) {
169 defines += [ "SK_BUILD_FOR_MAC" ] 150 defines += [ "SK_BUILD_FOR_MAC" ]
170 } 151 }
171 } 152 }
172 153
173 # Internal-facing config for Skia library code. 154 # Internal-facing config for Skia library code.
174 config("skia_library_config") { 155 config("skia_library_config") {
175 # These include directories are only included for Skia code and are not 156 # These include directories are only included for Skia code and are not
176 # exported to dependents. It's not clear if this is on purpose, but this 157 # exported to dependents. It's not clear if this is on purpose, but this
177 # matches the GYP build. 158 # matches the GYP build.
178 include_dirs = [] 159 include_dirs = [
160 "//third_party/skia/src/image",
161 "//third_party/skia/src/opts",
162 "//third_party/skia/src/pdf",
163 "//third_party/skia/src/ports",
164 "//third_party/skia/src/sfnt",
165 "//third_party/skia/src/utils",
166 "//third_party/skia/src/lazy",
167 ]
179 if (is_mac || is_ios) { 168 if (is_mac || is_ios) {
180 include_dirs += [ "//third_party/skia/include/utils/mac" ] 169 include_dirs += [ "//third_party/skia/include/utils/mac" ]
181 } 170 }
182 if (is_mac) { 171 if (is_mac) {
183 include_dirs += [ "//third_party/skia/include/utils/ios" ] 172 include_dirs += [ "//third_party/skia/include/utils/ios" ]
184 } 173 }
185 174
186 defines = [ 175 defines = []
187 #skia_export_defines ???) TODO
188
189 # skia uses static initializers to initialize the serialization logic
190 # of its "pictures" library. This is currently not used in chrome; if
191 # it ever gets used the processes that use it need to call
192 # SkGraphics::Init().
193 "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0",
194
195 # Forcing the unoptimized path for the offset image filter in skia until
196 # all filters used in Blink support the optimized path properly
197 "SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION",
198 "IGNORE_ROT_AA_RECT_OPT",
199 "SK_IGNORE_BLURRED_RRECT_OPT",
200
201 # this flag forces Skia not to use typographic metrics with GDI.
202 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS",
203 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE",
204 ]
205 176
206 if (component_mode == "shared_library") { 177 if (component_mode == "shared_library") {
207 defines += [ "SKIA_IMPLEMENTATION=1" ] 178 defines += [ "SKIA_IMPLEMENTATION=1" ]
208 } 179 }
209 180
210 if (cpu_arch == "arm") { 181 if (cpu_arch == "arm") {
211 if (arm_use_neon) { 182 if (arm_use_neon) {
212 defines += [ "SK_ARM_HAS_NEON" ] 183 defines += [ "SK_ARM_HAS_NEON" ]
213 } 184 }
214 if (arm_optionally_use_neon) { 185 if (arm_optionally_use_neon) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 # Android devices are typically more memory constrained, so default to a 219 # Android devices are typically more memory constrained, so default to a
249 # smaller glyph cache (it may be overriden at runtime when the renderer 220 # smaller glyph cache (it may be overriden at runtime when the renderer
250 # starts up, depending on the actual device memory). 221 # starts up, depending on the actual device memory).
251 "SK_DEFAULT_FONT_CACHE_LIMIT=1048576", # 1024 * 1024 222 "SK_DEFAULT_FONT_CACHE_LIMIT=1048576", # 1024 * 1024
252 ] 223 ]
253 } else { 224 } else {
254 defines += [ "SK_DEFAULT_FONT_CACHE_LIMIT=20971520" ] # 20 * 1024 * 1024 225 defines += [ "SK_DEFAULT_FONT_CACHE_LIMIT=20971520" ] # 20 * 1024 * 1024
255 } 226 }
256 227
257 if (is_win) { 228 if (is_win) {
258 include_dirs = [ 229 include_dirs += [
259 "//third_party/skia/include/utils/win", 230 "//third_party/skia/include/utils/win",
260 "//third_party/skia/src/utils/win", 231 "//third_party/skia/src/utils/win",
261 ] 232 ]
262 233
263 defines += [ "SK_FONTHOST_USES_FONTMGR" ] 234 defines += [ "SK_FONTHOST_USES_FONTMGR" ]
264 235
265 cflags = [ 236 cflags = [
266 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)' 237 "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)'
267 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit). 238 "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit).
268 "/wd4341", # signed value is out of range for enum constant. 239 "/wd4341", # signed value is out of range for enum constant.
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 609
639 deps = [ 610 deps = [
640 ":skia", 611 ":skia",
641 "//base", 612 "//base",
642 "//base/test:run_all_unittests", 613 "//base/test:run_all_unittests",
643 "//testing/gtest", 614 "//testing/gtest",
644 "//ui/gfx", 615 "//ui/gfx",
645 "//ui/gfx/geometry", 616 "//ui/gfx/geometry",
646 ] 617 ]
647 } 618 }
OLDNEW
« no previous file with comments | « shell/android/apk/src/org/chromium/mojo/shell/MojoShellApplication.java ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698