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

Issue 750593003: Ozone X11 platform

Created:
6 years, 1 month ago by achaulk
Modified:
6 years ago
Reviewers:
sadrul, spang
CC:
chromium-reviews, ozone-reviews_chromium.org, feature-media-reviews_chromium.org, kalyank, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Ozone X11 platform It uses the existing X11 platform event source and converts to ui::Event before dispatching. use_x11 is false for the entire build, a new flag use_x11_backend is introduced to enable the x11 event processing. BUG=361137

Patch Set 1 #

Total comments: 16

Patch Set 2 : rebasing #

Patch Set 3 : remove ifdefs, make x11 be buildable with other platforms #

Patch Set 4 : remove unused import #

Patch Set 5 : rebase. also scrolling now works for some reason #

Patch Set 6 : remove new evernt type, add direct route from event -> platform window #

Total comments: 19

Patch Set 7 : remove partial swap api #

Patch Set 8 : rebase #

Patch Set 9 : move egl configs into ozone #

Patch Set 10 : cleanup leftover stuff #

Unified diffs Side-by-side diffs Delta from patch set Stats (+831 lines, -386 lines) Patch
M build/config/ui.gni View 1 2 3 chunks +10 lines, -0 lines 0 comments Download
M media/ozone/media_ozone_platform.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/BUILD.gn View 1 2 3 4 5 chunks +5 lines, -5 lines 0 comments Download
M ui/events/DEPS View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/events/devices/BUILD.gn View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/events/devices/x11/device_data_manager_x11.h View 5 chunks +13 lines, -13 lines 0 comments Download
M ui/events/devices/x11/device_data_manager_x11.cc View 13 chunks +28 lines, -40 lines 0 comments Download
M ui/events/devices/x11/touch_factory_x11.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/devices/x11/touch_factory_x11.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M ui/events/event_constants.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/events/event_utils.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/events/keycodes/keyboard_codes_posix.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/ozone/events_ozone.cc View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M ui/events/platform/BUILD.gn View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/events/platform/x11/BUILD.gn View 2 chunks +3 lines, -1 line 0 comments Download
M ui/events/platform/x11/x11_event_source.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/events/platform/x11/x11_event_source.cc View 2 chunks +9 lines, -2 lines 0 comments Download
A + ui/events/x/events_x.h View 1 2 3 4 4 chunks +32 lines, -86 lines 0 comments Download
M ui/events/x/events_x.cc View 1 2 3 4 5 27 chunks +171 lines, -44 lines 0 comments Download
M ui/gl/gl_surface_egl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_surface_egl.cc View 1 2 3 4 5 6 7 8 4 chunks +3 lines, -23 lines 0 comments Download
M ui/gl/gl_surface_ozone.cc View 1 2 3 4 5 6 7 8 9 3 chunks +32 lines, -0 lines 0 comments Download
M ui/ozone/BUILD.gn View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M ui/ozone/common/egl_util.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M ui/ozone/common/egl_util.cc View 1 2 3 4 5 6 7 8 9 1 chunk +23 lines, -0 lines 0 comments Download
M ui/ozone/ozone.gni View 1 2 2 chunks +10 lines, -2 lines 0 comments Download
M ui/ozone/platform/dri/gbm_surface_factory.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M ui/ozone/platform/dri/gbm_surface_factory.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -4 lines 0 comments Download
M ui/ozone/platform/egltest/ozone_platform_egltest.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -4 lines 0 comments Download
A + ui/ozone/platform/x11/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -8 lines 0 comments Download
A + ui/ozone/platform/x11/ozone_platform_x11.h View 1 chunk +4 lines, -4 lines 0 comments Download
A ui/ozone/platform/x11/ozone_platform_x11.cc View 1 2 3 4 5 6 7 8 1 chunk +103 lines, -0 lines 0 comments Download
A + ui/ozone/platform/x11/x11_input_controller.h View 1 2 3 4 2 chunks +7 lines, -12 lines 0 comments Download
A ui/ozone/platform/x11/x11_input_controller.cc View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A ui/ozone/platform/x11/x11_surface_factory.h View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
A ui/ozone/platform/x11/x11_surface_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +130 lines, -0 lines 0 comments Download
M ui/ozone/public/surface_factory_ozone.h View 1 2 3 4 5 6 7 8 3 chunks +20 lines, -7 lines 0 comments Download
M ui/ozone/public/surface_factory_ozone.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -3 lines 0 comments Download
M ui/platform_window/x11/x11_window.h View 1 2 3 4 5 3 chunks +39 lines, -4 lines 0 comments Download
M ui/platform_window/x11/x11_window.cc View 1 2 3 4 5 9 chunks +53 lines, -110 lines 0 comments Download

