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

Side by Side Diff: ui/gfx/BUILD.gn

Issue 2915673003: ui/gfx: Use separate components for color_space and switches (Closed)
Patch Set: Fix windows build Created 3 years, 6 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
« no previous file with comments | « no previous file | ui/gfx/color_space.h » ('j') | ui/gfx/gfx_color_export.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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/ui.gni") 5 import("//build/config/ui.gni")
6 import("//device/vr/features/features.gni") 6 import("//device/vr/features/features.gni")
7 import("//testing/test.gni") 7 import("//testing/test.gni")
8 import("//testing/libfuzzer/fuzzer_test.gni") 8 import("//testing/libfuzzer/fuzzer_test.gni")
9 9
10 if (is_android) { 10 if (is_android) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 "android/gfx_jni_registrar.cc", 47 "android/gfx_jni_registrar.cc",
48 "android/gfx_jni_registrar.h", 48 "android/gfx_jni_registrar.h",
49 "android/java_bitmap.cc", 49 "android/java_bitmap.cc",
50 "android/java_bitmap.h", 50 "android/java_bitmap.h",
51 "android/view_configuration.cc", 51 "android/view_configuration.cc",
52 "android/view_configuration.h", 52 "android/view_configuration.h",
53 "break_list.h", 53 "break_list.h",
54 "color_analysis.cc", 54 "color_analysis.cc",
55 "color_analysis.h", 55 "color_analysis.h",
56 "color_palette.h", 56 "color_palette.h",
57 "color_space_win.cc",
58 "color_space_win.h",
59 "color_transform.cc", 57 "color_transform.cc",
60 "color_transform.h", 58 "color_transform.h",
61 "color_utils.cc", 59 "color_utils.cc",
62 "color_utils.h", 60 "color_utils.h",
63 "decorated_text.cc", 61 "decorated_text.cc",
64 "decorated_text.h", 62 "decorated_text.h",
65 "favicon_size.cc", 63 "favicon_size.cc",
66 "favicon_size.h", 64 "favicon_size.h",
67 "font.cc", 65 "font.cc",
68 "font.h", 66 "font.h",
(...skipping 12 matching lines...) Expand all
81 "font_render_params_android.cc", 79 "font_render_params_android.cc",
82 "font_render_params_linux.cc", 80 "font_render_params_linux.cc",
83 "font_render_params_mac.cc", 81 "font_render_params_mac.cc",
84 "font_render_params_win.cc", 82 "font_render_params_win.cc",
85 "gdi_util.cc", 83 "gdi_util.cc",
86 "gdi_util.h", 84 "gdi_util.h",
87 "gfx_paths.cc", 85 "gfx_paths.cc",
88 "gfx_paths.h", 86 "gfx_paths.h",
89 "half_float.cc", 87 "half_float.cc",
90 "half_float.h", 88 "half_float.h",
91 "icc_profile_mac.mm",
92 "icc_profile_win.cc",
93 "icc_profile_x11.cc",
94 "icon_util.cc", 89 "icon_util.cc",
95 "icon_util.h", 90 "icon_util.h",
96 "image/image.cc", 91 "image/image.cc",
97 "image/image.h", 92 "image/image.h",
98 "image/image_family.cc", 93 "image/image_family.cc",
99 "image/image_family.h", 94 "image/image_family.h",
100 "image/image_ios.mm", 95 "image/image_ios.mm",
101 "image/image_mac.mm", 96 "image/image_mac.mm",
102 "image/image_png_rep.cc", 97 "image/image_png_rep.cc",
103 "image/image_png_rep.h", 98 "image/image_png_rep.h",
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 228
234 # This is part of the gfx component in the component build. 229 # This is part of the gfx component in the component build.
235 defines = [ "GFX_IMPLEMENTATION" ] 230 defines = [ "GFX_IMPLEMENTATION" ]
236 231
237 public_deps = [ 232 public_deps = [
238 ":color_space", 233 ":color_space",
239 ":geometry_skia", 234 ":geometry_skia",
240 ":memory_buffer_sources", 235 ":memory_buffer_sources",
241 ":native_widget_types", 236 ":native_widget_types",
242 ":selection_bound_sources", 237 ":selection_bound_sources",
243 ":switches_sources", 238 ":switches",
244 "//base", 239 "//base",
245 "//skia", 240 "//skia",
246 "//third_party/icu", 241 "//third_party/icu",
247 "//ui/gfx/animation", 242 "//ui/gfx/animation",
248 "//ui/gfx/codec", 243 "//ui/gfx/codec",
249 "//ui/gfx/geometry", 244 "//ui/gfx/geometry",
250 "//ui/gfx/range", 245 "//ui/gfx/range",
251 ] 246 ]
252 deps = [ 247 deps = [
253 ":gfx_export", 248 ":gfx_export",
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 sources -= [ 375 sources -= [
381 "nine_image_painter.cc", 376 "nine_image_painter.cc",
382 "nine_image_painter.h", 377 "nine_image_painter.h",
383 ] 378 ]
384 } 379 }
385 380
386 if (use_x11) { 381 if (use_x11) {
387 deps += [ "//ui/gfx/x" ] 382 deps += [ "//ui/gfx/x" ]
388 configs += [ "//build/config/linux:x11" ] 383 configs += [ "//build/config/linux:x11" ]
389 } else { 384 } else {
390 sources -= [ 385 sources -= [ "path_x11.cc" ]
391 "icc_profile_x11.cc",
392 "path_x11.cc",
393 ]
394 } 386 }
395 387
396 if (use_cairo) { 388 if (use_cairo) {
397 configs += [ "//build/config/linux/pangocairo" ] 389 configs += [ "//build/config/linux/pangocairo" ]
398 } 390 }
399 } 391 }
400 392
401 component("color_space") { 393 component("color_space") {
402 sources = [ 394 sources = [
403 "color_space.cc", 395 "color_space.cc",
404 "color_space.h", 396 "color_space.h",
397 "color_space_win.cc",
398 "color_space_win.h",
405 "icc_profile.cc", 399 "icc_profile.cc",
406 "icc_profile.h", 400 "icc_profile.h",
401 "icc_profile_mac.mm",
402 "icc_profile_win.cc",
403 "icc_profile_x11.cc",
407 "skia_color_space_util.cc", 404 "skia_color_space_util.cc",
408 "skia_color_space_util.h", 405 "skia_color_space_util.h",
Nico 2017/06/01 14:52:14 add new export.h file here
409 ] 406 ]
410 public_deps = [ 407 public_deps = [
411 ":gfx_export", 408 ":gfx_export",
412 "//base", 409 "//base",
413 "//skia", 410 "//skia",
414 ] 411 ]
415 deps = [ 412 deps = [
416 ":switches_sources", 413 ":switches",
417 "//base", 414 "//base",
418 "//skia", 415 "//skia",
419 ] 416 ]
420 defines = [ "GFX_IMPLEMENTATION" ] 417 defines = [ "GFX_COLOR_IMPLEMENTATION" ]
Nico 2017/06/01 14:52:14 optional nit: GFX_COLOR_SPACE_IMPLEMENTATION would
418 if (is_mac) {
419 libs = [
420 "CoreFoundation.framework",
421 "CoreGraphics.framework",
422 ]
423 }
424 if (use_x11) {
425 deps += [ "//ui/gfx/x" ]
426 configs += [ "//build/config/linux:x11" ]
427 } else {
428 sources -= [ "icc_profile_x11.cc" ]
429 }
421 } 430 }
422 431
423 # Depend on this to use half_float.h without pulling in all of gfx. 432 # Depend on this to use half_float.h without pulling in all of gfx.
424 source_set("half_float") { 433 source_set("half_float") {
425 sources = [ 434 sources = [
426 "half_float.h", 435 "half_float.h",
427 ] 436 ]
428 437
429 defines = [ "GFX_IMPLEMENTATION" ] 438 defines = [ "GFX_IMPLEMENTATION" ]
430 439
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 "gpu_memory_buffer.h", 532 "gpu_memory_buffer.h",
524 "gpu_memory_buffer_tracing.cc", 533 "gpu_memory_buffer_tracing.cc",
525 "gpu_memory_buffer_tracing.h", 534 "gpu_memory_buffer_tracing.h",
526 ] 535 ]
527 } 536 }
528 537
529 defines = [ "GFX_IMPLEMENTATION" ] 538 defines = [ "GFX_IMPLEMENTATION" ]
530 539
531 deps = [ 540 deps = [
532 ":native_widget_types", 541 ":native_widget_types",
533 ":switches_sources", 542 ":switches",
534 "//base", 543 "//base",
535 "//ui/gfx/geometry", 544 "//ui/gfx/geometry",
536 ] 545 ]
537 546
538 if (is_linux) { 547 if (is_linux) {
539 sources += [ 548 sources += [
540 "linux/client_native_pixmap_dmabuf.cc", 549 "linux/client_native_pixmap_dmabuf.cc",
541 "linux/client_native_pixmap_dmabuf.h", 550 "linux/client_native_pixmap_dmabuf.h",
542 "linux/client_native_pixmap_factory_dmabuf.cc", 551 "linux/client_native_pixmap_factory_dmabuf.cc",
543 "linux/client_native_pixmap_factory_dmabuf.h", 552 "linux/client_native_pixmap_factory_dmabuf.h",
544 ] 553 ]
545 554
546 deps += [ "//third_party/libdrm" ] 555 deps += [ "//third_party/libdrm" ]
547 } 556 }
548 } 557 }
549 558
550 source_set("switches_sources") { 559 component("switches") {
Nico 2017/06/01 14:52:14 Please call this gfx_switches, else this will resu
Nico 2017/06/16 19:24:09 I think this wasn't done.
ccameron 2017/06/16 19:49:27 Oops. Fixed.
551 visibility = [ ":*" ] # Depend on through ":switches_sources".
552
553 sources = [ 560 sources = [
561 "gfx_switches_export.h",
554 "switches.cc", 562 "switches.cc",
555 "switches.h", 563 "switches.h",
556 ] 564 ]
557 565 defines = [ "GFX_SWITCHES_IMPLEMENTATION" ]
558 defines = [ "GFX_IMPLEMENTATION" ]
559
560 deps = [
561 ":gfx_export",
562 "//base",
563 ]
564 } 566 }
565 567
566 static_library("test_support") { 568 static_library("test_support") {
567 testonly = true 569 testonly = true
568 sources = [ 570 sources = [
569 "animation/test_animation_delegate.h", 571 "animation/test_animation_delegate.h",
570 "geometry/test/rect_test_util.cc", 572 "geometry/test/rect_test_util.cc",
571 "geometry/test/rect_test_util.h", 573 "geometry/test/rect_test_util.h",
572 "image/image_unittest_util.cc", 574 "image/image_unittest_util.cc",
573 "image/image_unittest_util.h", 575 "image/image_unittest_util.h",
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 788
787 fuzzer_test("color_transform_fuzztest") { 789 fuzzer_test("color_transform_fuzztest") {
788 sources = [ 790 sources = [
789 "color_transform_fuzzer.cc", 791 "color_transform_fuzzer.cc",
790 ] 792 ]
791 deps = [ 793 deps = [
792 ":gfx", 794 ":gfx",
793 ] 795 ]
794 libfuzzer_options = [ "max_len=1024" ] 796 libfuzzer_options = [ "max_len=1024" ]
795 } 797 }
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/color_space.h » ('j') | ui/gfx/gfx_color_export.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698