Implement --ozone-platform flag to select OzonePlatform implementation at runtime

This provides a way to select an ozone implementation to use at runtime. Each
ozone implementation adds its name to the ozone_platforms GYP variable, and we
take care of parsing the flag value and configuring chromium to use that
implementation during initialization.

To support external ports, we generate the list of enabled platforms at
build time. The list is a static array that maps values of the --ozone_platform
flag to a constructor function for an OzonePlatform subclass. At runtime, we
call the constructor for platform specified on the command-line and use it to
provide implementations of the various ozone interfaces (SurfaceFactoryOzone,
EventFactoryOzone).

Review URL: https://codereview.chromium.org/44053005

git-svn-id: http://src.chromium.org/svn/trunk/src/build@232301 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
spang@chromium.org 2013-11-01 05:37:26 +00:00
Родитель 71ddec9dff
Коммит 4323b37b79
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1794,7 +1794,12 @@
}],
['use_ozone==1', {
# This is the default platform
'ozone_platform%': "test",
# Enable built-in ozone platforms if ozone is enabled.
'ozone_platform_dri%': 1,
'ozone_platform_test%': 1,
}],
],