Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / compositor / BUILD.gn
blobe5585d87de3f7378af7c33da5e8ab4eb9e02803c
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")
6 import("//testing/test.gni")
8 component("compositor") {
9   sources = [
10     "canvas_painter.cc",
11     "canvas_painter.h",
12     "clip_transform_recorder.cc",
13     "clip_transform_recorder.h",
14     "closure_animation_observer.cc",
15     "closure_animation_observer.h",
16     "compositing_recorder.cc",
17     "compositing_recorder.h",
18     "compositor.cc",
19     "compositor.h",
20     "compositor_animation_observer.h",
21     "compositor_export.h",
22     "compositor_observer.h",
23     "compositor_switches.cc",
24     "compositor_switches.h",
25     "compositor_vsync_manager.cc",
26     "compositor_vsync_manager.h",
27     "debug_utils.cc",
28     "debug_utils.h",
29     "dip_util.cc",
30     "dip_util.h",
31     "float_animation_curve_adapter.cc",
32     "float_animation_curve_adapter.h",
33     "layer.cc",
34     "layer.h",
35     "layer_animation_delegate.h",
36     "layer_animation_element.cc",
37     "layer_animation_element.h",
38     "layer_animation_observer.cc",
39     "layer_animation_observer.h",
40     "layer_animation_sequence.cc",
41     "layer_animation_sequence.h",
42     "layer_animator.cc",
43     "layer_animator.h",
44     "layer_animator_collection.cc",
45     "layer_animator_collection.h",
46     "layer_delegate.h",
47     "layer_owner.cc",
48     "layer_owner.h",
49     "layer_tree_owner.cc",
50     "layer_tree_owner.h",
51     "layer_type.h",
52     "paint_cache.cc",
53     "paint_cache.h",
54     "paint_context.cc",
55     "paint_context.h",
56     "paint_recorder.cc",
57     "paint_recorder.h",
58     "reflector.cc",
59     "reflector.h",
60     "scoped_animation_duration_scale_mode.cc",
61     "scoped_animation_duration_scale_mode.h",
62     "scoped_layer_animation_settings.cc",
63     "scoped_layer_animation_settings.h",
64     "transform_animation_curve_adapter.cc",
65     "transform_animation_curve_adapter.h",
66   ]
68   defines = [ "COMPOSITOR_IMPLEMENTATION" ]
70   deps = [
71     "//base",
72     "//base/third_party/dynamic_annotations",
73     "//cc",
74     "//cc/surfaces",
75     "//cc/surfaces:surface_id",
76     "//gpu/command_buffer/common",
77     "//skia",
78     "//ui/gfx",
79     "//ui/gfx/geometry",
80     "//ui/gl",
81   ]
83   if (is_win && use_aura) {
84     # TODO(sky): before we make this real need to remove
85     # IDR_BITMAP_BRUSH_IMAGE.
86     deps += [
87       "//ui/resources",
88       "//third_party/angle:libEGL",
89       "//third_party/angle:libGLESv2",
90     ]
91   }
94 source_set("test_support") {
95   testonly = true
96   sources = [
97     "test/context_factories_for_test.cc",
98     "test/context_factories_for_test.h",
99     "test/draw_waiter_for_test.cc",
100     "test/draw_waiter_for_test.h",
101     "test/in_process_context_factory.cc",
102     "test/in_process_context_factory.h",
103     "test/in_process_context_provider.cc",
104     "test/in_process_context_provider.h",
105     "test/layer_animator_test_controller.cc",
106     "test/layer_animator_test_controller.h",
107     "test/test_compositor_host.h",
108     "test/test_compositor_host_mac.mm",
109     "test/test_compositor_host_win.cc",
110     "test/test_layer_animation_delegate.cc",
111     "test/test_layer_animation_delegate.h",
112     "test/test_layer_animation_observer.cc",
113     "test/test_layer_animation_observer.h",
114     "test/test_layers.cc",
115     "test/test_layers.h",
116     "test/test_suite.cc",
117     "test/test_suite.h",
118     "test/test_utils.cc",
119     "test/test_utils.h",
120   ]
122   public_deps = [
123     ":compositor",
124   ]
125   deps = [
126     "//base/test:test_support",
127     "//cc",
128     "//cc/surfaces",
129     "//cc:test_support",
130     "//gpu/command_buffer/client:gl_in_process_context",
131     "//gpu/command_buffer/client:gles2_c_lib",
132     "//gpu/command_buffer/client:gles2_implementation",
133     "//gpu/command_buffer/common:gles2_utils",
134     "//gpu/skia_bindings",
135     "//skia",
136     "//testing/gtest",
137     "//ui/base",
138     "//ui/gfx",
139     "//ui/gfx/geometry",
140     "//ui/gl",
141   ]
143   if (use_x11) {
144     configs += [ "//build/config/linux:x11" ]
145     deps += [ "//ui/gfx/x" ]
146   }
148   if (use_ozone) {
149     sources += [ "test/test_compositor_host_ozone.cc" ]
150   } else if (use_x11) {
151     sources += [ "test/test_compositor_host_x11.cc" ]
152   }
155 if (!is_android) {
156   # TODO(GYP): Delete this after we've converted everything to GN.
157   # The _run targets exist only for compatibility w/ GYP.
158   group("compositor_unittests_run") {
159     testonly = true
160     deps = [
161       ":compositor_unittests",
162     ]
163   }
165   test("compositor_unittests") {
166     sources = [
167       "compositor_unittest.cc",
168       "layer_animation_element_unittest.cc",
169       "layer_animation_sequence_unittest.cc",
170       "layer_animator_unittest.cc",
171       "layer_owner_unittest.cc",
172       "layer_unittest.cc",
173       "run_all_unittests.cc",
174       "transform_animation_curve_adapter_unittest.cc",
175     ]
177     data = [
178       "//ui/gfx/test/data/compositor/",
179     ]
181     deps = [
182       ":compositor",
183       ":test_support",
184       "//base",
185       "//base/allocator",
186       "//base/test:test_support",
187       "//cc",
188       "//cc:test_support",
189       "//skia",
190       "//testing/gmock",
191       "//testing/gtest",
192       "//ui/base",
193       "//ui/gfx",
194       "//ui/gfx/geometry",
195       "//ui/gl",
196       "//ui/resources",
197     ]
199     if (is_linux) {
200       deps += [ "//third_party/mesa:osmesa" ]
201     }
202   }