Merge remote branch 'origin/7.8'
[mesa.git] / src / gallium / state_trackers / egl / x11 / x11_screen.h
index 5432858ac3ea2e85d40a1789cb7c61cc7172f104..a3c5ee1491e31ac128afb85f3ae050642ce141f4 100644 (file)
  * The above copyright notice and this permission notice shall be included
  * in all copies or substantial portions of the Software.
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef _X11_SCREEN_H_
@@ -28,6 +29,8 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/extensions/dri2tokens.h>
+#include "GL/gl.h" /* for GL types needed by __GLcontextModes */
+#include "GL/internal/glcore.h"  /* for __GLcontextModes */
 #include "pipe/p_compiler.h"
 #include "common/native.h"
 
@@ -48,6 +51,10 @@ struct x11_drawable_buffer {
 
 struct x11_screen;
 
+typedef void (*x11_drawable_invalidate_buffers)(struct x11_screen *xscr,
+                                                Drawable drawable,
+                                                void *user_data);
+
 struct x11_screen *
 x11_screen_create(Display *dpy, int screen);
 
@@ -60,10 +67,6 @@ x11_screen_support(struct x11_screen *xscr, enum x11_screen_extension ext);
 const XVisualInfo *
 x11_screen_get_visuals(struct x11_screen *xscr, int *num_visuals);
 
-void
-x11_screen_convert_visual(struct x11_screen *xscr, const XVisualInfo *visual,
-                          __GLcontextModes *mode);
-
 const __GLcontextModes *
 x11_screen_get_glx_configs(struct x11_screen *xscr);
 
@@ -71,10 +74,12 @@ const __GLcontextModes *
 x11_screen_get_glx_visuals(struct x11_screen *xscr);
 
 const char *
-x11_screen_probe_dri2(struct x11_screen *xscr);
+x11_screen_probe_dri2(struct x11_screen *xscr, int *major, int *minor);
 
 int
-x11_screen_enable_dri2(struct x11_screen *xscr, const char *driver);
+x11_screen_enable_dri2(struct x11_screen *xscr,
+                       x11_drawable_invalidate_buffers invalidate_buffers,
+                       void *user_data);
 
 __GLcontextModes *
 x11_context_modes_create(unsigned count);