diff options
| author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 19:39:14 +0000 |
|---|---|---|
| committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 19:39:14 +0000 |
| commit | e2504c8bddb98698b98013acaba4724aaff72b56 (patch) | |
| tree | 072942c8cdd2bc63a526902f7b108d01715adbf0 | |
| parent | 89ded531c2f2aef5577c22a9267ead1a9035d722 (diff) | |
| download | chromium_src-e2504c8bddb98698b98013acaba4724aaff72b56.zip chromium_src-e2504c8bddb98698b98013acaba4724aaff72b56.tar.gz chromium_src-e2504c8bddb98698b98013acaba4724aaff72b56.tar.bz2 | |
Add GN build for parts of gpu and ozone.
Moves existing ozone platform flag to new .gni file with all ozone flags in it.
R=piman@chromium.org, rjkroege@chromium.org, spang@chromium.org
Review URL: https://codereview.chromium.org/285103002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270780 0039d316-1c4b-4281-b951-d872f2087c98
| -rw-r--r-- | BUILD.gn | 4 | ||||
| -rw-r--r-- | build/config/linux/BUILD.gn | 8 | ||||
| -rw-r--r-- | build/config/ui.gni | 2 | ||||
| -rw-r--r-- | gpu/BUILD.gn | 145 | ||||
| -rw-r--r-- | gpu/command_buffer/BUILD.gn | 17 | ||||
| -rw-r--r-- | third_party/khronos/BUILD.gn | 10 | ||||
| -rw-r--r-- | tools/gn/builder.cc | 7 | ||||
| -rw-r--r-- | ui/gfx/BUILD.gn | 5 | ||||
| -rw-r--r-- | ui/gfx/ozone/BUILD.gn | 25 | ||||
| -rw-r--r-- | ui/gfx/x/BUILD.gn | 21 | ||||
| -rw-r--r-- | ui/gl/BUILD.gn | 289 | ||||
| -rw-r--r-- | ui/ozone/BUILD.gn | 60 | ||||
| -rw-r--r-- | ui/ozone/ozone.gni | 18 |
13 files changed, 604 insertions, 7 deletions
@@ -32,6 +32,7 @@ group("root") { "//crypto", "//device/usb", #"//extensions/common/api:extensions_api", + "//gpu:gles2_c_lib", "//ipc", "//mojo", "//net", @@ -73,8 +74,9 @@ group("root") { deps -= [ "//components/os_crypt", "//crypto", + "//gpu:gles2_c_lib", # Needs Skia. "//net", - "//skia", + "//skia", # Needs some ARM stuff "//third_party/libusb", "//third_party/WebKit/Source/wtf", # TODO(brettw) re-enable for Android. "//tools/gn", diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn index 29bc47f..e26e397 100644 --- a/build/config/linux/BUILD.gn +++ b/build/config/linux/BUILD.gn @@ -65,6 +65,14 @@ config("x11") { ] } +config("xcomposite") { + libs = [ "Xcomposite" ] +} + +config("xext") { + libs = [ "Xext" ] +} + config("libresolv") { libs = [ "resolv" ] } diff --git a/build/config/ui.gni b/build/config/ui.gni index 3ec1e50..6577331 100644 --- a/build/config/ui.gni +++ b/build/config/ui.gni @@ -59,5 +59,3 @@ use_x11 = is_linux && !use_ozone use_glib = is_linux use_clipboard_aurax11 = is_linux && use_aura && use_x11 - -ozone_platform_dri = use_ozone diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn new file mode 100644 index 0000000..4e2d47a --- /dev/null +++ b/gpu/BUILD.gn @@ -0,0 +1,145 @@ +# 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. + +config("sizet_truncations") { + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags = [ "/wd4267" ] # size_t to int truncation. + } +} + +gles2_c_lib_source_files = [ + "command_buffer/client/gles2_c_lib.cc", + "command_buffer/client/gles2_c_lib_autogen.h", + "command_buffer/client/gles2_c_lib_export.h", + "command_buffer/client/gles2_lib.h", + "command_buffer/client/gles2_lib.cc", +] + +component("gles2_implementation") { + sources = [ + "command_buffer/client/buffer_tracker.cc", + "command_buffer/client/buffer_tracker.h", + "command_buffer/client/client_context_state.h", + "command_buffer/client/client_context_state.cc", + "command_buffer/client/client_context_state_autogen.h", + "command_buffer/client/client_context_state_impl_autogen.h", + "command_buffer/client/gles2_impl_export.h", + "command_buffer/client/gles2_implementation_autogen.h", + "command_buffer/client/gles2_implementation.cc", + "command_buffer/client/gles2_implementation.h", + "command_buffer/client/gles2_implementation_impl_autogen.h", + "command_buffer/client/gles2_interface.h", + "command_buffer/client/gles2_trace_implementation_autogen.h", + "command_buffer/client/gles2_trace_implementation.cc", + "command_buffer/client/gles2_trace_implementation.h", + "command_buffer/client/gles2_trace_implementation_impl_autogen.h", + "command_buffer/client/gpu_memory_buffer_factory.h", + "command_buffer/client/gpu_memory_buffer_tracker.cc", + "command_buffer/client/gpu_memory_buffer_tracker.h", + "command_buffer/client/program_info_manager.cc", + "command_buffer/client/program_info_manager.h", + "command_buffer/client/query_tracker.cc", + "command_buffer/client/query_tracker.h", + "command_buffer/client/share_group.cc", + "command_buffer/client/share_group.h", + "command_buffer/client/vertex_array_object_manager.cc", + "command_buffer/client/vertex_array_object_manager.h", + ] + defines = [ "GLES2_IMPL_IMPLEMENTATION" ] + configs += [ ":sizet_truncations" ] + all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + + deps = [ + ":gles2_cmd_helper", + "//base", + "//gpu/command_buffer:gles2_utils", + "//ui/gfx/geometry", + "//ui/gl", + ] +} + +component("gles2_c_lib") { + sources = gles2_c_lib_source_files + defines = [ "GLES2_C_LIB_IMPLEMENTATION" ] + configs += [ ":sizet_truncations" ] + + deps = [ + ":command_buffer_client", + ":gles2_implementation", + "//base", + "//base/third_party/dynamic_annotations", + "//gpu/command_buffer:gles2_utils", + ] +} + +source_set("gles2_cmd_helper") { + sources = [ + "command_buffer/client/gles2_cmd_helper.cc", + "command_buffer/client/gles2_cmd_helper.h", + "command_buffer/client/gles2_cmd_helper_autogen.h", + ] + + configs += [ ":sizet_truncations" ] + deps = [ ":command_buffer_client" ] +} + +source_set("command_buffer_client") { + sources = [ + "command_buffer/client/cmd_buffer_helper.cc", + "command_buffer/client/cmd_buffer_helper.h", + "command_buffer/client/fenced_allocator.cc", + "command_buffer/client/fenced_allocator.h", + "command_buffer/client/gpu_control.h", + "command_buffer/client/mapped_memory.cc", + "command_buffer/client/mapped_memory.h", + "command_buffer/client/ring_buffer.cc", + "command_buffer/client/ring_buffer.h", + "command_buffer/client/transfer_buffer.cc", + "command_buffer/client/transfer_buffer.h", + ] + + configs += [ ":sizet_truncations" ] + all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + + deps = [ + ":command_buffer_common", + ] +} + +source_set("command_buffer_common") { + sources = [ + "command_buffer/common/bitfield_helpers.h", + "command_buffer/common/buffer.cc", + "command_buffer/common/buffer.h", + "command_buffer/common/capabilities.cc", + "command_buffer/common/capabilities.h", + "command_buffer/common/cmd_buffer_common.cc", + "command_buffer/common/cmd_buffer_common.h", + "command_buffer/common/command_buffer.h", + "command_buffer/common/constants.h", + "command_buffer/common/debug_marker_manager.cc", + "command_buffer/common/debug_marker_manager.h", + "command_buffer/common/gles2_cmd_format.cc", + "command_buffer/common/gles2_cmd_format.h", + "command_buffer/common/gles2_cmd_format_autogen.h", + "command_buffer/common/gles2_cmd_ids.h", + "command_buffer/common/gles2_cmd_ids_autogen.h", + "command_buffer/common/id_allocator.cc", + "command_buffer/common/id_allocator.h", + "command_buffer/common/mailbox.cc", + "command_buffer/common/mailbox.h", + "command_buffer/common/mailbox_holder.cc", + "command_buffer/common/mailbox_holder.h", + "command_buffer/common/thread_local.h", + "command_buffer/common/time.h", + ] + + all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + + deps = [ + "//base", + "//gpu/command_buffer:gles2_utils", + ] +} diff --git a/gpu/command_buffer/BUILD.gn b/gpu/command_buffer/BUILD.gn new file mode 100644 index 0000000..c37e90f --- /dev/null +++ b/gpu/command_buffer/BUILD.gn @@ -0,0 +1,17 @@ +# 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. + +component("gles2_utils") { + sources = [ + "common/gles2_cmd_format.h", + "common/gles2_cmd_utils.cc", + "common/gles2_cmd_utils.h", + "common/gles2_utils_export.h", + ] + + defines = [ "GLES2_UTILS_IMPLEMENTATION" ] + all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + deps = [ "//base" ] +} + diff --git a/third_party/khronos/BUILD.gn b/third_party/khronos/BUILD.gn new file mode 100644 index 0000000..27cf05c --- /dev/null +++ b/third_party/khronos/BUILD.gn @@ -0,0 +1,10 @@ +# 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. + +config("khronos_headers") { + include_dirs = [ + ".", + "//gpu", # Contains GLES2/gl2chromium.h + ] +} diff --git a/tools/gn/builder.cc b/tools/gn/builder.cc index a04d3ad..b8ef71e 100644 --- a/tools/gn/builder.cc +++ b/tools/gn/builder.cc @@ -447,9 +447,10 @@ bool Builder::ResolveForwardDependentConfigs(Target* target, Err* err) { if (!configs[config_i].ptr) { *err = Err(target->defined_from(), "Target in forward_dependent_configs_from was not listed in the deps", - "The target \"" + configs[config_i].label.GetUserVisibleName(false) + - "\"\n was not present in the deps. This thing is used to forward\n" - "configs from direct dependents."); + "This target has a forward_dependent_configs_from entry that was " + "not present in\nthe deps. A target can only forward things it " + "depends on. It was forwarding:\n " + + configs[config_i].label.GetUserVisibleName(false)); return false; } } diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn index ea1a2de..4270699 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn @@ -8,6 +8,9 @@ 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 @@ -336,7 +339,7 @@ component("gfx") { "ozone/overlay_candidates_ozone.h", ] } - if (ozone_platform_dri) { + if (use_ozone && ozone_platform_dri) { configs += [ "//build/config/linux:dridrm" ] } else { sources -= [ diff --git a/ui/gfx/ozone/BUILD.gn b/ui/gfx/ozone/BUILD.gn new file mode 100644 index 0000000..2cac0c9 --- /dev/null +++ b/ui/gfx/ozone/BUILD.gn @@ -0,0 +1,25 @@ +# 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. + +component("ozone") { + output_name = "gfx_ozone" + saources = [ + "impl/file_surface_factory.cc", + "impl/file_surface_factory.h", + "surface_factory_ozone.cc", + "surface_factory_ozone.h", + "surface_ozone_egl.h", + "surface_ozone_canvas.h", + "overlay_candidates_ozone.cc", + "overlay_candidates_ozone.h", + ] + + defines = [ "GFX_IMPLEMENTATION" ] + + deps = [ + "//base", + "//ui/gfx/geometry", + "//skia", + ] +} diff --git a/ui/gfx/x/BUILD.gn b/ui/gfx/x/BUILD.gn new file mode 100644 index 0000000..23d6536 --- /dev/null +++ b/ui/gfx/x/BUILD.gn @@ -0,0 +1,21 @@ +# 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. + +component("x") { + output_name = "gfx_x11" + sources = [ + "x11_atom_cache.cc", + "x11_atom_cache.h", + "x11_connection.cc", + "x11_connection.h", + "x11_error_tracker.cc", + "x11_error_tracker.h", + "x11_types.cc", + "x11_types.h", + ] + + defines = [ "GFX_IMPLEMENTATION" ] + configs += [ "//build/config/linux:x11" ] + deps = [ "//base" ] +} diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn new file mode 100644 index 0000000..70c5ad4 --- /dev/null +++ b/ui/gl/BUILD.gn @@ -0,0 +1,289 @@ +# 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/ui.gni") + +gl_binding_output_dir = target_gen_dir + +config("gl_config") { + if (use_x11) { + defines = [ "GL_GLEXT_PROTOTYPES" ] + } +} + +component("gl") { + output_name = "gl_wrapper" # Avoid colliding with OS X"s libGL.dylib. + + sources = [ + "android/gl_jni_registrar.cc", + "android/gl_jni_registrar.h", + "android/scoped_java_surface.cc", + "android/scoped_java_surface.h", + "android/surface_texture.cc", + "android/surface_texture.h", + "android/surface_texture_listener.cc", + "android/surface_texture_listener.h", + "android/surface_texture_tracker.cc", + "android/surface_texture_tracker.h", + "gl_bindings.h", + "gl_bindings_skia_in_process.cc", + "gl_bindings_skia_in_process.h", + "gl_context.cc", + "gl_context.h", + "gl_context_android.cc", + "gl_context_mac.mm", + "gl_context_osmesa.cc", + "gl_context_osmesa.h", + "gl_context_stub.cc", + "gl_context_stub.h", + "gl_context_stub_with_extensions.cc", + "gl_context_stub_with_extensions.h", + "gl_context_win.cc", + "gl_context_x11.cc", + "gl_export.h", + "gl_fence.cc", + "gl_fence.h", + "gl_gl_api_implementation.cc", + "gl_gl_api_implementation.h", + "gl_image.cc", + "gl_image.h", + "gl_image_android.cc", + "gl_image_mac.cc", + "gl_image_shm.cc", + "gl_image_shm.h", + "gl_image_stub.cc", + "gl_image_stub.h", + "gl_image_win.cc", + "gl_image_x11.cc", + "gl_implementation.cc", + "gl_implementation.h", + "gl_implementation_android.cc", + "gl_implementation_mac.cc", + "gl_implementation_win.cc", + "gl_implementation_x11.cc", + "gl_osmesa_api_implementation.cc", + "gl_osmesa_api_implementation.h", + "gl_share_group.cc", + "gl_share_group.h", + "gl_state_restorer.cc", + "gl_state_restorer.h", + "gl_surface.cc", + "gl_surface.h", + "gl_surface_android.cc", + "gl_surface_mac.cc", + "gl_surface_stub.cc", + "gl_surface_stub.h", + "gl_surface_win.cc", + "gl_surface_x11.cc", + "gl_surface_osmesa.cc", + "gl_surface_osmesa.h", + "gl_switches.cc", + "gl_switches.h", + "gl_version_info.cc", + "gl_version_info.h", + "gpu_switching_manager.cc", + "gpu_switching_manager.h", + "io_surface_support_mac.cc", + "io_surface_support_mac.h", + "scoped_binders.cc", + "scoped_binders.h", + "scoped_make_current.cc", + "scoped_make_current.h", + "sync_control_vsync_provider.cc", + "sync_control_vsync_provider.h", + "$gl_binding_output_dir/gl_bindings_autogen_gl.cc", + "$gl_binding_output_dir/gl_bindings_autogen_gl.h", + "$gl_binding_output_dir/gl_bindings_autogen_osmesa.cc", + "$gl_binding_output_dir/gl_bindings_autogen_osmesa.h", + ] + + defines = [ "GL_IMPLEMENTATION" ] + + include_dirs = [ + "//third_party/switfshader/include", + "//third_party/khronos", + "//third_party/mesa/src/include", + gl_binding_output_dir, + ] + + all_dependent_configs = [ ":gl_config" ] + + deps = [ + ":generate_gl_bindings", + "//base", + "//base/third_party/dynamic_annotations", + "//gpu/command_buffer:gles2_utils", + "//skia", + # TODO(GYP) hook up once this is converted. + # Also uncomment forward statement below. + #"//third_party/mesa:mesa_headers", + "//ui/gfx", + "//ui/gfx/geometry", + ] + + # TODO(GYP) hook up once this is converted. + #forward_dependent_configs_from = [ "//third_party/mesa:mesa_headers" ] + + if (is_win || is_android || is_linux) { + sources += [ + "egl_util.cc", + "egl_util.h", + "gl_context_egl.cc", + "gl_context_egl.h", + "gl_image_egl.cc", + "gl_image_egl.h", + "gl_surface_egl.cc", + "gl_surface_egl.h", + "$gl_binding_output_dir/gl_bindings_autogen_egl.cc", + "$gl_binding_output_dir/gl_bindings_autogen_egl.h", + ] + } + if (is_android || is_linux) { + sources += [ + "gl_implementation_osmesa.cc", + "gl_implementation_osmesa.h", + ] + } + if (use_x11) { + sources += [ + "gl_context_glx.cc", + "gl_context_glx.h", + "gl_glx_api_implementation.cc", + "gl_glx_api_implementation.h", + "gl_image_glx.cc", + "gl_image_glx.h", + "gl_surface_glx.cc", + "gl_surface_glx.h", + "gl_egl_api_implementation.cc", + "gl_egl_api_implementation.h", + "$gl_binding_output_dir/gl_bindings_autogen_glx.cc", + "$gl_binding_output_dir/gl_bindings_autogen_glx.h", + ] + + configs += [ + "//build/config/linux:x11", + "//build/config/linux:xcomposite", + "//build/config/linux:xext", + ] + + deps += [ + "//ui/gfx/x", + ] + } + if (is_win) { + sources += [ + "gl_context_wgl.cc", + "gl_context_wgl.h", + "gl_egl_api_implementation.cc", + "gl_egl_api_implementation.h", + "gl_surface_wgl.cc", + "gl_surface_wgl.h", + "gl_wgl_api_implementation.cc", + "gl_wgl_api_implementation.h", + "$gl_binding_output_dir/gl_bindings_autogen_wgl.cc", + "$gl_binding_output_dir/gl_bindings_autogen_wgl.h", + ] + + libs = [ "dwmapi.lib" ] + ldflags = [ "/DELAYLOAD:dwmapi.dll" ] + } + if (is_mac) { + sources += [ + "gl_context_cgl.cc", + "gl_context_cgl.h", + "gl_image_io_surface.cc", + "gl_image_io_surface.h", + "gl_surface_cgl.cc", + "gl_surface_cgl.h", + "scoped_cgl.cc", + "scoped_cgl.h", + ] + + libs = [ "OpenGL.framework" ] + } + if (is_android) { + sources += [ + "gl_egl_api_implementation.cc", + "gl_egl_api_implementation.h", + "gl_image_android_native_buffer.cc", + "gl_image_android_native_buffer.h", + "gl_image_surface_texture.cc", + "gl_image_surface_texture.h", + ] + + defines += [ + "GL_GLEXT_PROTOTYPES", + "EGL_EGLEXT_PROTOTYPES", + ] + + libs = [ "android" ] + } + if (use_ozone) { + sources += [ + "gl_context_ozone.cc", + "gl_image_ozone.cc", + "gl_implementation_ozone.cc", + "gl_surface_ozone.cc", + ] + deps += [ + "//ui/gfx/ozone", + "//ui/ozone", + ] + } + + # TODO(GYP) enable this dependency once its written. + #if (is_android && !android_webview_build) { + # deps += [ "//ui/android:ui_java" ] + #} +} + +action("generate_gl_bindings") { + script = "generate_bindings.py" + + # TODO(brettw) make this dynamic. The GYP version calls "generate_bindings.py + # --inputs" to get the list here. What should happen is that the script + # should generate a .d file, which we should declare here. That will + # eliminate the need bot both hardcoding the list here or calling the script + # during GN-time. + source_prereqs = [ + "EGL/eglextchromium.h", + "GL/glextchromium.h", + "//third_party/mesa/src/include/GL/glext.h", + "//third_party/khronos/GLES2/gl2ext.h", + "//gpu/GLES2/gl2chromium.h", + "//gpu/GLES2/gl2extchromium.h", + "//third_party/khronos/EGL/eglext.h", + "//third_party/mesa/src/include/GL/wglext.h", + "//third_party/mesa/src/include/GL/glx.h", + "//third_party/mesa/src/include/GL/glxext.h", + ] + + outputs = [ + "$gl_binding_output_dir/gl_bindings_autogen_egl.cc", + "$gl_binding_output_dir/gl_bindings_autogen_egl.h", + "$gl_binding_output_dir/gl_bindings_api_autogen_egl.h", + "$gl_binding_output_dir/gl_bindings_autogen_gl.cc", + "$gl_binding_output_dir/gl_bindings_autogen_gl.h", + "$gl_binding_output_dir/gl_bindings_api_autogen_gl.h", + "$gl_binding_output_dir/gl_bindings_autogen_glx.cc", + "$gl_binding_output_dir/gl_bindings_autogen_glx.h", + "$gl_binding_output_dir/gl_bindings_api_autogen_glx.h", + "$gl_binding_output_dir/gl_bindings_autogen_mock.cc", + "$gl_binding_output_dir/gl_bindings_autogen_mock.h", + "$gl_binding_output_dir/gl_bindings_autogen_osmesa.cc", + "$gl_binding_output_dir/gl_bindings_autogen_osmesa.h", + "$gl_binding_output_dir/gl_bindings_api_autogen_osmesa.h", + "$gl_binding_output_dir/gl_bindings_autogen_wgl.cc", + "$gl_binding_output_dir/gl_bindings_autogen_wgl.h", + "$gl_binding_output_dir/gl_bindings_api_autogen_wgl.h", + "$gl_binding_output_dir/gl_mock_autogen_gl.h", + ] + + args = [ + "--header-paths=" + + rebase_path("//third_party/khronos", root_build_dir) + ":" + + rebase_path("//third_party/mesa/src/include", root_build_dir), + rebase_path(gl_binding_output_dir, root_build_dir), + ] +} diff --git a/ui/ozone/BUILD.gn b/ui/ozone/BUILD.gn new file mode 100644 index 0000000..182a647 --- /dev/null +++ b/ui/ozone/BUILD.gn @@ -0,0 +1,60 @@ +# 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("//ui/ozone/ozone.gni") + +declare_args() { + # The default platform for Ozone. + ozone_platform = "test" +} + +platform_list_file = "$target_gen_dir/ozone_platform_list.cc" + +component("ozone") { + sources = [ + platform_list_file, + # 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/native_display_delegate_ozone.cc", + "common/chromeos/native_display_delegate_ozone.h", + "ime/fake_input_method_context_ozone.cc", + "ime/fake_input_method_context_ozone.h", + "ime/input_method_context_factory_ozone.cc", + "ime/input_method_context_factory_ozone.h", + "ozone_platform.cc", + "ozone_platform.h", + "ozone_switches.cc", + "ozone_switches.h", + ] + + defines = [ "OZONE_IMPLEMENTATION" ] + + deps = [ + ":generate_ozone_platform_list", + "//base", + "//skia", + "//ui/base:ui_base", + "//ui/events", + "//ui/gfx", + "//ui/gfx/geometry", + "//ui/gfx/ozone", + ] +} + +# 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 = "" + +action("generate_ozone_platform_list") { + script = "generate_ozone_platform_list.py" + outputs = [ platform_list_file ] + + args = [ + "--output_file=" + rebase_path(platform_list_file, root_build_dir), + "--default=$ozone_platform", + ozone_platforms, + ] +} diff --git a/ui/ozone/ozone.gni b/ui/ozone/ozone.gni new file mode 100644 index 0000000..a777f59 --- /dev/null +++ b/ui/ozone/ozone.gni @@ -0,0 +1,18 @@ +# 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/ui.gni") + +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 { + ozone_platform_caca = false + ozone_platform_dri = false + ozone_platform_ozonex = false + ozone_platform_test = false +} |