Messages

Total messages: 16 (1 generated)
achaulk
New version for ozone X11 This one uses the X event code, but translates to ...
6 years, 1 month ago (2014-11-21 21:59:05 UTC) #2
spang
https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni File build/config/ui.gni (right): https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni#newcode65 build/config/ui.gni:65: use_ozone_evdev = use_ozone && !use_ozone_x11 shouldn't disable evdev if ...
6 years ago (2014-11-24 18:56:54 UTC) #3
achaulk
https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni File build/config/ui.gni (right): https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni#newcode65 build/config/ui.gni:65: use_ozone_evdev = use_ozone && !use_ozone_x11 On 2014/11/24 18:56:54, spang ...
6 years ago (2014-11-24 19:28:39 UTC) #4
spang
https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni File build/config/ui.gni (right): https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni#newcode65 build/config/ui.gni:65: use_ozone_evdev = use_ozone && !use_ozone_x11 On 2014/11/24 19:28:39, achaulk ...
6 years ago (2014-11-24 20:04:24 UTC) #5
achaulk
https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni File build/config/ui.gni (right): https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni#newcode65 build/config/ui.gni:65: use_ozone_evdev = use_ozone && !use_ozone_x11 On 2014/11/24 20:04:24, spang ...
6 years ago (2014-11-24 20:16:26 UTC) #6
spang
On 2014/11/24 20:16:26, achaulk wrote: > https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni > File build/config/ui.gni (right): > > https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni#newcode65 > ...
6 years ago (2014-11-24 20:30:30 UTC) #7
achaulk
On 2014/11/24 20:30:30, spang wrote: > On 2014/11/24 20:16:26, achaulk wrote: > > https://codereview.chromium.org/750593003/diff/1/build/config/ui.gni > ...
6 years ago (2014-11-28 19:39:17 UTC) #8
achaulk
PTAL, I think with the xevent message type removed all of the initial concerns have ...
6 years ago (2014-12-05 21:19:04 UTC) #9
spang
https://codereview.chromium.org/750593003/diff/100001/build/config/ui.gni File build/config/ui.gni (right): https://codereview.chromium.org/750593003/diff/100001/build/config/ui.gni#newcode61 build/config/ui.gni:61: # specifies if X11 is used as a backend ...
6 years ago (2014-12-06 00:31:23 UTC) #10
achaulk
https://codereview.chromium.org/750593003/diff/100001/build/config/ui.gni File build/config/ui.gni (right): https://codereview.chromium.org/750593003/diff/100001/build/config/ui.gni#newcode61 build/config/ui.gni:61: # specifies if X11 is used as a backend ...
6 years ago (2014-12-08 16:33:43 UTC) #11
achaulk
https://codereview.chromium.org/750593003/diff/100001/ui/gl/gl_surface_ozone.cc File ui/gl/gl_surface_ozone.cc (right): https://codereview.chromium.org/750593003/diff/100001/ui/gl/gl_surface_ozone.cc#newcode70 ui/gl/gl_surface_ozone.cc:70: if (!config_) { On 2014/12/06 00:31:23, spang wrote: > ...
6 years ago (2014-12-08 16:44:41 UTC) #12
spang
On 2014/12/08 16:33:43, achaulk wrote: > https://codereview.chromium.org/750593003/diff/100001/build/config/ui.gni > File build/config/ui.gni (right): > > https://codereview.chromium.org/750593003/diff/100001/build/config/ui.gni#newcode61 > ...
6 years ago (2014-12-09 00:58:40 UTC) #13
achaulk
On 2014/12/09 00:58:40, spang wrote: > On 2014/12/08 16:33:43, achaulk wrote: > > https://codereview.chromium.org/750593003/diff/100001/build/config/ui.gni > ...
6 years ago (2014-12-09 15:26:07 UTC) #14
spang
https://codereview.chromium.org/750593003/diff/100001/ui/gl/gl_surface_ozone.cc File ui/gl/gl_surface_ozone.cc (right): https://codereview.chromium.org/750593003/diff/100001/ui/gl/gl_surface_ozone.cc#newcode70 ui/gl/gl_surface_ozone.cc:70: if (!config_) { On 2014/12/08 16:44:41, achaulk wrote: > ...
6 years ago (2014-12-09 19:47:33 UTC) #15
achaulk
6 years ago (2014-12-15 18:23:40 UTC) #16
On 2014/12/09 19:47:33, spang wrote:
>
https://codereview.chromium.org/750593003/diff/100001/ui/gl/gl_surface_ozone.cc
> File ui/gl/gl_surface_ozone.cc (right):
> 
>
https://codereview.chromium.org/750593003/diff/100001/ui/gl/gl_surface_ozone....
> ui/gl/gl_surface_ozone.cc:70: if (!config_) {
> On 2014/12/08 16:44:41, achaulk wrote:
> > On 2014/12/06 00:31:23, spang wrote:
> > > We may want to delegate this whole config-choosing process and remove
> > > GetEGLSurfaceProperties. It's clearly platform-specific in nontrivial
ways.
> > 
> > It is, but it involves calling egl from within ozone, and I thought we were
> > avoiding that?
> 
> We were mostly worried about #incuding chrome's version of the khronos headers
> from ui/ozone/public/*.h because some platforms may need a modified header.
> 
> Since EGLConfig is just void* we could still do
> 
> class SurfaceOzoneEGL {
>   virtual void* /* EGLConfig */ GetConfig() = 0;
> };
> 
> We don't need to #include any headers for that.
> 
> It's definitely ugly but should work.. its a pain that EGL has these
> platform-specific typedefs..

