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

Issue 2629983002: Fix the MessageLoop type in case more than one ozone platform is built (Closed)

Created:
3 years, 11 months ago by tonikitoo
Modified:
3 years, 10 months ago
CC:
chromium-reviews, jam, darin-cc_chromium.org, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the MessageLoop type in case more than one ozone platform is built One of the premises of Ozone is that one can trigger a backend at runtime. For example, if one has ozone_platform_x11=true ozone_platform_wayland=true .. in the GN args, it should be able to launch either backend by passing --ozone-platform=x11|wayland. This enforces no compile time branches where possible. In [1], a OZONE_X11 define was added, and slightly breaks that premise. This CL fixes it by: - making OzonePlatform::CreateInstance public (and renaming it to ::EnsureInstance). This allows the creation of the OzonePlatform instance without doing any actual initialization. - Adding a OzonePlatform::GetMessageLoopTypeForGpu virtual method, which returns the MessageLoop type required for the GPU depending on the Ozone platform selected at runtime. [1] https://codereview.chromium.org/1723303002 BUG=640613, 686092 Review-Url: https://codereview.chromium.org/2629983002 Cr-Commit-Position: refs/heads/master@{#449068} Committed: https://chromium.googlesource.com/chromium/src/+/fb807b102e67eb2dfb2bc2318a5c913a021350b8

Patch Set 1 #

Patch Set 2 : Fix the MessageLoop type in case more than one ozone platform it built #

Patch Set 3 : Fix the MessageLoop type in case more than one ozone platform it built #

Total comments: 2

Patch Set 4 : added a comment explain the static method #

Total comments: 6

Patch Set 5 : addressed moar sadrul/kylechar's feedback #

Total comments: 12

Patch Set 6 : Fixed moar feedback from kylechar/fwang #

Total comments: 6

Patch Set 7 : addressed sadrul's remarks. #

Total comments: 2

