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") {
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",
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",
31 "float_animation_curve_adapter.cc",
32 "float_animation_curve_adapter.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",
44 "layer_animator_collection.cc",
45 "layer_animator_collection.h",
49 "layer_tree_owner.cc",
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",
68 defines = [ "COMPOSITOR_IMPLEMENTATION" ]
72 "//base/third_party/dynamic_annotations",
75 "//cc/surfaces:surface_id",
76 "//gpu/command_buffer/common",
83 if (is_win && use_aura) {
84 # TODO(sky): before we make this real need to remove
85 # IDR_BITMAP_BRUSH_IMAGE.
88 "//third_party/angle:libEGL",
89 "//third_party/angle:libGLESv2",
94 source_set("test_support") {
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",
118 "test/test_utils.cc",
126 "//base/test: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",
144 configs += [ "//build/config/linux:x11" ]
145 deps += [ "//ui/gfx/x" ]
149 sources += [ "test/test_compositor_host_ozone.cc" ]
150 } else if (use_x11) {
151 sources += [ "test/test_compositor_host_x11.cc" ]
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") {
161 ":compositor_unittests",
165 test("compositor_unittests") {
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",
173 "run_all_unittests.cc",
174 "transform_animation_curve_adapter_unittest.cc",
178 "//ui/gfx/test/data/compositor/",
186 "//base/test:test_support",
200 deps += [ "//third_party/mesa:osmesa" ]