summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--build/config/linux/BUILD.gn2
-rw-r--r--ui/base/BUILD.gn4
-rw-r--r--ui/events/BUILD.gn16
-rw-r--r--ui/events/ozone/BUILD.gn2
-rw-r--r--ui/gfx/BUILD.gn15
-rw-r--r--ui/gl/BUILD.gn2
-rw-r--r--ui/ozone/BUILD.gn77
-rw-r--r--ui/ozone/demo/BUILD.gn23
-rw-r--r--ui/ozone/ozone.gni31
-rw-r--r--ui/ozone/platform/caca/BUILD.gn34
-rw-r--r--ui/ozone/platform/dri/BUILD.gn135
-rw-r--r--ui/ozone/platform/egltest/BUILD.gn40
-rw-r--r--ui/ozone/platform/test/BUILD.gn24
14 files changed, 351 insertions, 58 deletions
diff --git a/BUILD.gn b/BUILD.gn
index a29ef80..4def355 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -215,8 +215,8 @@ group("root") {
if (use_ozone) {
deps += [
- "//ui/events/ozone:events_ozone",
- "//ui/events/ozone:events_ozone_evdev",
+ "//ui/ozone",
+ "//ui/ozone/demo",
]
}
}
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 48b78a4..28a8ed3 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -21,7 +21,7 @@ config("sdk") {
}
}
-pkg_config("dridrm") {
+pkg_config("libdrm") {
packages = [ "libdrm" ]
}
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 2e1dc23..dfe9ac80 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -464,6 +464,10 @@ component("base") {
"cursor/ozone/bitmap_cursor_factory_ozone.cc",
"cursor/ozone/bitmap_cursor_factory_ozone.h",
]
+
+ deps += [
+ "//ui/ozone:ozone_base",
+ ]
}
if (!toolkit_views) {
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index a80e3678..f93d1eb 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -142,22 +142,6 @@ component("events") {
if (use_ozone) {
sources += [
- "ozone/device/udev/device_manager_udev.cc",
- "ozone/device/udev/device_manager_udev.h",
- "ozone/evdev/event_converter_evdev.cc",
- "ozone/evdev/event_converter_evdev.h",
- "ozone/evdev/event_device_info.cc",
- "ozone/evdev/event_device_info.h",
- "ozone/evdev/event_factory_evdev.cc",
- "ozone/evdev/event_factory_evdev.h",
- "ozone/evdev/event_modifiers_evdev.cc",
- "ozone/evdev/event_modifiers_evdev.h",
- "ozone/evdev/key_event_converter_evdev.cc",
- "ozone/evdev/key_event_converter_evdev.h",
- "ozone/evdev/touch_event_converter_evdev.cc",
- "ozone/evdev/touch_event_converter_evdev.h",
- "ozone/event_factory_ozone.cc",
- "ozone/event_factory_ozone.h",
"ozone/events_ozone.cc",
]
}
diff --git a/ui/events/ozone/BUILD.gn b/ui/events/ozone/BUILD.gn
index a5054b7..51ad96d 100644
--- a/ui/events/ozone/BUILD.gn
+++ b/ui/events/ozone/BUILD.gn
@@ -16,8 +16,6 @@ component("events_ozone") {
"device/device_manager_manual.h",
"device/udev/device_manager_udev.cc",
"device/udev/device_manager_udev.h",
- "event_factory_ozone.cc",
- "event_factory_ozone.h",
"events_ozone_export.h",
]
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index cab7e0c..d4f30dc 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -8,9 +8,6 @@ if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
-if (use_ozone) {
- import("//ui/ozone/ozone.gni")
-}
# Several targets want to include this header file, and some of them are
# child dependencies of "gfx". Therefore, we separate it out here so multiple
@@ -321,13 +318,6 @@ component("gfx") {
if (use_ozone) {
sources += [
"platform_font_ozone.cc",
- "ozone/impl/file_surface_factory.cc",
- "ozone/impl/file_surface_factory.h",
- "ozone/surface_factory_ozone.cc",
- "ozone/surface_factory_ozone.h",
- "ozone/surface_ozone.h",
- "ozone/overlay_candidates_ozone.cc",
- "ozone/overlay_candidates_ozone.h",
]
}
@@ -359,6 +349,11 @@ component("gfx") {
]
configs += [ "//build/config/linux:pangocairo" ]
}
+ if (use_pango && use_ozone) {
+ sources -= [
+ "platform_font_ozone.cc",
+ ]
+ }
}
# Looking for gfx_geometry? It's //ui/gfx/geometry:geometry
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index 2b9e6c5..1820ca9 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -237,6 +237,8 @@ component("gl") {
if (use_ozone) {
sources += [
"gl_context_ozone.cc",
+ "gl_egl_api_implementation.cc",
+ "gl_egl_api_implementation.h",
"gl_implementation_ozone.cc",
"gl_surface_ozone.cc",
]
diff --git a/ui/ozone/BUILD.gn b/ui/ozone/BUILD.gn
index b64ce6c..4d9144f 100644
--- a/ui/ozone/BUILD.gn
+++ b/ui/ozone/BUILD.gn
@@ -4,9 +4,39 @@
import("//ui/ozone/ozone.gni")
-declare_args() {
- # The default platform for Ozone.
- ozone_platform = "test"
+# The list of platforms that will be built.
+ozone_platforms = []
+
+# Extra dependencies to pull into ui/ozone for built platforms.
+ozone_platform_deps = []
+
+# Extra dependencies to pull into ozone_unittests for built platforms.
+ozone_platform_test_deps = []
+
+if (ozone_platform_egltest) {
+ ozone_platforms += [ "egltest" ]
+ ozone_platform_deps += [ "platform/egltest" ]
+}
+
+if (ozone_platform_test) {
+ ozone_platforms += [ "test" ]
+ ozone_platform_deps += [ "platform/test" ]
+}
+
+if (ozone_platform_caca) {
+ ozone_platforms += [ "caca" ]
+ ozone_platform_deps += [ "platform/caca" ]
+}
+
+if (ozone_platform_dri) {
+ ozone_platforms += [ "dri" ]
+ ozone_platform_deps += [ "platform/dri" ]
+ ozone_platform_test_deps += [ "platform/dri:dri_unittests" ]
+}
+
+if (ozone_platform_gbm) {
+ ozone_platforms += [ "gbm" ]
+ ozone_platform_deps += [ "platform/dri:gbm" ]
}
platform_list_cc_file = "$target_gen_dir/platform_list.cc"
@@ -51,16 +81,25 @@ component("ozone") {
# common/chromeos files are excluded automatically when building with
# chromeos=0, by exclusion rules in filename_rules.gypi due to the
# "chromeos" folder name.
+ "common/chromeos/display_mode_proxy.cc",
+ "common/chromeos/display_mode_proxy.h",
+ "common/chromeos/display_snapshot_proxy.cc",
+ "common/chromeos/display_snapshot_proxy.h",
+ "common/chromeos/display_util.cc",
+ "common/chromeos/display_util.h",
"common/chromeos/native_display_delegate_ozone.cc",
"common/chromeos/native_display_delegate_ozone.h",
"common/chromeos/touchscreen_device_manager_ozone.cc",
"common/chromeos/touchscreen_device_manager_ozone.h",
"common/gpu/ozone_gpu_message_generator.cc",
"common/gpu/ozone_gpu_message_generator.h",
- "ozone_platform.cc",
- "ozone_platform.h",
- "ozone_switches.cc",
- "ozone_switches.h",
+ "common/gpu/ozone_gpu_message_params.cc",
+ "common/gpu/ozone_gpu_message_params.h",
+ "common/gpu/ozone_gpu_messages.h",
+ "public/ozone_platform.cc",
+ "public/ozone_platform.h",
+ "public/ozone_switches.cc",
+ "public/ozone_switches.h",
"platform_selection.cc",
"platform_selection.h",
]
@@ -81,18 +120,13 @@ component("ozone") {
"//ui/gfx/ipc",
# TODO(GYP) the GYP version has a way to add additional dependencies via
# build flags.
- ]
+ ] + ozone_platform_deps
if (is_chromeos) {
deps += [ "//ui/dusplay/types" ]
}
}
-# TODO(GYP) implement the ozone platforms. This should check the various
-# ozone_platform_*flags, and add deps and add to the ozone_platforms list for
-# the script below.
-ozone_platforms = ""
-
# GYP version: ui/ozone/ozone.gyp:generate_ozone_platform_list
action("generate_ozone_platform_list") {
script = "generate_ozone_platform_list.py"
@@ -107,8 +141,7 @@ action("generate_ozone_platform_list") {
"--output_h=" + rebase_path(platform_list_h_file, root_build_dir),
"--output_txt=" + rebase_path(platform_list_txt_file, root_build_dir),
"--default=$ozone_platform",
- ozone_platforms,
- ]
+ ] + ozone_platforms
}
# GYP version: ui/ozone/ozone.gyp:generate_constructor_list
@@ -127,11 +160,19 @@ action("generate_constructor_list") {
"--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir),
"--namespace=ui",
"--typename=OzonePlatform",
- "--include=ui/ozone/ozone_platform.h",
+ "--include=\"ui/ozone/public/ozone_platform.h\"",
]
deps = [ ":generate_ozone_platform_list" ]
}
-# TODO(GYP) ozone_unittests
-# TODO(GYP) platform_caca, dri, other test stuff.
+test("ozone_unittests") {
+ sources = [
+ "run_all_unittests.cc",
+ ]
+
+ deps = [
+ "//base/test:test_support",
+ "//testing/gtest",
+ ] + ozone_platform_test_deps
+}
diff --git a/ui/ozone/demo/BUILD.gn b/ui/ozone/demo/BUILD.gn
new file mode 100644
index 0000000..c58431b
--- /dev/null
+++ b/ui/ozone/demo/BUILD.gn
@@ -0,0 +1,23 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+group("demo") {
+ deps = [
+ ":ozone_demo",
+ ]
+}
+
+executable("ozone_demo") {
+ sources = [
+ "ozone_demo.cc",
+ ]
+
+ deps = [
+ "//base",
+ "//skia",
+ "//ui/gfx/geometry",
+ "//ui/gl",
+ "//ui/ozone",
+ ]
+}
diff --git a/ui/ozone/ozone.gni b/ui/ozone/ozone.gni
index a777f59..867813c 100644
--- a/ui/ozone/ozone.gni
+++ b/ui/ozone/ozone.gni
@@ -2,17 +2,30 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/config/ui.gni")
+declare_args() {
+ # Select platforms automatically. Turn this off for manual control.
+ ozone_auto_platforms = true
+}
-if (use_ozone) {
- # Enable built-in ozone platforms if ozone is enabled.
- ozone_platform_caca = false
- ozone_platform_dri = true
- ozone_platform_ozonex = false
- ozone_platform_test = true
-} else {
+declare_args() {
+ # The platform that will be active by default.
+ ozone_platform = ""
+
+ # Enable individual platforms.
ozone_platform_caca = false
ozone_platform_dri = false
- ozone_platform_ozonex = false
+ ozone_platform_egltest = false
+ ozone_platform_gbm = false
ozone_platform_test = false
+
+ if (ozone_auto_platforms) {
+ # Use test as the default platform.
+ ozone_platform = "test"
+
+ # Build all platforms whose deps are in install-build-deps.sh.
+ # Only these platforms will be compile tested by buildbots.
+ ozone_platform_dri = true
+ ozone_platform_test = true
+ ozone_platform_egltest = true
+ }
}
diff --git a/ui/ozone/platform/caca/BUILD.gn b/ui/ozone/platform/caca/BUILD.gn
new file mode 100644
index 0000000..079750f
--- /dev/null
+++ b/ui/ozone/platform/caca/BUILD.gn
@@ -0,0 +1,34 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+
+source_set("caca") {
+ sources = [
+ "caca_event_factory.cc",
+ "caca_event_factory.h",
+ "caca_window.cc",
+ "caca_window.h",
+ "caca_window_manager.cc",
+ "caca_window_manager.h",
+ "ozone_platform_caca.cc",
+ "ozone_platform_caca.h",
+ "scoped_caca_types.cc",
+ "scoped_caca_types.h",
+ ]
+
+ deps = [
+ "//base",
+ "//skia",
+ "//ui/gfx/geometry",
+ ]
+
+ configs += [
+ ":libcaca",
+ ]
+}
+
+pkg_config("libcaca") {
+ packages = [ "caca" ]
+}
diff --git a/ui/ozone/platform/dri/BUILD.gn b/ui/ozone/platform/dri/BUILD.gn
new file mode 100644
index 0000000..f7d93d7
--- /dev/null
+++ b/ui/ozone/platform/dri/BUILD.gn
@@ -0,0 +1,135 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//ui/ozone/ozone.gni")
+
+source_set("dri_common") {
+ sources = [
+ "chromeos/display_mode_dri.cc",
+ "chromeos/display_mode_dri.h",
+ "chromeos/display_snapshot_dri.cc",
+ "chromeos/display_snapshot_dri.h",
+ "chromeos/native_display_delegate_dri.cc",
+ "chromeos/native_display_delegate_dri.h",
+ "cursor_factory_evdev_dri.cc",
+ "cursor_factory_evdev_dri.h",
+ "dri_console_buffer.cc",
+ "dri_console_buffer.h",
+ "dri_buffer.cc",
+ "dri_buffer.h",
+ "dri_surface.cc",
+ "dri_surface.h",
+ "dri_surface_factory.cc",
+ "dri_surface_factory.h",
+ "dri_util.cc",
+ "dri_util.h",
+ "dri_vsync_provider.cc",
+ "dri_vsync_provider.h",
+ "dri_window.cc",
+ "dri_window.h",
+ "dri_wrapper.cc",
+ "dri_wrapper.h",
+ "hardware_display_controller.cc",
+ "hardware_display_controller.h",
+ "scoped_drm_types.cc",
+ "scoped_drm_types.h",
+ "screen_manager.cc",
+ "screen_manager.h",
+ "scanout_buffer.h",
+ "virtual_terminal_manager.cc",
+ "virtual_terminal_manager.h",
+ ]
+
+ deps = [
+ "//base",
+ "//skia",
+ "//ipc",
+ "//ui/base",
+ "//ui/display/types",
+ "//ui/events",
+ "//ui/events/ozone:events_ozone_evdev",
+ "//ui/gfx",
+ "//ui/gfx/geometry",
+ ]
+
+ direct_dependent_configs = [
+ "//build/config/linux:libdrm",
+ ]
+}
+
+if (ozone_platform_dri) {
+ source_set("dri") {
+ sources = [
+ "ozone_platform_dri.cc",
+ "ozone_platform_dri.h",
+ ]
+
+ deps = [
+ ":dri_common",
+ "//base",
+ "//skia",
+ "//ui/events/ozone:events_ozone_evdev",
+ ]
+ }
+
+ source_set("dri_unittests") {
+ sources = [
+ "dri_surface_factory_unittest.cc",
+ "dri_surface_unittest.cc",
+ "hardware_display_controller_unittest.cc",
+ "screen_manager_unittest.cc",
+ "test/mock_dri_wrapper.cc",
+ "test/mock_dri_wrapper.h",
+ ]
+
+ deps = [
+ ":dri_common",
+ "//skia",
+ "//testing/gtest",
+ ]
+ }
+}
+
+if (ozone_platform_gbm) {
+ pkg_config("libgbm") {
+ packages = [ "gbm" ]
+ }
+
+ source_set("gbm") {
+ sources = [
+ "chromeos/display_message_handler.cc",
+ "chromeos/display_message_handler.h",
+ "chromeos/native_display_delegate_proxy.cc",
+ "chromeos/native_display_delegate_proxy.h",
+ "gbm_buffer.cc",
+ "gbm_buffer.h",
+ "gbm_buffer_base.cc",
+ "gbm_buffer_base.h",
+ "gbm_surface.cc",
+ "gbm_surface.h",
+ "gbm_surfaceless.cc",
+ "gbm_surfaceless.h",
+ "gbm_surface_factory.cc",
+ "gbm_surface_factory.h",
+ "gpu_platform_support_gbm.cc",
+ "gpu_platform_support_gbm.h",
+ "gpu_platform_support_host_gbm.cc",
+ "gpu_platform_support_host_gbm.h",
+ "ozone_platform_gbm.cc",
+ "ozone_platform_gbm.h",
+ ]
+
+ deps = [
+ ":dri_common",
+ "//base",
+ "//skia",
+ "//ui/events/ozone:events_ozone_evdev",
+ ]
+
+ direct_dependent_configs = [
+ ":libgbm",
+ ]
+ }
+}
diff --git a/ui/ozone/platform/egltest/BUILD.gn b/ui/ozone/platform/egltest/BUILD.gn
new file mode 100644
index 0000000..04cae36
--- /dev/null
+++ b/ui/ozone/platform/egltest/BUILD.gn
@@ -0,0 +1,40 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//tools/generate_library_loader/generate_library_loader.gni")
+
+source_set("egltest") {
+ sources = [
+ "ozone_platform_egltest.cc",
+ "ozone_platform_egltest.h",
+ ]
+
+ deps = [
+ ":eglplatform_shim",
+ "//base",
+ "//ui/events/ozone:events_ozone_evdev",
+ "//ui/gfx",
+ ]
+}
+
+generate_library_loader("eglplatform_shim") {
+ name = "LibeglplatformShimLoader"
+ output_h = "libeglplatform_shim.h"
+ output_cc = "libeglplatform_shim_loader.cc"
+ header = "\"ui/ozone/platform/egltest/eglplatform_shim.h\""
+
+ functions = [
+ "ShimQueryString",
+ "ShimInitialize",
+ "ShimTerminate",
+ "ShimCreateWindow",
+ "ShimQueryWindow",
+ "ShimDestroyWindow",
+ "ShimGetNativeDisplay",
+ "ShimGetNativeWindow",
+ "ShimReleaseNativeWindow",
+ ]
+}
+
+# TODO(spang): eglplatform_shim_x11 once support lands: http://crbug.com/380327
diff --git a/ui/ozone/platform/test/BUILD.gn b/ui/ozone/platform/test/BUILD.gn
new file mode 100644
index 0000000..11c6848
--- /dev/null
+++ b/ui/ozone/platform/test/BUILD.gn
@@ -0,0 +1,24 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("test") {
+ sources = [
+ "ozone_platform_test.cc",
+ "ozone_platform_test.h",
+ "test_cursor_factory.cc",
+ "test_cursor_factory.h",
+ "test_window.cc",
+ "test_window.h",
+ "test_window_manager.cc",
+ "test_window_manager.h",
+ ]
+
+ deps = [
+ "//base",
+ "//skia",
+ "//ui/base",
+ "//ui/events/ozone:events_ozone_evdev",
+ "//ui/gfx/geometry",
+ ]
+}