Patch Set 8 : addressed kbr's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -16 lines) Patch
M content/gpu/BUILD.gn View 1 chunk +0 lines, -4 lines 0 comments Download
M content/gpu/gpu_main.cc View 2 chunks +8 lines, -6 lines 0 comments Download
M services/ui/gpu/gpu_main.cc View 2 chunks +8 lines, -1 line 0 comments Download
M ui/ozone/platform/x11/ozone_platform_x11.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/ozone/public/ozone_platform.h View 4 chunks +11 lines, -2 lines 0 comments Download
M ui/ozone/public/ozone_platform.cc View 6 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 71 (38 generated)
tonikitoo
PTAL
3 years, 11 months ago (2017-01-13 23:38:00 UTC) #11
kylechar
On 2017/01/13 23:38:00, tonikitoo wrote: > PTAL Is MessageLoop::TYPE_UI causing problems for wayland? I actually ...
3 years, 11 months ago (2017-01-14 15:56:31 UTC) #13
tonikitoo
Thanks for the the feedback, Kyle. On 2017/01/14 15:56:31, kylechar wrote: > On 2017/01/13 23:38:00, ...
3 years, 11 months ago (2017-01-14 17:18:40 UTC) #14
tonikitoo
On 2017/01/14 15:56:31, kylechar wrote: > On 2017/01/13 23:38:00, tonikitoo wrote: > > PTAL > ...
3 years, 11 months ago (2017-01-16 12:26:25 UTC) #19
tonikitoo
3 years, 11 months ago (2017-01-16 12:36:46 UTC) #21
fwang
https://codereview.chromium.org/2629983002/diff/40001/ui/ozone/public/ozone_platform.cc File ui/ozone/public/ozone_platform.cc (right): https://codereview.chromium.org/2629983002/diff/40001/ui/ozone/public/ozone_platform.cc#newcode108 ui/ozone/public/ozone_platform.cc:108: // If we are be running Ozone X11 we ...
3 years, 11 months ago (2017-01-16 13:24:47 UTC) #23
kylechar
https://codereview.chromium.org/2629983002/diff/40001/ui/ozone/public/ozone_platform.h File ui/ozone/public/ozone_platform.h (right): https://codereview.chromium.org/2629983002/diff/40001/ui/ozone/public/ozone_platform.h#newcode96 ui/ozone/public/ozone_platform.h:96: static base::MessageLoop::Type GetMessageLoopType(); Add a comment to why this ...
3 years, 11 months ago (2017-01-17 21:54:53 UTC) #24
tonikitoo
On 2017/01/17 21:54:53, kylechar wrote: > https://codereview.chromium.org/2629983002/diff/40001/ui/ozone/public/ozone_platform.h > File ui/ozone/public/ozone_platform.h (right): > > https://codereview.chromium.org/2629983002/diff/40001/ui/ozone/public/ozone_platform.h#newcode96 > ...
3 years, 11 months ago (2017-01-18 20:35:36 UTC) #25
kylechar
lgtm, thanks!
3 years, 11 months ago (2017-01-18 20:47:05 UTC) #28
spang
https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.cc File ui/ozone/public/ozone_platform.cc (right): https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.cc#newcode110 ui/ozone/public/ozone_platform.cc:110: return (!strcmp(GetOzonePlatformName(), "x11")) Don't use the platform name. Use ...
3 years, 11 months ago (2017-01-19 16:31:55 UTC) #32
kylechar
https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.cc File ui/ozone/public/ozone_platform.cc (right): https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.cc#newcode110 ui/ozone/public/ozone_platform.cc:110: return (!strcmp(GetOzonePlatformName(), "x11")) On 2017/01/19 16:31:55, spang wrote: > ...
3 years, 11 months ago (2017-01-19 16:59:50 UTC) #33
sadrul
https://codereview.chromium.org/2629983002/diff/60001/content/gpu/gpu_main.cc File content/gpu/gpu_main.cc (right): https://codereview.chromium.org/2629983002/diff/60001/content/gpu/gpu_main.cc#newcode223 content/gpu/gpu_main.cc:223: new base::MessageLoop(ui::OzonePlatform::GetMessageLoopType())); Is there a reason to not always ...
3 years, 10 months ago (2017-01-31 17:12:37 UTC) #35
kylechar
On 2017/01/31 17:12:37, sadrul wrote: > https://codereview.chromium.org/2629983002/diff/60001/content/gpu/gpu_main.cc > File content/gpu/gpu_main.cc (right): > > https://codereview.chromium.org/2629983002/diff/60001/content/gpu/gpu_main.cc#newcode223 > ...
3 years, 10 months ago (2017-01-31 17:23:47 UTC) #36
sadrul
On 2017/01/31 17:23:47, kylechar wrote: > On 2017/01/31 17:12:37, sadrul wrote: > > https://codereview.chromium.org/2629983002/diff/60001/content/gpu/gpu_main.cc > ...
3 years, 10 months ago (2017-01-31 17:27:36 UTC) #37
kylechar
On 2017/01/31 17:27:36, sadrul wrote: > On 2017/01/31 17:23:47, kylechar wrote: > > On 2017/01/31 ...
3 years, 10 months ago (2017-01-31 17:30:06 UTC) #38
sadrul
On 2017/01/31 17:30:06, kylechar wrote: > On 2017/01/31 17:27:36, sadrul wrote: > > On 2017/01/31 ...
3 years, 10 months ago (2017-01-31 17:38:45 UTC) #39
sadrul
https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.h File ui/ozone/public/ozone_platform.h (right): https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.h#newcode98 ui/ozone/public/ozone_platform.h:98: static base::MessageLoop::Type GetMessageLoopType(); Also, change this to GetMessageLoopTypeForGpu()?
3 years, 10 months ago (2017-01-31 17:40:09 UTC) #40
tonikitoo
On 2017/01/31 17:40:09, sadrul wrote: > https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.h > File ui/ozone/public/ozone_platform.h (right): > > https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.h#newcode98 > ...
3 years, 10 months ago (2017-01-31 19:49:53 UTC) #41
tonikitoo
patchset 5 should fix the review comments. https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.cc File ui/ozone/public/ozone_platform.cc (right): https://codereview.chromium.org/2629983002/diff/60001/ui/ozone/public/ozone_platform.cc#newcode110 ui/ozone/public/ozone_platform.cc:110: return (!strcmp(GetOzonePlatformName(), ...
3 years, 10 months ago (2017-02-07 16:18:37 UTC) #42
fwang
informal l g t m https://codereview.chromium.org/2629983002/diff/80001/content/gpu/gpu_main.cc File content/gpu/gpu_main.cc (right): https://codereview.chromium.org/2629983002/diff/80001/content/gpu/gpu_main.cc#newcode227 content/gpu/gpu_main.cc:227: // This is needed ...
3 years, 10 months ago (2017-02-07 17:03:47 UTC) #45
kylechar
Thanks for doing this! I've noted a few minor things. https://codereview.chromium.org/2629983002/diff/80001/content/gpu/gpu_main.cc File content/gpu/gpu_main.cc (right): https://codereview.chromium.org/2629983002/diff/80001/content/gpu/gpu_main.cc#newcode227 ...
3 years, 10 months ago (2017-02-07 17:41:47 UTC) #48
tonikitoo
https://codereview.chromium.org/2629983002/diff/80001/content/gpu/gpu_main.cc File content/gpu/gpu_main.cc (right): https://codereview.chromium.org/2629983002/diff/80001/content/gpu/gpu_main.cc#newcode227 content/gpu/gpu_main.cc:227: // This is needed so that we can inquery ...
3 years, 10 months ago (2017-02-07 19:36:41 UTC) #49
kylechar
lgtm.
3 years, 10 months ago (2017-02-07 19:38:20 UTC) #52
tonikitoo
kbr@chromium.org: Please review changes in content/gpu/.
3 years, 10 months ago (2017-02-07 22:16:03 UTC) #57
sadrul
https://codereview.chromium.org/2629983002/diff/100001/services/ui/gpu/gpu_main.cc File services/ui/gpu/gpu_main.cc (right): https://codereview.chromium.org/2629983002/diff/100001/services/ui/gpu/gpu_main.cc#newcode61 services/ui/gpu/gpu_main.cc:61: ui::OzonePlatform::CreateInstance(); We should not have this here. https://codereview.chromium.org/2629983002/diff/100001/ui/ozone/public/ozone_platform.h File ...
3 years, 10 months ago (2017-02-08 01:49:26 UTC) #58
tonikitoo
https://codereview.chromium.org/2629983002/diff/100001/services/ui/gpu/gpu_main.cc File services/ui/gpu/gpu_main.cc (right): https://codereview.chromium.org/2629983002/diff/100001/services/ui/gpu/gpu_main.cc#newcode61 services/ui/gpu/gpu_main.cc:61: ui::OzonePlatform::CreateInstance(); On 2017/02/08 01:49:26, sadrul wrote: > We should ...
3 years, 10 months ago (2017-02-08 02:42:34 UTC) #59
Ken Russell (switch to Gerrit)
LGTM with comment https://codereview.chromium.org/2629983002/diff/120001/ui/ozone/public/ozone_platform.h File ui/ozone/public/ozone_platform.h (right): https://codereview.chromium.org/2629983002/diff/120001/ui/ozone/public/ozone_platform.h#newcode77 ui/ozone/public/ozone_platform.h:77: // platform selected at runtime, e.g. ...
3 years, 10 months ago (2017-02-08 04:57:45 UTC) #60
tonikitoo
https://codereview.chromium.org/2629983002/diff/120001/ui/ozone/public/ozone_platform.h File ui/ozone/public/ozone_platform.h (right): https://codereview.chromium.org/2629983002/diff/120001/ui/ozone/public/ozone_platform.h#newcode77 ui/ozone/public/ozone_platform.h:77: // platform selected at runtime, e.g. ::GetMessageLoopTypeForGpu, On 2017/02/08 ...
3 years, 10 months ago (2017-02-08 06:42:08 UTC) #62
sadrul
OK. Thanks for explaining. lgtm
3 years, 10 months ago (2017-02-08 06:56:57 UTC) #63
spang
lgtm
3 years, 10 months ago (2017-02-08 18:07:58 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2629983002/140001
3 years, 10 months ago (2017-02-08 18:10:56 UTC) #67
rjkroege
On 2017/02/08 18:10:56, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
3 years, 10 months ago (2017-02-08 18:49:05 UTC) #68
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 19:52:51 UTC) #71
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/fb807b102e67eb2dfb2bc2318a5c...

Powered by Google App Engine
This is Rietveld 408576698