Chromium Code Reviews| Index: ui/base/x/x11_util.cc |
| diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc |
| index b2b5ef4b82ac39f9abdd21520b7526864eccaf99..5f3e3e135307b724045edff26eb4ace33f89c943 100644 |
| --- a/ui/base/x/x11_util.cc |
| +++ b/ui/base/x/x11_util.cc |
| @@ -300,6 +300,22 @@ SharedMemorySupport QuerySharedMemorySupport(XDisplay* dpy) { |
| return shared_memory_support; |
| } |
| +bool QueryRenderSupport(Display* dpy) { |
| + static bool render_supported = false; |
| + static bool render_supported_cached = false; |
| + |
| + if (render_supported_cached) |
| + return render_supported; |
| + |
| + // We don't care about the version of Xrender since all the features which |
| + // we use are included in every version. |
| + int dummy; |
| + render_supported = XRenderQueryExtension(dpy, &dummy, &dummy); |
|
sadrul
2014/05/02 01:35:45
I think you can use a single static bool. See IsSh
|
| + render_supported_cached = true; |
| + |
| + return render_supported; |
| +} |
| + |
| ::Cursor GetXCursor(int cursor_shape) { |
| if (!cursor_cache) |
| cursor_cache = new XCursorCache; |