Index: ui/ozone/generate_ozone_platform_list.py |
diff --git a/ui/ozone/generate_ozone_platform_list.py b/ui/ozone/generate_ozone_platform_list.py |
index df85a1eab92c136eb5d714d5968c14f53d5c1284..2473dce202f0bf23e24e01259b531cc85d461f3a 100755 |
--- a/ui/ozone/generate_ozone_platform_list.py |
+++ b/ui/ozone/generate_ozone_platform_list.py |
@@ -15,12 +15,18 @@ Example Output: ./generate_ozone_platform_list.py --default wayland dri wayland |
namespace ui { |
- OzonePlatform* CreateOzonePlatformDri(); |
- OzonePlatform* CreateOzonePlatformWayland(); |
+ OzonePlatform* CreateOzonePlatformDriForUI(); |
+ OzonePlatform* CreateOzonePlatformDriForGPU(); |
+ OzonePlatform* CreateOzonePlatformWaylandForUI(); |
+ OzonePlatform* CreateOzonePlatformWaylandForGPU(); |
const OzonePlatformListEntry kOzonePlatforms[] = { |
- { "wayland", &CreateOzonePlatformWayland }, |
- { "dri", &CreateOzonePlatformDri }, |
+ { "wayland", |
+ &CreateOzonePlatformWaylandForUI, |
+ &CreateOzonePlatformWaylandForGPU }, |
+ { "dri", |
+ &CreateOzonePlatformDriForUI, |
+ &CreateOzonePlatformDriForGPU }, |
}; |
const int kOzonePlatformCount = 2; |
@@ -56,13 +62,17 @@ def GeneratePlatformList(out, platforms): |
# Prototypes for platform initializers. |
for platform in platforms: |
- out.write('OzonePlatform* %s();\n' % GetConstructorName(platform)) |
+ ctor = GetConstructorName(platform) |
+ out.write('OzonePlatform* %sForUI();\nOzonePlatform* %sForGPU();\n' % \ |
+ (ctor, ctor)) |
out.write('\n') |
# List of platform names and initializers. |
out.write('const OzonePlatformListEntry kOzonePlatforms[] = {\n') |
for platform in platforms: |
- out.write(' { "%s", &%s },\n' % (platform, GetConstructorName(platform))) |
+ ctor = GetConstructorName(platform) |
+ out.write(' { "%s", &%sForUI, &%sForGPU },\n' % \ |
+ (platform, ctor, ctor)) |
out.write('};\n') |
out.write('\n') |