Non-SFI mode: Clean up macros of base/ and ipc/ libraries for nacl_helper_nonsfi.
[chromium-blink-merge.git] / ui / compositor / BUILD.gn
blob38b79ade675cd1a9c73bd73d447e14a08269bd41
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
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
7 component("compositor") {
8   sources = [
9     "closure_animation_observer.cc",
10     "closure_animation_observer.h",
11     "compositor.cc",
12     "compositor.h",
13     "compositor_animation_observer.h",
14     "compositor_export.h",
15     "compositor_observer.cc",
16     "compositor_observer.h",
17     "compositor_vsync_manager.cc",
18     "compositor_vsync_manager.h",
19     "compositor_switches.cc",
20     "compositor_switches.h",
21     "debug_utils.cc",
22     "debug_utils.h",
23     "dip_util.cc",
24     "dip_util.h",
25     "float_animation_curve_adapter.cc",
26     "float_animation_curve_adapter.h",
27     "layer.cc",
28     "layer.h",
29     "layer_animation_delegate.h",
30     "layer_animation_element.cc",
31     "layer_animation_element.h",
32     "layer_animation_observer.cc",
33     "layer_animation_observer.h",
34     "layer_animation_sequence.cc",
35     "layer_animation_sequence.h",
36     "layer_animator.cc",
37     "layer_animator.h",
38     "layer_animator_collection.cc",
39     "layer_animator_collection.h",
40     "layer_delegate.h",
41     "layer_owner.cc",
42     "layer_owner.h",
43     "layer_tree_owner.cc",
44     "layer_tree_owner.h",
45     "layer_type.h",
46     "reflector.h",
47     "scoped_animation_duration_scale_mode.cc",
48     "scoped_animation_duration_scale_mode.h",
49     "scoped_layer_animation_settings.cc",
50     "scoped_layer_animation_settings.h",
51     "transform_animation_curve_adapter.cc",
52     "transform_animation_curve_adapter.h",
53   ]
55   defines = [ "COMPOSITOR_IMPLEMENTATION" ]
57   deps = [
58     "//base",
59     "//base/third_party/dynamic_annotations",
60     "//cc",
61     "//cc/surfaces",
62     "//gpu/command_buffer/common",
63     "//skia",
64     "//ui/gfx",
65     "//ui/gfx/geometry",
66     "//ui/gl",
67   ]
69   if (is_win && use_aura) {
70     # TODO(sky): before we make this real need to remove
71     # IDR_BITMAP_BRUSH_IMAGE.
72     deps += [
73       "//ui/resources",
74       "//third_party/angle:libEGL",
75       "//third_party/angle:libGLESv2",
76     ]
77   }
80 source_set("test_support") {
81   testonly = true
82   sources = [
83     "test/context_factories_for_test.cc",
84     "test/context_factories_for_test.h",
85     "test/draw_waiter_for_test.cc",
86     "test/draw_waiter_for_test.h",
87     "test/in_process_context_factory.cc",
88     "test/in_process_context_factory.h",
89     "test/layer_animator_test_controller.cc",
90     "test/layer_animator_test_controller.h",
91     "test/test_compositor_host.h",
92     "test/test_compositor_host_mac.mm",
93     "test/test_compositor_host_win.cc",
94     "test/test_layer_animation_delegate.cc",
95     "test/test_layer_animation_delegate.h",
96     "test/test_layer_animation_observer.cc",
97     "test/test_layer_animation_observer.h",
98     "test/test_layers.cc",
99     "test/test_layers.h",
100     "test/test_suite.cc",
101     "test/test_suite.h",
102     "test/test_utils.cc",
103     "test/test_utils.h",
104   ]
106   public_deps = [
107     ":compositor",
108   ]
109   deps = [
110     "//base/test:test_support",
111     "//cc",
112     "//cc/surfaces",
113     "//cc:test_support",
114     "//skia",
115     "//testing/gtest",
116     "//third_party/WebKit/public:blink_minimal",
117     "//ui/base",
118     "//ui/gfx",
119     "//ui/gfx/geometry",
120     "//ui/gl",
121     "//webkit/common/gpu",
122   ]
124   if (use_x11) {
125     configs += [ "//build/config/linux:x11" ]
126     deps += [ "//ui/gfx/x" ]
127   }
129   if (use_ozone) {
130     sources += [ "test/test_compositor_host_ozone.cc" ]
131   } else if (use_x11) {
132     sources += [ "test/test_compositor_host_x11.cc" ]
133   }
136 # TODO(GYP) enable this when all dependencies are complete and it links.
137 #test("compositor_unittests") {
138 #  sources = [
139 #    "layer_animation_element_unittest.cc",
140 #    "layer_animation_sequence_unittest.cc",
141 #    "layer_animator_unittest.cc",
142 #    "layer_owner_unittest.cc",
143 #    "layer_unittest.cc",
144 #    "run_all_unittests.cc",
145 #    "transform_animation_curve_adapter_unittest.cc",
146 #  ]
148 #  deps = [
149 #    ":compositor",
150 #    ":test_support",
151 #    "//base",
152 #    "//base/allocator",
153 #    "//base/test:test_support",
154 #    "//cc",
155 #    "//cc:test_support",
156 #    "//skia",
157 #    "//testing/gtest",
158 #    "//ui/base",
159 #    "//ui/gfx",
160 #    "//ui/gfx/geometry",
161 #    "//ui/gl",
162 #    "//ui/resources",
163 #  ]
165 #  if (is_linux) {
166 #    deps += [ "//third_party/mesa:osmesa" ]
167 #  }