cogl/glx: Move onscreen code to a separate file
Mostly in order to untangle it from the rest, preparing turning it into a GObject. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1514>
This commit is contained in:
parent
2eea373241
commit
a057432e3d
@ -380,6 +380,8 @@ if have_glx
|
|||||||
cogl_sources += [
|
cogl_sources += [
|
||||||
'winsys/cogl-glx-display-private.h',
|
'winsys/cogl-glx-display-private.h',
|
||||||
'winsys/cogl-glx-renderer-private.h',
|
'winsys/cogl-glx-renderer-private.h',
|
||||||
|
'winsys/cogl-onscreen-glx.c',
|
||||||
|
'winsys/cogl-onscreen-glx.h',
|
||||||
'winsys/cogl-winsys-glx-feature-functions.h',
|
'winsys/cogl-winsys-glx-feature-functions.h',
|
||||||
'winsys/cogl-winsys-glx-private.h',
|
'winsys/cogl-winsys-glx-private.h',
|
||||||
'winsys/cogl-winsys-glx.c',
|
'winsys/cogl-winsys-glx.c',
|
||||||
|
1129
cogl/cogl/winsys/cogl-onscreen-glx.c
Normal file
1129
cogl/cogl/winsys/cogl-onscreen-glx.c
Normal file
File diff suppressed because it is too large
Load Diff
87
cogl/cogl/winsys/cogl-onscreen-glx.h
Normal file
87
cogl/cogl/winsys/cogl-onscreen-glx.h
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2007,2008,2009,2010,2011,2013 Intel Corporation.
|
||||||
|
* Copyright (C) 2020 Red Hat
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person
|
||||||
|
* obtaining a copy of this software and associated documentation
|
||||||
|
* files (the "Software"), to deal in the Software without
|
||||||
|
* restriction, including without limitation the rights to use, copy,
|
||||||
|
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
* of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* 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, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL 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 COGL_ONSCREEN_GLX_H
|
||||||
|
#define COGL_ONSCREEN_GLX_H
|
||||||
|
|
||||||
|
#include <GL/glx.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
|
#include "cogl-onscreen.h"
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
_cogl_winsys_onscreen_glx_init (CoglOnscreen *onscreen,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_winsys_onscreen_glx_deinit (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_winsys_onscreen_glx_bind (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
|
int
|
||||||
|
_cogl_winsys_onscreen_glx_get_buffer_age (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_winsys_onscreen_glx_swap_region (CoglOnscreen *onscreen,
|
||||||
|
const int *user_rectangles,
|
||||||
|
int n_rectangles,
|
||||||
|
CoglFrameInfo *info,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_winsys_onscreen_glx_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
||||||
|
const int *rectangles,
|
||||||
|
int n_rectangles,
|
||||||
|
CoglFrameInfo *info,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
_cogl_winsys_onscreen_glx_get_window_xid (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_winsys_onscreen_glx_set_visibility (CoglOnscreen *onscreen,
|
||||||
|
gboolean visibility);
|
||||||
|
|
||||||
|
void
|
||||||
|
_cogl_winsys_onscreen_glx_set_resizable (CoglOnscreen *onscreen,
|
||||||
|
gboolean resizable);
|
||||||
|
|
||||||
|
void
|
||||||
|
cogl_onscreen_glx_resize (CoglOnscreen *onscreen,
|
||||||
|
XConfigureEvent *configure_event);
|
||||||
|
|
||||||
|
void
|
||||||
|
cogl_onscreen_glx_update_output (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
|
void
|
||||||
|
cogl_onscreen_glx_notify_swap_buffers (CoglOnscreen *onscreen,
|
||||||
|
GLXBufferSwapComplete *swap_event);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
cogl_onscreen_glx_is_for_window (CoglOnscreen *onscreen,
|
||||||
|
Window window);
|
||||||
|
|
||||||
|
#endif /* COGL_ONSCREEN_GLX_H */
|
@ -34,4 +34,17 @@
|
|||||||
COGL_EXPORT const CoglWinsysVtable *
|
COGL_EXPORT const CoglWinsysVtable *
|
||||||
_cogl_winsys_glx_get_vtable (void);
|
_cogl_winsys_glx_get_vtable (void);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
cogl_display_glx_find_fbconfig (CoglDisplay *display,
|
||||||
|
const CoglFramebufferConfig *config,
|
||||||
|
GLXFBConfig *config_ret,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
|
void
|
||||||
|
cogl_context_glx_set_current_drawable (CoglContext *context,
|
||||||
|
GLXDrawable drawable);
|
||||||
|
|
||||||
|
GLXDrawable
|
||||||
|
cogl_context_glx_get_current_drawable (CoglContext *context);
|
||||||
|
|
||||||
#endif /* __COGL_WINSYS_GLX_PRIVATE_H */
|
#endif /* __COGL_WINSYS_GLX_PRIVATE_H */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -34,12 +34,17 @@
|
|||||||
#include "clutter/x11/clutter-x11.h"
|
#include "clutter/x11/clutter-x11.h"
|
||||||
#include "cogl/cogl-xlib.h"
|
#include "cogl/cogl-xlib.h"
|
||||||
#include "cogl/cogl.h"
|
#include "cogl/cogl.h"
|
||||||
#include "cogl/winsys/cogl-winsys-egl-x11-private.h"
|
|
||||||
#include "cogl/winsys/cogl-winsys-glx-private.h"
|
|
||||||
#include "core/boxes-private.h"
|
#include "core/boxes-private.h"
|
||||||
#include "meta/meta-backend.h"
|
#include "meta/meta-backend.h"
|
||||||
#include "meta/util.h"
|
#include "meta/util.h"
|
||||||
|
|
||||||
|
#ifdef COGL_HAS_EGL_SUPPORT
|
||||||
|
#include "cogl/winsys/cogl-winsys-egl-x11-private.h"
|
||||||
|
#endif
|
||||||
|
#ifdef COGL_HAS_GLX_SUPPORT
|
||||||
|
#include "cogl/winsys/cogl-winsys-glx-private.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaRendererX11, meta_renderer_x11, META_TYPE_RENDERER)
|
G_DEFINE_TYPE (MetaRendererX11, meta_renderer_x11, META_TYPE_RENDERER)
|
||||||
|
|
||||||
static const CoglWinsysVtable *
|
static const CoglWinsysVtable *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user