diff options
author | spang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 18:22:44 +0000 |
---|---|---|
committer | spang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 18:22:44 +0000 |
commit | f93c2c94d7fbe07746cc059d9ac9c27bea6e56fa (patch) | |
tree | fb586fe86db8920318a61db18c7a336aee78886f /ui/ozone/ozone.gyp | |
parent | 6fa5f6781038c63421b203556fa74efbe78e925f (diff) | |
download | chromium_src-f93c2c94d7fbe07746cc059d9ac9c27bea6e56fa.zip chromium_src-f93c2c94d7fbe07746cc059d9ac9c27bea6e56fa.tar.gz chromium_src-f93c2c94d7fbe07746cc059d9ac9c27bea6e56fa.tar.bz2 |
Implement OzonePlatform
This provides a way to select an ozone implementation to use at build time.
It replaces the previous ad-hoc requirement to inject implementations of
ozone interfaces somewhere during initialization, such as by overriding
ContentMainDelegate::PreSandboxStartup(). That requirement made it
difficult for external ozone implementations to build internal targets such
as content_shell because those targets do not initialize the external ozone
implementation without additional patching. Enabling external ports of
chromium is one of the main goals of ozone.
The OzonePlatform code is located at ui/ozone and depends on code in
ui/gfx and ui/events because it must inject implementations into
those components. The ozone platform is initialized from
ui/aura or ui/gl, as those components need the interfaces provided by ozone
in order to function.
There are two in-tree platforms currently: test (image dump) and dri
(libdrm-based direct rendering). The platform is selected by the setting
ozone_platform gyp variable and defaults to "test".
Review URL: https://codereview.chromium.org/44933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/ozone/ozone.gyp')
-rw-r--r-- | ui/ozone/ozone.gyp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/ui/ozone/ozone.gyp b/ui/ozone/ozone.gyp new file mode 100644 index 0000000..32008b7 --- /dev/null +++ b/ui/ozone/ozone.gyp @@ -0,0 +1,50 @@ +# Copyright 2013 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. + +{ + 'variables': { + 'chromium_code': 1, + 'external_ozone_platform_files': [], + 'external_ozone_platform_deps': [], + }, + 'targets': [ + { + 'target_name': 'ozone', + 'type': '<(component)', + 'dependencies': [ + '<(DEPTH)/base/base.gyp:base', + '<(DEPTH)/ui/gfx/gfx.gyp:gfx', + '<(DEPTH)/ui/events/events.gyp:events', + '<(DEPTH)/skia/skia.gyp:skia', + '<@(external_ozone_platform_deps)', + ], + 'defines': [ + 'OZONE_IMPLEMENTATION', + ], + 'sources': [ + 'ozone_platform.cc', + 'ozone_platform.h', + 'ozone_switches.cc', + 'ozone_switches.h', + 'platform/dri/ozone_platform_dri.cc', + 'platform/dri/ozone_platform_dri.h', + 'platform/test/ozone_platform_test.cc', + 'platform/test/ozone_platform_test.h', + '<@(external_ozone_platform_files)', + ], + 'conditions': [ + ['ozone_platform != "dri"', { + 'sources/': [ + ['exclude', '^platform/dri/'], + ] + }], + ['ozone_platform != "test"', { + 'sources/': [ + ['exclude', '^platform/test/'], + ] + }], + ] + }, + ], +} |