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

Unified Diff: ui/gl/gl_context_glx.cc

Issue 2206973002: Fix xcb crash when creating gl context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync firstly Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_glx.cc
diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
index e5793f4376ef18db5ff11b115858fd7b75f2363f..4be08f647d685a15702562c46a9d101c32dc967d 100644
--- a/ui/gl/gl_context_glx.cc
+++ b/ui/gl/gl_context_glx.cc
@@ -57,6 +57,8 @@ GLXContext CreateContextAttribs(Display* display,
// When creating a context with glXCreateContextAttribsARB, a variety of X11
// errors can be generated. To prevent these errors from crashing our process,
// we simply ignore them and only look if the GLXContext was created.
+ // Sync to ensure any errors generated are processed.
+ XSync(display, False);
auto old_error_handler = XSetErrorHandler(IgnoreX11Errors);
GLXContext context =
glXCreateContextAttribsARB(display, config, share, True, attribs.data());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698