Fix search results being clipped in app list.
[chromium-blink-merge.git] / ui / compositor / BUILD.gn
blob590cb7326e7685c40c260e9b4188ef652ebb696b
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     "clip_transform_recorder.cc",
11     "clip_transform_recorder.h",
12     "closure_animation_observer.cc",
13     "closure_animation_observer.h",
14     "compositing_recorder.cc",
15     "compositing_recorder.h",
16     "compositor.cc",
17     "compositor.h",
18     "compositor_animation_observer.h",
19     "compositor_export.h",
20     "compositor_observer.h",
21     "compositor_switches.cc",
22     "compositor_switches.h",
23     "compositor_vsync_manager.cc",
24     "compositor_vsync_manager.h",
25     "debug_utils.cc",
26     "debug_utils.h",
27     "dip_util.cc",
28     "dip_util.h",
29     "float_animation_curve_adapter.cc",
30     "float_animation_curve_adapter.h",
31     "layer.cc",
32     "layer.h",
33     "layer_animation_delegate.h",
34     "layer_animation_element.cc",
35     "layer_animation_element.h",
36     "layer_animation_observer.cc",
37     "layer_animation_observer.h",
38     "layer_animation_sequence.cc",
39     "layer_animation_sequence.h",
40     "layer_animator.cc",
41     "layer_animator.h",
42     "layer_animator_collection.cc",
43     "layer_animator_collection.h",
44     "layer_delegate.h",
45     "layer_owner.cc",
46     "layer_owner.h",
47     "layer_tree_owner.cc",
48     "layer_tree_owner.h",
49     "layer_type.h",
50     "paint_context.cc",
51     "paint_context.h",
52     "paint_recorder.cc",
53     "paint_recorder.h",
54     "reflector.cc",
55     "reflector.h",
56     "scoped_animation_duration_scale_mode.cc",
57     "scoped_animation_duration_scale_mode.h",
58     "scoped_layer_animation_settings.cc",
59     "scoped_layer_animation_settings.h",
60     "transform_animation_curve_adapter.cc",
61     "transform_animation_curve_adapter.h",
62   ]
64   defines = [ "COMPOSITOR_IMPLEMENTATION" ]
66   deps = [
67     "//base",
68     "//base/third_party/dynamic_annotations",
69     "//cc",
70     "//cc/surfaces",
71     "//cc/surfaces:surface_id",
72     "//gpu/command_buffer/common",
73     "//skia",
74     "//ui/gfx",
75     "//ui/gfx/geometry",
76     "//ui/gl",
77   ]
79   if (is_win && use_aura) {
80     # TODO(sky): before we make this real need to remove
81     # IDR_BITMAP_BRUSH_IMAGE.
82     deps += [
83       "//ui/resources",
84       "//third_party/angle:libEGL",
85       "//third_party/angle:libGLESv2",
86     ]
87   }
90 source_set("test_support") {
91   testonly = true
92   sources = [
93     "test/context_factories_for_test.cc",
94     "test/context_factories_for_test.h",
95     "test/draw_waiter_for_test.cc",
96     "test/draw_waiter_for_test.h",
97     "test/in_process_context_factory.cc",
98     "test/in_process_context_factory.h",
99     "test/in_process_context_provider.cc",
100     "test/in_process_context_provider.h",
101     "test/layer_animator_test_controller.cc",
102     "test/layer_animator_test_controller.h",
103     "test/test_compositor_host.h",
104     "test/test_compositor_host_mac.mm",
105     "test/test_compositor_host_win.cc",
106     "test/test_layer_animation_delegate.cc",
107     "test/test_layer_animation_delegate.h",
108     "test/test_layer_animation_observer.cc",
109     "test/test_layer_animation_observer.h",
110     "test/test_layers.cc",
111     "test/test_layers.h",
112     "test/test_suite.cc",
113     "test/test_suite.h",
114     "test/test_utils.cc",
115     "test/test_utils.h",
116   ]
118   public_deps = [
119     ":compositor",
120   ]
121   deps = [
122     "//base/test:test_support",
123     "//cc",
124     "//cc/surfaces",
125     "//cc:test_support",
126     "//gpu/command_buffer/client:gl_in_process_context",
127     "//gpu/command_buffer/client:gles2_c_lib",
128     "//gpu/command_buffer/client:gles2_implementation",
129     "//gpu/command_buffer/common:gles2_utils",
130     "//gpu/skia_bindings",
131     "//skia",
132     "//testing/gtest",
133     "//third_party/WebKit/public:blink_minimal",
134     "//ui/base",
135     "//ui/gfx",
136     "//ui/gfx/geometry",
137     "//ui/gl",
138   ]
140   if (use_x11) {
141     configs += [ "//build/config/linux:x11" ]
142     deps += [ "//ui/gfx/x" ]
143   }
145   if (use_ozone) {
146     sources += [ "test/test_compositor_host_ozone.cc" ]
147   } else if (use_x11) {
148     sources += [ "test/test_compositor_host_x11.cc" ]
149   }
152 if (!is_android) {
153   test("compositor_unittests") {
154     sources = [
155       "compositor_unittest.cc",
156       "layer_animation_element_unittest.cc",
157       "layer_animation_sequence_unittest.cc",
158       "layer_animator_unittest.cc",
159       "layer_owner_unittest.cc",
160       "layer_unittest.cc",
161       "run_all_unittests.cc",
162       "transform_animation_curve_adapter_unittest.cc",
163     ]
165     deps = [
166       ":compositor",
167       ":test_support",
168       "//base",
169       "//base/allocator",
170       "//base/test:test_support",
171       "//cc",
172       "//cc:test_support",
173       "//skia",
174       "//testing/gmock",
175       "//testing/gtest",
176       "//ui/base",
177       "//ui/gfx",
178       "//ui/gfx/geometry",
179       "//ui/gl",
180       "//ui/resources",
181     ]
183     if (is_linux) {
184       deps += [ "//third_party/mesa:osmesa" ]
185     }
186   }