Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / ui / compositor / BUILD.gn
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.
4
5 import("//build/config/ui.gni")
6
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   ]
54
55   defines = [ "COMPOSITOR_IMPLEMENTATION" ]
56
57   deps = [
58     "//base",
59     "//base/third_party/dynamic_annotations",
60     "//cc",
61     "//gpu/command_buffer/common",
62     "//skia",
63     "//ui/gfx",
64     "//ui/gfx/geometry",
65     "//ui/gl",
66   ]
67
68   if (is_win && use_aura) {
69     # TODO(sky): before we make this real need to remove
70     # IDR_BITMAP_BRUSH_IMAGE.
71     deps += [
72       "//ui/resources",
73       "//third_party/angle:libEGL",
74       "//third_party/angle:libGLESv2",
75     ]
76   }
77 }
78
79 source_set("test_support") {
80   sources = [
81     "test/context_factories_for_test.cc",
82     "test/context_factories_for_test.h",
83     "test/draw_waiter_for_test.cc",
84     "test/draw_waiter_for_test.h",
85     "test/in_process_context_factory.cc",
86     "test/in_process_context_factory.h",
87     "test/layer_animator_test_controller.cc",
88     "test/layer_animator_test_controller.h",
89     "test/test_compositor_host.h",
90     "test/test_compositor_host_mac.mm",
91     "test/test_compositor_host_win.cc",
92     "test/test_layer_animation_delegate.cc",
93     "test/test_layer_animation_delegate.h",
94     "test/test_layer_animation_observer.cc",
95     "test/test_layer_animation_observer.h",
96     "test/test_layers.cc",
97     "test/test_layers.h",
98     "test/test_suite.cc",
99     "test/test_suite.h",
100     "test/test_utils.cc",
101     "test/test_utils.h",
102   ]
103
104   deps = [
105     ":compositor",
106     "//base",
107     "//cc",
108     "//cc:test_support",
109     "//skia",
110     "//testing/gtest",
111     "//third_party/WebKit/public:blink_minimal",
112     "//ui/base",
113     "//ui/gfx",
114     "//ui/gfx/geometry",
115     "//ui/gl",
116     "//webkit/common/gpu",
117   ]
118
119   if (use_x11) {
120     configs += [ "//build/config/linux:x11" ]
121     deps += [ "//ui/gfx/x" ]
122   }
123
124   if (use_ozone) {
125     sources += [ "test/test_compositor_host_ozone.cc" ]
126   } else if (use_x11) {
127     sources += [ "test/test_compositor_host_x11.cc" ]
128   }
129 }
130
131 # TODO(GYP) enable this when all dependencies are complete and it links.
132 #test("compositor_unittests") {
133 #  sources = [
134 #    "layer_animation_element_unittest.cc",
135 #    "layer_animation_sequence_unittest.cc",
136 #    "layer_animator_unittest.cc",
137 #    "layer_owner_unittest.cc",
138 #    "layer_unittest.cc",
139 #    "run_all_unittests.cc",
140 #    "transform_animation_curve_adapter_unittest.cc",
141 #  ]
142 #
143 #  deps = [
144 #    ":compositor",
145 #    ":test_support",
146 #    "//base",
147 #    "//base/allocator",
148 #    "//base/test:test_support",
149 #    "//cc",
150 #    "//cc:test_support",
151 #    "//skia",
152 #    "//testing/gtest",
153 #    "//ui/base",
154 #    "//ui/gfx",
155 #    "//ui/gfx/geometry",
156 #    "//ui/gl",
157 #    "//ui/resources",
158 #  ]
159 #
160 #  if (is_linux) {
161 #    deps += [ "//third_party/mesa:osmesa" ]
162 #  }
163 #}