| Index: ui/ozone/platform/wayland/wayland_surface_factory.cc
|
| diff --git a/ui/ozone/platform/wayland/wayland_surface_factory.cc b/ui/ozone/platform/wayland/wayland_surface_factory.cc
|
| index 1adb2d74ace82e1fb032f9cad885e444fd3a292f..e84c7bdc1037f7bf6709cef2a46738de12a437fa 100644
|
| --- a/ui/ozone/platform/wayland/wayland_surface_factory.cc
|
| +++ b/ui/ozone/platform/wayland/wayland_surface_factory.cc
|
| @@ -141,7 +141,7 @@ class GLOzoneEGLWayland : public GLOzoneEGL {
|
|
|
| protected:
|
| intptr_t GetNativeDisplay() override;
|
| - bool LoadGLES2Bindings() override;
|
| + bool LoadGLES2Bindings(gl::GLImplementation impl) override;
|
|
|
| private:
|
| WaylandConnection* connection_;
|
| @@ -176,9 +176,11 @@ intptr_t GLOzoneEGLWayland::GetNativeDisplay() {
|
| return reinterpret_cast<intptr_t>(connection_->display());
|
| }
|
|
|
| -bool GLOzoneEGLWayland::LoadGLES2Bindings() {
|
| +bool GLOzoneEGLWayland::LoadGLES2Bindings(gl::GLImplementation impl) {
|
| + // TODO: It may not be necessary to set this environment variable when using
|
| + // swiftshader.
|
| setenv("EGL_PLATFORM", "wayland", 0);
|
| - return LoadDefaultEGLGLES2Bindings();
|
| + return LoadDefaultEGLGLES2Bindings(impl);
|
| }
|
|
|
| } // namespace
|
| @@ -204,8 +206,10 @@ WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) {
|
| std::vector<gl::GLImplementation>
|
| WaylandSurfaceFactory::GetAllowedGLImplementations() {
|
| std::vector<gl::GLImplementation> impls;
|
| - if (egl_implementation_)
|
| + if (egl_implementation_) {
|
| impls.push_back(gl::kGLImplementationEGLGLES2);
|
| + impls.push_back(gl::kGLImplementationSwiftShaderGL);
|
| + }
|
| impls.push_back(gl::kGLImplementationOSMesaGL);
|
| return impls;
|
| }
|
|
|