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

Unified Diff: ui/ozone/platform/wayland/wayland_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
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..ffb0be525f964eadc2ec7b80aa133f056c66ef7a 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,9 @@ intptr_t GLOzoneEGLWayland::GetNativeDisplay() {
return reinterpret_cast<intptr_t>(connection_->display());
}
-bool GLOzoneEGLWayland::LoadGLES2Bindings() {
+bool GLOzoneEGLWayland::LoadGLES2Bindings(gl::GLImplementation impl) {
setenv("EGL_PLATFORM", "wayland", 0);
rjkroege 2017/06/12 17:23:40 I suspect that the setenv should be skipped if we'
tonikitoo 2017/06/12 18:32:17 I believe the comment pasted below is relevant (so
sadrul 2017/06/12 19:37:00 Sounds like the safest option is to always set the
- return LoadDefaultEGLGLES2Bindings();
+ return LoadDefaultEGLGLES2Bindings(impl);
}
} // namespace
@@ -204,8 +204,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;
}

Powered by Google App Engine
This is Rietveld 408576698