Added callbacks and moved init to inside ozone

> 
>
https://codereview.chromium.org/750593003/diff/100001/ui/ozone/platform/x11/o...
> File ui/ozone/platform/x11/ozone_platform_x11.cc (right):
> 
>
https://codereview.chromium.org/750593003/diff/100001/ui/ozone/platform/x11/o...
> ui/ozone/platform/x11/ozone_platform_x11.cc:79: X11InputController
> input_controller_;
> On 2014/12/08 16:44:41, achaulk wrote:
> > On 2014/12/06 00:31:23, spang wrote:
> > > I don't think it makes sense to have an input controller in the GPU
process.
> > 
> > It's just a stub for now. If it really is as simple as "return true for
> > HasMouse" then it doesn't matter where it lives, otherwise it'll get moved
> into
> > the events tree
> 
> Would still prefer you put it in the scoped_ptr<> for consistency with all the
> other parts that are only used from some processes.
> 
> I think eventually we should split the process-specific stuff into separate
> objects altogether but for now we are just conditionally initializing parts of
> this one.

Done
> 
>
https://codereview.chromium.org/750593003/diff/100001/ui/ozone/platform/x11/x...
> File ui/ozone/platform/x11/x11_surface_factory.cc (right):
> 
>
https://codereview.chromium.org/750593003/diff/100001/ui/ozone/platform/x11/x...
> ui/ozone/platform/x11/x11_surface_factory.cc:35: bool SupportsPartialSwap()
> override { return false; }
> On 2014/12/08 16:44:41, achaulk wrote:
> > On 2014/12/06 00:31:23, spang wrote:
> > > Not sure we should do this. Doing it this way breaks partial swap for
> > everyone,
> > > even if you have a working GLES driver.
> > 
> > I don't know how to determine if it is broken or not. The extension is
> reported
> > as present, it just doesn't work
> 
> Fixing this @ https://codereview.chromium.org/792623002/

Removed extra API

Powered by Google App Engine
This is Rietveld 408576698