Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ui / ozone / platform / dri / 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/linux/pkg_config.gni")
6 import("//ui/ozone/ozone.gni")
7
8 pkg_config("libdrm") {
9   packages = [ "libdrm" ]
10 }
11
12 source_set("dri_common") {
13   sources = [
14     "chromeos/display_mode_dri.cc",
15     "chromeos/display_mode_dri.h",
16     "chromeos/display_snapshot_dri.cc",
17     "chromeos/display_snapshot_dri.h",
18     "chromeos/native_display_delegate_dri.cc",
19     "chromeos/native_display_delegate_dri.h",
20     "crtc_state.cc",
21     "crtc_state.h",
22     "dri_console_buffer.cc",
23     "dri_console_buffer.h",
24     "dri_cursor.cc",
25     "dri_cursor.h",
26     "dri_buffer.cc",
27     "dri_buffer.h",
28     "dri_surface.cc",
29     "dri_surface.h",
30     "dri_surface_factory.cc",
31     "dri_surface_factory.h",
32     "dri_util.cc",
33     "dri_util.h",
34     "dri_vsync_provider.cc",
35     "dri_vsync_provider.h",
36     "dri_window.cc",
37     "dri_window.h",
38     "dri_window_delegate.h",
39     "dri_window_delegate_impl.cc",
40     "dri_window_delegate_impl.h",
41     "dri_window_delegate_manager.cc",
42     "dri_window_delegate_manager.h",
43     "dri_window_manager.cc",
44     "dri_window_manager.h",
45     "dri_wrapper.cc",
46     "dri_wrapper.h",
47     "hardware_display_controller.cc",
48     "hardware_display_controller.h",
49     "scoped_drm_types.cc",
50     "scoped_drm_types.h",
51     "screen_manager.cc",
52     "screen_manager.h",
53     "scanout_buffer.h",
54     "virtual_terminal_manager.cc",
55     "virtual_terminal_manager.h",
56   ]
57
58   deps = [
59     "//base",
60     "//skia",
61     "//ipc",
62     "//ui/base",
63     "//ui/display/types",
64     "//ui/events",
65     "//ui/events/ozone:events_ozone_evdev",
66     "//ui/gfx",
67     "//ui/gfx/geometry",
68   ]
69
70   public_configs = [
71     ":libdrm",
72   ]
73 }
74
75 if (ozone_platform_dri) {
76   source_set("dri") {
77     sources = [
78       "ozone_platform_dri.cc",
79       "ozone_platform_dri.h",
80     ]
81
82     deps = [
83       ":dri_common",
84       "//base",
85       "//skia",
86       "//ui/events/ozone:events_ozone_evdev",
87     ]
88   }
89
90   source_set("dri_unittests") {
91     testonly = true
92     sources = [
93       "dri_surface_factory_unittest.cc",
94       "dri_surface_unittest.cc",
95       "hardware_display_controller_unittest.cc",
96       "screen_manager_unittest.cc",
97       "test/mock_dri_wrapper.cc",
98       "test/mock_dri_wrapper.h",
99     ]
100
101     deps = [
102       ":dri_common",
103       "//skia",
104       "//testing/gtest",
105     ]
106   }
107 }
108
109 if (ozone_platform_gbm) {
110   pkg_config("libgbm") {
111     packages = [ "gbm" ]
112   }
113
114   source_set("gbm") {
115     sources = [
116       "channel_observer.h",
117       "chromeos/display_message_handler.cc",
118       "chromeos/display_message_handler.h",
119       "chromeos/native_display_delegate_proxy.cc",
120       "chromeos/native_display_delegate_proxy.h",
121       "dri_window_delegate_proxy.cc",
122       "dri_window_delegate_proxy.h",
123       "gbm_buffer.cc",
124       "gbm_buffer.h",
125       "gbm_buffer_base.cc",
126       "gbm_buffer_base.h",
127       "gbm_surface.cc",
128       "gbm_surface.h",
129       "gbm_surfaceless.cc",
130       "gbm_surfaceless.h",
131       "gbm_surface_factory.cc",
132       "gbm_surface_factory.h",
133       "gpu_platform_support_gbm.cc",
134       "gpu_platform_support_gbm.h",
135       "gpu_platform_support_host_gbm.cc",
136       "gpu_platform_support_host_gbm.h",
137       "ozone_platform_gbm.cc",
138       "ozone_platform_gbm.h",
139     ]
140
141     deps = [
142       ":dri_common",
143       "//base",
144       "//skia",
145       "//ui/events/ozone:events_ozone_evdev",
146     ]
147
148     public_configs = [
149       ":libgbm",
150     ]
151   }
152 }