OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_COMMON_X11_UTIL_INTERNAL_H_ |
| 6 #define CHROME_COMMON_X11_UTIL_INTERNAL_H_ |
| 7 |
| 8 // This file declares utility functions for X11 (Linux only). |
| 9 // |
| 10 // These functions require the inclusion of the Xlib headers. Since the Xlib |
| 11 // headers pollute so much of the namespace, this should only be included |
| 12 // when needed. |
| 13 |
| 14 extern "C" { |
| 15 #include <X11/Xlib.h> |
| 16 #include <X11/extensions/XShm.h> |
| 17 #include <X11/extensions/Xrender.h> |
| 18 } |
| 19 |
| 20 namespace x11_util { |
| 21 // These functions cache their results and must be called from the UI thread. |
| 22 // Currently they don't support multiple screens/displays. |
| 23 |
| 24 // Get the XRENDER format id for ARGB32 (Skia's format). |
| 25 XRenderPictFormat* GetRenderARGB32Format(Display* dpy); |
| 26 // Get the XRENDER format id for the default visual on the first screen. This |
| 27 // is the format which our GTK window will have. |
| 28 XRenderPictFormat* GetRenderVisualFormat(Display* dpy, Visual* visual); |
| 29 }; |
| 30 |
| 31 #endif // CHROME_COMMON_X11_UTIL_H_ |
OLD | NEW |