Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Issue 44053005: Implement --ozone-platform flag to select OzonePlatform implementation at runtime (Closed)

Created:
7 years, 1 month ago by spang
Modified:
7 years, 1 month ago
CC:
chromium-reviews, rjkroege, sadrul, dnicoara
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

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). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232301

Patch Set 1 #

Patch Set 2 : add clarifying comments to CreateOzonePlatformFoo() hooks #

Patch Set 3 : remove obsolete CreateDefaultOzonePlatform() prototype #

Total comments: 6

Patch Set 4 : document CreatePlatform, GetRequestPlatform + rjkroege nits #

Patch Set 5 : add external_ozone_platforms var to fix merge #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -8 lines) Patch
M build/common.gypi View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
A ui/ozone/generate_ozone_platform_list.py View 1 2 3 4 5 1 chunk +101 lines, -0 lines 0 comments Download
M ui/ozone/ozone.gyp View 1 2 3 4 5 3 chunks +43 lines, -2 lines 0 comments Download
M ui/ozone/ozone_platform.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/ozone_platform.cc View 1 2 3 4 5 2 chunks +30 lines, -1 line 0 comments Download
A ui/ozone/ozone_platform_list.h View 1 2 3 4 5 1 chunk +25 lines, -0 lines 0 comments Download
M ui/ozone/ozone_switches.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/ozone_switches.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/dri/ozone_platform_dri.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/dri/ozone_platform_dri.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/platform/test/ozone_platform_test.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/test/ozone_platform_test.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
spang
This is the extra goop to let multiple platforms get built into the same binary ...
7 years, 1 month ago (2013-10-25 19:41:16 UTC) #1
kalyank
https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone.gyp File ui/base/ozone/ozone.gyp (right): https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone.gyp#newcode67 ui/base/ozone/ozone.gyp:67: }, { # ozone_platform_dri==0 If ozone is enabled, we ...
7 years, 1 month ago (2013-10-25 21:09:30 UTC) #2
spang
https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone.gyp File ui/base/ozone/ozone.gyp (right): https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone.gyp#newcode67 ui/base/ozone/ozone.gyp:67: }, { # ozone_platform_dri==0 On 2013/10/25 21:09:30, kalyank wrote: ...
7 years, 1 month ago (2013-10-25 21:14:14 UTC) #3
vignatti (out of this project)
On 2013/10/25 19:41:16, spang wrote: > This is the extra goop to let multiple platforms ...
7 years, 1 month ago (2013-10-28 14:37:11 UTC) #4
rjkroege
lgtm with some nits https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone_platform.cc File ui/base/ozone/ozone_platform.cc (right): https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone_platform.cc#newcode16 ui/base/ozone/ozone_platform.cc:16: for (int i = 0; ...
7 years, 1 month ago (2013-10-28 16:02:14 UTC) #5
spang
https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone_platform.cc File ui/base/ozone/ozone_platform.cc (right): https://codereview.chromium.org/44053005/diff/60001/ui/base/ozone/ozone_platform.cc#newcode16 ui/base/ozone/ozone_platform.cc:16: for (int i = 0; i < kOzonePlatformCount; ++i) ...
7 years, 1 month ago (2013-10-28 16:27:38 UTC) #6
kalyank
I am happy with the solution, thanks for handling this. At some point, we should ...
7 years, 1 month ago (2013-10-29 16:59:08 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/spang@chromium.org/44053005/220001
7 years, 1 month ago (2013-10-31 23:23:04 UTC) #8
commit-bot: I haz the power
7 years, 1 month ago (2013-11-01 05:37:33 UTC) #9
Message was sent while issue was closed.
Change committed as 232301

Powered by Google App Engine
This is Rietveld 408576698