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

Unified Diff: ui/ozone/platform/x11/x11_surface_factory.cc

Issue 2926423002: ozone: Allow using swiftshader with --use-gl=swiftshader. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/wayland/wayland_surface_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/x11/x11_surface_factory.cc
diff --git a/ui/ozone/platform/x11/x11_surface_factory.cc b/ui/ozone/platform/x11/x11_surface_factory.cc
index b06ecb3c1f9a1bcb9d7fc3822e2d44190eb84793..e5cedcb5dc37e7b015475a439423b2c245889dbd 100644
--- a/ui/ozone/platform/x11/x11_surface_factory.cc
+++ b/ui/ozone/platform/x11/x11_surface_factory.cc
@@ -143,7 +143,9 @@ class GLOzoneEGLX11 : public GLOzoneEGL {
return reinterpret_cast<intptr_t>(gfx::GetXDisplay());
}
- bool LoadGLES2Bindings() override { return LoadDefaultEGLGLES2Bindings(); }
+ bool LoadGLES2Bindings(gl::GLImplementation implementation) override {
+ return LoadDefaultEGLGLES2Bindings(implementation);
+ }
private:
DISALLOW_COPY_AND_ASSIGN(GLOzoneEGLX11);
@@ -161,9 +163,9 @@ X11SurfaceFactory::~X11SurfaceFactory() {}
std::vector<gl::GLImplementation>
X11SurfaceFactory::GetAllowedGLImplementations() {
// DesktopGL (GLX) should be the first option when crbug.com/646982 is fixed.
- return std::vector<gl::GLImplementation>{gl::kGLImplementationEGLGLES2,
- gl::kGLImplementationDesktopGL,
- gl::kGLImplementationOSMesaGL};
+ return std::vector<gl::GLImplementation>{
+ gl::kGLImplementationEGLGLES2, gl::kGLImplementationDesktopGL,
+ gl::kGLImplementationOSMesaGL, gl::kGLImplementationSwiftShaderGL};
}
GLOzone* X11SurfaceFactory::GetGLOzone(gl::GLImplementation implementation) {
@@ -171,6 +173,7 @@ GLOzone* X11SurfaceFactory::GetGLOzone(gl::GLImplementation implementation) {
case gl::kGLImplementationDesktopGL:
return glx_implementation_.get();
case gl::kGLImplementationEGLGLES2:
+ case gl::kGLImplementationSwiftShaderGL:
return egl_implementation_.get();
case gl::kGLImplementationOSMesaGL:
return osmesa_implementation_.get();
« no previous file with comments | « ui/ozone/platform/wayland/wayland_surface_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698