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

Unified Diff: chrome/common/x11_util.cc

Issue 28192: Linux: fix XRENDER support for NX (Closed)
Patch Set: Created 11 years, 10 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: chrome/common/x11_util.cc
diff --git a/chrome/common/x11_util.cc b/chrome/common/x11_util.cc
index ec54f7b07e36384e2bee07d65c3a425e59c95e0a..264ab9c696495f0acb7937bff4c62002c13ccc97 100644
--- a/chrome/common/x11_util.cc
+++ b/chrome/common/x11_util.cc
@@ -134,8 +134,13 @@ XRenderPictFormat* GetRenderARGB32Format(Display* dpy) {
PictFormatAlphaMask;
pictformat = XRenderFindFormat(dpy, kMask, &templ, 0 /* first result */);
- CHECK(pictformat) << "XRENDER doesn't not support a Skia compatable format";
- // TODO(agl): fallback to a picture format with an alpha channel
+
+ if (!pictformat) {
+ // Not all X servers support xRGB32 formats. However, the XRENDER spec says
+ // that they must support an ARGB32 format, so we can always return that.
+ pictformat = XRenderFindStandardFormat(dpy, PictStandardARGB32);
+ CHECK(pictformat) << "XRENDER ARGB32 not supported.";
+ }
return pictformat;
}
« 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