ozone: fix HDPMLegacy - do the PF after overlays, also clear old overlays
[chromium-blink-merge.git] / ui / ozone / platform / dri / BUILD.gn
blob3a4916777d11f1232e2f35885ea55ecae42bda60
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/linux/pkg_config.gni")
6 import("//ui/ozone/ozone.gni")
8 declare_args() {
9   use_mesa_platform_null = false
12 pkg_config("libdrm") {
13   packages = [ "libdrm" ]
16 source_set("dri_common") {
17   sources = [
18     "channel_observer.h",
19     "crtc_controller.cc",
20     "crtc_controller.h",
21     "display_change_observer.h",
22     "display_manager.cc",
23     "display_manager.h",
24     "display_mode_dri.cc",
25     "display_mode_dri.h",
26     "display_snapshot_dri.cc",
27     "display_snapshot_dri.h",
28     "dri_console_buffer.cc",
29     "dri_console_buffer.h",
30     "dri_cursor.cc",
31     "dri_cursor.h",
32     "dri_buffer.cc",
33     "dri_buffer.h",
34     "dri_gpu_platform_support.cc",
35     "dri_gpu_platform_support_.h",
36     "dri_gpu_platform_support_host.cc",
37     "dri_gpu_platform_support_host.h",
38     "dri_helper_thread.cc",
39     "dri_helper_thread.h",
40     "dri_surface.cc",
41     "dri_surface.h",
42     "dri_surface_factory.cc",
43     "dri_surface_factory.h",
44     "dri_util.cc",
45     "dri_util.h",
46     "dri_vsync_provider.cc",
47     "dri_vsync_provider.h",
48     "dri_window.cc",
49     "dri_window.h",
50     "dri_window_delegate.h",
51     "dri_window_delegate_impl.cc",
52     "dri_window_delegate_impl.h",
53     "dri_window_delegate_manager.cc",
54     "dri_window_delegate_manager.h",
55     "dri_window_manager.cc",
56     "dri_window_manager.h",
57     "dri_wrapper.cc",
58     "dri_wrapper.h",
59     "hardware_display_controller.cc",
60     "hardware_display_controller.h",
61     "hardware_display_plane.cc",
62     "hardware_display_plane.h",
63     "hardware_display_plane_manager.cc",
64     "hardware_display_plane_manager.h",
65     "hardware_display_plane_manager_legacy.cc",
66     "hardware_display_plane_manager_legacy.h",
67     "native_display_delegate_dri.cc",
68     "native_display_delegate_dri.h",
69     "native_display_delegate_proxy.cc",
70     "native_display_delegate_proxy.h",
71     "overlay_plane.cc",
72     "overlay_plane.h",
73     "scoped_drm_types.cc",
74     "scoped_drm_types.h",
75     "screen_manager.cc",
76     "screen_manager.h",
77     "scanout_buffer.h",
78   ]
80   deps = [
81     "//base",
82     "//skia",
83     "//ipc",
84     "//ui/base",
85     "//ui/display/types",
86     "//ui/display/util",
87     "//ui/events",
88     "//ui/events/ozone:events_ozone_evdev",
89     "//ui/events/ozone:events_ozone_layout",
90     "//ui/gfx",
91     "//ui/gfx/geometry",
92   ]
94   public_configs = [ ":libdrm" ]
97 if (ozone_platform_dri) {
98   source_set("dri") {
99     sources = [
100       "ozone_platform_dri.cc",
101       "ozone_platform_dri.h",
102     ]
104     deps = [
105       ":dri_common",
106       "//base",
107       "//skia",
108       "//ui/events/ozone:events_ozone_evdev",
109       "//ui/events/ozone:events_ozone_layout",
110     ]
111   }
113   source_set("dri_unittests") {
114     testonly = true
115     sources = [
116       "dri_surface_unittest.cc",
117       "dri_window_delegate_impl_unittest.cc",
118       "hardware_display_controller_unittest.cc",
119       "hardware_display_manager_unittest.cc",
120       "screen_manager_unittest.cc",
121       "test/mock_dri_wrapper.cc",
122       "test/mock_dri_wrapper.h",
123     ]
125     deps = [
126       ":dri_common",
127       "//skia",
128       "//testing/gtest",
129     ]
130   }
133 if (ozone_platform_gbm) {
134   pkg_config("libgbm") {
135     packages = [ "gbm" ]
136   }
138   source_set("gbm") {
139     sources = [
140       "gbm_buffer.cc",
141       "gbm_buffer.h",
142       "gbm_buffer_base.cc",
143       "gbm_buffer_base.h",
144       "gbm_surface.cc",
145       "gbm_surface.h",
146       "gbm_surfaceless.cc",
147       "gbm_surfaceless.h",
148       "gbm_surface_factory.cc",
149       "gbm_surface_factory.h",
150       "gbm_wrapper.cc",
151       "gbm_wrapper.h",
152       "ozone_platform_gbm.cc",
153       "ozone_platform_gbm.h",
154     ]
156     deps = [
157       ":dri_common",
158       "//base",
159       "//skia",
160       "//ui/events/ozone:events_ozone_evdev",
161       "//ui/events/ozone:events_ozone_layout",
162     ]
164     public_configs = [ ":libgbm" ]
166     if (use_mesa_platform_null) {
167       defines += [ "USE_MESA_PLATFORM_NULL" ]
168     }
169   }