New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640613 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 3
Type: Bug

Blocking:
issue 361137



Sign in to add a comment

Add GLX implementation for Ozone X11

Project Member Reported by kylec...@chromium.org, Aug 24 2016

Issue description

In order to properly support Nvidia GPUsn we need Ozone X11 to support GLX. Now that //ui/ozone can depend on //ui/gl this should be possible.

It will require some refactoring of SurfaceFactoryOzone to provide additional overrides for initialization and context creation that are currently hard coded in gl_initializer_ozone.cc and gl_factory_ozone.cc.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/036945276e54bd6d98d3e51ccfec21c56dc80b61

commit 036945276e54bd6d98d3e51ccfec21c56dc80b61
Author: kylechar <kylechar@chromium.org>
Date: Thu Sep 01 20:50:57 2016

Add GLOzone interface.

Move the Ozone platform GL implementation code into a single interface.
Right now the code to implement EGL for an Ozone platform is located
part in //ui/gl/init and part in SurfaceFactoryOzone implementation.

The current approach exposes EGL specific concepts in the shared Ozone
code. This works fine currently because EGL is relatively platform
agnostic. This gets much messier for GLX because it is not platform
agnostic.

Move the existing shared EGL code into an abstract class GLOzoneGL that
implements GLOzone. Each Ozone platform can then finish the
implementation. This has a nice side effect that SurfaceFactoryOzone no
longer has to expose EGL concepts.

Only the Ozone X11 platform is updated initially. The GBM, cast and
wayland Ozone platforms will need to be updated to use the new interface
in a subsequent CL.

BUG= 640613 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2270463002
Cr-Commit-Position: refs/heads/master@{#416045}

[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/BUILD.gn
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/init/BUILD.gn
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/init/gl_factory.h
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/init/gl_factory_ozone.cc
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/init/gl_initializer_ozone.cc
[add] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/init/ozone_util.h
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/test/DEPS
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/gl/test/gl_surface_test_support.cc
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/BUILD.gn
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/common/BUILD.gn
[add] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/common/gl_ozone_egl.cc
[add] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/common/gl_ozone_egl.h
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/platform/x11/x11_surface_factory.cc
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/platform/x11/x11_surface_factory.h
[add] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/public/gl_ozone.h
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/public/surface_factory_ozone.cc
[modify] https://crrev.com/036945276e54bd6d98d3e51ccfec21c56dc80b61/ui/ozone/public/surface_factory_ozone.h

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47699347f0d4decc0d1ef082a2597e399c57f636

commit 47699347f0d4decc0d1ef082a2597e399c57f636
Author: kylechar <kylechar@chromium.org>
Date: Wed Sep 14 16:03:48 2016

Implement GLX for Ozone X11.

This CL adds GLX support to the Ozone X11 platform. Ozone X11 will
attempt to use GLX by default.

It reuses the existing GLX GLSurface and GLContext. Changes to
NativeViewSurfaceGLX are necessary as it handles Expose events from the
PlatformEventSource. The class is split into an abstract base class with
two small event handling implementations for USE_X11 and USE_OZONE.

BUG= 361137 , 640613 

Review-Url: https://codereview.chromium.org/1723303002
Cr-Commit-Position: refs/heads/master@{#418575}

[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/content/gpu/BUILD.gn
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/content/gpu/gpu_main.cc
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/events/platform/x11/x11_event_source_libevent.cc
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/events/platform/x11/x11_event_source_libevent.h
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/gl/BUILD.gn
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/gl/gl_surface_glx.cc
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/gl/gl_surface_glx.h
[add] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/gl/gl_surface_glx_x11.cc
[add] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/gl/gl_surface_glx_x11.h
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/gl/init/gl_factory_x11.cc
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/BUILD.gn
[add] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/gl_ozone_glx.cc
[add] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/gl_ozone_glx.h
[add] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/gl_surface_glx_ozone.cc
[add] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/gl_surface_glx_ozone.h
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/ozone_platform_x11.cc
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/x11_surface_factory.cc
[modify] https://crrev.com/47699347f0d4decc0d1ef082a2597e399c57f636/ui/ozone/platform/x11/x11_surface_factory.h

Status: Fixed (was: Started)
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/380aafbf57e5b6a162502065220e05beb391e287

commit 380aafbf57e5b6a162502065220e05beb391e287
Author: fwang <fwang@igalia.com>
Date: Thu Sep 15 04:35:40 2016

Ozone caca: Fix segfault during GPU initialization

After https://codereview.chromium.org/2270463002,
gl::init::GetAllowedGLImplementations assumes GetSurfaceFactoryOzone to
be non-null on the GPU side. The remaining Ozone platform violating
this assumption is addressed in this CL.

BUG= 640613 
R=rjkroege@chromium.org

Review-Url: https://codereview.chromium.org/2346433002
Cr-Commit-Position: refs/heads/master@{#418781}

[modify] https://crrev.com/380aafbf57e5b6a162502065220e05beb391e287/ui/ozone/platform/caca/ozone_platform_caca.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb807b102e67eb2dfb2bc2318a5c913a021350b8

commit fb807b102e67eb2dfb2bc2318a5c913a021350b8
Author: tonikitoo <tonikitoo@igalia.com>
Date: Wed Feb 08 19:52:03 2017

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}

[modify] https://crrev.com/fb807b102e67eb2dfb2bc2318a5c913a021350b8/content/gpu/BUILD.gn
[modify] https://crrev.com/fb807b102e67eb2dfb2bc2318a5c913a021350b8/content/gpu/gpu_main.cc
[modify] https://crrev.com/fb807b102e67eb2dfb2bc2318a5c913a021350b8/services/ui/gpu/gpu_main.cc
[modify] https://crrev.com/fb807b102e67eb2dfb2bc2318a5c913a021350b8/ui/ozone/platform/x11/ozone_platform_x11.cc
[modify] https://crrev.com/fb807b102e67eb2dfb2bc2318a5c913a021350b8/ui/ozone/public/ozone_platform.cc
[modify] https://crrev.com/fb807b102e67eb2dfb2bc2318a5c913a021350b8/ui/ozone/public/ozone_platform.h

Sign in to add a comment