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

Unified Diff: ui/gl/gl_surface_x11.cc

Issue 196403008: gl: Move platform-specific EGL code into separate files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« ui/gl/gl_surface_ozone.cc ('K') | « ui/gl/gl_surface_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_x11.cc
diff --git a/ui/gl/gl_surface_x11.cc b/ui/gl/gl_surface_x11.cc
index 74ad999e2b2f5b1e8997e4e8537df79f1e989938..113792fb33a583596416876c8802eb071f828412 100644
--- a/ui/gl/gl_surface_x11.cc
+++ b/ui/gl/gl_surface_x11.cc
@@ -19,6 +19,14 @@
namespace gfx {
+namespace {
+
+EGLNativeDisplayType GetEGLDisplay() {
+ return base::MessagePumpForUI::GetDefaultXDisplay();
+}
+
+} // namesapce
+
// This OSMesa GL surface can use XLib to swap the contents of the buffer to a
// view.
class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa {
@@ -64,7 +72,7 @@ bool GLSurface::InitializeOneOffInternal() {
}
break;
case kGLImplementationEGLGLES2:
- if (!GLSurfaceEGL::InitializeOneOff()) {
+ if (!GLSurfaceEGL::InitializeOneOff(GetEGLDisplay())) {
LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
return false;
}
« ui/gl/gl_surface_ozone.cc ('K') | « ui/gl/gl_surface_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698