cogl/onscreen: Change to follow mutters naming convention

The mutter naming convention for types and their instance variables is:

Type name:
   [Namespace][BaseName][SubType]

Instance name:

   [base_name]_[sub_type]

This means that e.g. CoglOnscreenGLX is renamed CoglOnscreenGlx, and
glx_onscreen is renamed onscreen_glx. This is in preparation for
GObjectification.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1514>
This commit is contained in:
Jonas Ådahl 2020-10-17 18:50:59 +02:00 committed by Robert Mader
parent 8339c064c8
commit b5afa6db23
6 changed files with 193 additions and 193 deletions

View File

@ -32,24 +32,24 @@
#include "cogl-trace.h"
#include "winsys/cogl-winsys-egl-private.h"
typedef struct _CoglOnscreenEGL
typedef struct _CoglOnscreenEgl
{
EGLSurface egl_surface;
/* Platform specific data */
void *platform;
} CoglOnscreenEGL;
} CoglOnscreenEgl;
CoglOnscreenEGL *
CoglOnscreenEgl *
cogl_onscreen_egl_new (void)
{
return g_slice_new0 (CoglOnscreenEGL);
return g_slice_new0 (CoglOnscreenEgl);
}
void
cogl_onscreen_egl_free (CoglOnscreenEGL *onscreen_egl)
cogl_onscreen_egl_free (CoglOnscreenEgl *onscreen_egl)
{
g_slice_free (CoglOnscreenEGL, onscreen_egl);
g_slice_free (CoglOnscreenEgl, onscreen_egl);
}
gboolean
@ -67,7 +67,7 @@ _cogl_winsys_onscreen_egl_init (CoglOnscreen *onscreen,
EGLConfig egl_config;
EGLint config_count = 0;
EGLBoolean status;
CoglOnscreenEGL *winsys;
CoglOnscreenEgl *winsys;
g_return_val_if_fail (egl_display->egl_context, FALSE);
@ -98,7 +98,7 @@ _cogl_winsys_onscreen_egl_init (CoglOnscreen *onscreen,
cogl_framebuffer_update_samples_per_pixel (framebuffer, samples);
}
winsys = g_slice_new0 (CoglOnscreenEGL);
winsys = g_slice_new0 (CoglOnscreenEgl);
cogl_onscreen_set_winsys (onscreen, winsys);
if (egl_renderer->platform_vtable->onscreen_init &&
@ -106,7 +106,7 @@ _cogl_winsys_onscreen_egl_init (CoglOnscreen *onscreen,
egl_config,
error))
{
g_slice_free (CoglOnscreenEGL, winsys);
g_slice_free (CoglOnscreenEgl, winsys);
return FALSE;
}
@ -121,13 +121,13 @@ _cogl_winsys_onscreen_egl_deinit (CoglOnscreen *onscreen)
CoglDisplayEGL *egl_display = context->display->winsys;
CoglRenderer *renderer = context->display->renderer;
CoglRendererEGL *egl_renderer = renderer->winsys;
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
/* If we never successfully allocated then there's nothing to do */
if (egl_onscreen == NULL)
if (onscreen_egl == NULL)
return;
if (egl_onscreen->egl_surface != EGL_NO_SURFACE)
if (onscreen_egl->egl_surface != EGL_NO_SURFACE)
{
/* Cogl always needs a valid context bound to something so if we
* are destroying the onscreen that is currently bound we'll
@ -135,8 +135,8 @@ _cogl_winsys_onscreen_egl_deinit (CoglOnscreen *onscreen)
if ((egl_display->dummy_surface != EGL_NO_SURFACE ||
(egl_renderer->private_features &
COGL_EGL_WINSYS_FEATURE_SURFACELESS_CONTEXT) != 0) &&
(egl_display->current_draw_surface == egl_onscreen->egl_surface ||
egl_display->current_read_surface == egl_onscreen->egl_surface))
(egl_display->current_draw_surface == onscreen_egl->egl_surface ||
egl_display->current_read_surface == onscreen_egl->egl_surface))
{
_cogl_winsys_egl_make_current (context->display,
egl_display->dummy_surface,
@ -144,16 +144,16 @@ _cogl_winsys_onscreen_egl_deinit (CoglOnscreen *onscreen)
egl_display->current_context);
}
if (eglDestroySurface (egl_renderer->edpy, egl_onscreen->egl_surface)
if (eglDestroySurface (egl_renderer->edpy, onscreen_egl->egl_surface)
== EGL_FALSE)
g_warning ("Failed to destroy EGL surface");
egl_onscreen->egl_surface = EGL_NO_SURFACE;
onscreen_egl->egl_surface = EGL_NO_SURFACE;
}
if (egl_renderer->platform_vtable->onscreen_deinit)
egl_renderer->platform_vtable->onscreen_deinit (onscreen);
g_slice_free (CoglOnscreenEGL, cogl_onscreen_get_winsys (onscreen));
g_slice_free (CoglOnscreenEgl, cogl_onscreen_get_winsys (onscreen));
cogl_onscreen_set_winsys (onscreen, NULL);
}
@ -163,11 +163,11 @@ bind_onscreen_with_context (CoglOnscreen *onscreen,
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
gboolean status = _cogl_winsys_egl_make_current (context->display,
egl_onscreen->egl_surface,
egl_onscreen->egl_surface,
onscreen_egl->egl_surface,
onscreen_egl->egl_surface,
egl_context);
if (status)
{
@ -207,9 +207,9 @@ _cogl_winsys_onscreen_egl_get_buffer_age (CoglOnscreen *onscreen)
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglRenderer *renderer = context->display->renderer;
CoglRendererEGL *egl_renderer = renderer->winsys;
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglDisplayEGL *egl_display = context->display->winsys;
EGLSurface surface = egl_onscreen->egl_surface;
EGLSurface surface = onscreen_egl->egl_surface;
static gboolean warned = FALSE;
int age = 0;
@ -246,7 +246,7 @@ _cogl_winsys_onscreen_egl_swap_region (CoglOnscreen *onscreen,
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglRenderer *renderer = context->display->renderer;
CoglRendererEGL *egl_renderer = renderer->winsys;
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
int framebuffer_height = cogl_framebuffer_get_height (framebuffer);
int *rectangles = g_alloca (sizeof (int) * n_rectangles * 4);
int i;
@ -270,7 +270,7 @@ _cogl_winsys_onscreen_egl_swap_region (CoglOnscreen *onscreen,
COGL_FRAMEBUFFER_STATE_BIND);
if (egl_renderer->pf_eglSwapBuffersRegion (egl_renderer->edpy,
egl_onscreen->egl_surface,
onscreen_egl->egl_surface,
n_rectangles,
rectangles) == EGL_FALSE)
g_warning ("Error reported by eglSwapBuffersRegion");
@ -287,7 +287,7 @@ _cogl_winsys_onscreen_egl_swap_buffers_with_damage (CoglOnscreen *onscreen,
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglRenderer *renderer = context->display->renderer;
CoglRendererEGL *egl_renderer = renderer->winsys;
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
COGL_TRACE_BEGIN_SCOPED (CoglOnscreenEGLSwapBuffersWithDamage,
"Onscreen (eglSwapBuffers)");
@ -319,37 +319,37 @@ _cogl_winsys_onscreen_egl_swap_buffers_with_damage (CoglOnscreen *onscreen,
}
if (egl_renderer->pf_eglSwapBuffersWithDamage (egl_renderer->edpy,
egl_onscreen->egl_surface,
onscreen_egl->egl_surface,
flipped,
n_rectangles) == EGL_FALSE)
g_warning ("Error reported by eglSwapBuffersWithDamage");
}
else
eglSwapBuffers (egl_renderer->edpy, egl_onscreen->egl_surface);
eglSwapBuffers (egl_renderer->edpy, onscreen_egl->egl_surface);
}
void
cogl_onscreen_egl_set_platform (CoglOnscreenEGL *onscreen_egl,
cogl_onscreen_egl_set_platform (CoglOnscreenEgl *onscreen_egl,
gpointer platform)
{
onscreen_egl->platform = platform;
}
gpointer
cogl_onscreen_egl_get_platform (CoglOnscreenEGL *onscreen_egl)
cogl_onscreen_egl_get_platform (CoglOnscreenEgl *onscreen_egl)
{
return onscreen_egl->platform;
}
void
cogl_onscreen_egl_set_egl_surface (CoglOnscreenEGL *onscreen_egl,
cogl_onscreen_egl_set_egl_surface (CoglOnscreenEgl *onscreen_egl,
EGLSurface egl_surface)
{
onscreen_egl->egl_surface = egl_surface;
}
EGLSurface
cogl_onscreen_egl_get_egl_surface (CoglOnscreenEGL *onscreen_egl)
cogl_onscreen_egl_get_egl_surface (CoglOnscreenEgl *onscreen_egl)
{
return onscreen_egl->egl_surface;
}

View File

@ -29,13 +29,13 @@
#include "cogl-onscreen.h"
#include "winsys/cogl-winsys-egl-private.h"
typedef struct _CoglOnscreenEGL CoglOnscreenEGL;
typedef struct _CoglOnscreenEgl CoglOnscreenEgl;
COGL_EXPORT CoglOnscreenEGL *
COGL_EXPORT CoglOnscreenEgl *
cogl_onscreen_egl_new (void);
COGL_EXPORT void
cogl_onscreen_egl_free (CoglOnscreenEGL *onscreen_egl);
cogl_onscreen_egl_free (CoglOnscreenEgl *onscreen_egl);
gboolean
_cogl_winsys_onscreen_egl_init (CoglOnscreen *onscreen,
@ -65,17 +65,17 @@ _cogl_winsys_onscreen_egl_swap_buffers_with_damage (CoglOnscreen *onscreen,
gpointer user_data);
COGL_EXPORT void
cogl_onscreen_egl_set_platform (CoglOnscreenEGL *onscreen_egl,
cogl_onscreen_egl_set_platform (CoglOnscreenEgl *onscreen_egl,
gpointer platform);
COGL_EXPORT gpointer
cogl_onscreen_egl_get_platform (CoglOnscreenEGL *onscreen_egl);
cogl_onscreen_egl_get_platform (CoglOnscreenEgl *onscreen_egl);
COGL_EXPORT void
cogl_onscreen_egl_set_egl_surface (CoglOnscreenEGL *onscreen_egl,
cogl_onscreen_egl_set_egl_surface (CoglOnscreenEgl *onscreen_egl,
EGLSurface egl_surface);
COGL_EXPORT EGLSurface
cogl_onscreen_egl_get_egl_surface (CoglOnscreenEGL *onscreen_egl);
cogl_onscreen_egl_get_egl_surface (CoglOnscreenEgl *onscreen_egl);
#endif /* COGL_ONSCREEN_EGL_H */

View File

@ -38,7 +38,7 @@
#include "winsys/cogl-glx-renderer-private.h"
#include "winsys/cogl-winsys-glx-private.h"
typedef struct _CoglOnscreenGLX
typedef struct _CoglOnscreenGlx
{
Window xwin;
int x, y;
@ -49,7 +49,7 @@ typedef struct _CoglOnscreenGLX
uint32_t pending_sync_notify;
uint32_t pending_complete_notify;
uint32_t pending_resize_notify;
} CoglOnscreenGLX;
} CoglOnscreenGlx;
#define COGL_ONSCREEN_X11_EVENT_MASK (StructureNotifyMask | ExposureMask)
@ -65,11 +65,11 @@ _cogl_winsys_onscreen_glx_init (CoglOnscreen *onscreen,
_cogl_xlib_renderer_get_data (display->renderer);
CoglGLXRenderer *glx_renderer = display->renderer->winsys;
Window xwin;
CoglOnscreenGLX *glx_onscreen;
CoglOnscreenGlx *onscreen_glx;
const CoglFramebufferConfig *config;
GLXFBConfig fbconfig;
GError *fbconfig_error = NULL;
CoglOnscreenGLX *winsys;
CoglOnscreenGlx *winsys;
g_return_val_if_fail (glx_display->glx_context, FALSE);
@ -168,21 +168,21 @@ _cogl_winsys_onscreen_glx_init (CoglOnscreen *onscreen,
}
}
winsys = g_slice_new0 (CoglOnscreenGLX);
winsys = g_slice_new0 (CoglOnscreenGlx);
cogl_onscreen_set_winsys (onscreen, winsys);
glx_onscreen = cogl_onscreen_get_winsys (onscreen);
onscreen_glx = cogl_onscreen_get_winsys (onscreen);
glx_onscreen->xwin = xwin;
onscreen_glx->xwin = xwin;
/* Try and create a GLXWindow to use with extensions dependent on
* GLX versions >= 1.3 that don't accept regular X Windows as GLX
* drawables. */
if (glx_renderer->glx_major == 1 && glx_renderer->glx_minor >= 3)
{
glx_onscreen->glxwin =
onscreen_glx->glxwin =
glx_renderer->glXCreateWindow (xlib_renderer->xdpy,
fbconfig,
glx_onscreen->xwin,
onscreen_glx->xwin,
NULL);
}
@ -190,7 +190,7 @@ _cogl_winsys_onscreen_glx_init (CoglOnscreen *onscreen,
if (_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
{
GLXDrawable drawable =
glx_onscreen->glxwin ? glx_onscreen->glxwin : glx_onscreen->xwin;
onscreen_glx->glxwin ? onscreen_glx->glxwin : onscreen_glx->xwin;
/* similarly to above, we unconditionally select this event
* because we rely on it to advance the master clock, and
@ -215,19 +215,19 @@ _cogl_winsys_onscreen_glx_deinit (CoglOnscreen *onscreen)
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglXlibTrapState old_state;
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
GLXDrawable drawable;
/* If we never successfully allocated then there's nothing to do */
if (glx_onscreen == NULL)
if (onscreen_glx == NULL)
return;
cogl_clear_object (&glx_onscreen->output);
cogl_clear_object (&onscreen_glx->output);
_cogl_xlib_renderer_trap_errors (context->display->renderer, &old_state);
drawable =
glx_onscreen->glxwin == None ? glx_onscreen->xwin : glx_onscreen->glxwin;
onscreen_glx->glxwin == None ? onscreen_glx->xwin : onscreen_glx->glxwin;
/* Cogl always needs a valid context bound to something so if we are
* destroying the onscreen that is currently bound we'll switch back
@ -248,28 +248,28 @@ _cogl_winsys_onscreen_glx_deinit (CoglOnscreen *onscreen)
cogl_context_glx_set_current_drawable (context, dummy_drawable);
}
if (glx_onscreen->glxwin != None)
if (onscreen_glx->glxwin != None)
{
glx_renderer->glXDestroyWindow (xlib_renderer->xdpy,
glx_onscreen->glxwin);
glx_onscreen->glxwin = None;
onscreen_glx->glxwin);
onscreen_glx->glxwin = None;
}
if (glx_onscreen->xwin != None)
if (onscreen_glx->xwin != None)
{
XDestroyWindow (xlib_renderer->xdpy, glx_onscreen->xwin);
glx_onscreen->xwin = None;
XDestroyWindow (xlib_renderer->xdpy, onscreen_glx->xwin);
onscreen_glx->xwin = None;
}
else
{
glx_onscreen->xwin = None;
onscreen_glx->xwin = None;
}
XSync (xlib_renderer->xdpy, False);
_cogl_xlib_renderer_untrap_errors (context->display->renderer, &old_state);
g_slice_free (CoglOnscreenGLX, cogl_onscreen_get_winsys (onscreen));
g_slice_free (CoglOnscreenGlx, cogl_onscreen_get_winsys (onscreen));
cogl_onscreen_set_winsys (onscreen, NULL);
}
@ -282,12 +282,12 @@ _cogl_winsys_onscreen_glx_bind (CoglOnscreen *onscreen)
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
CoglXlibTrapState old_state;
GLXDrawable drawable;
drawable =
glx_onscreen->glxwin ? glx_onscreen->glxwin : glx_onscreen->xwin;
onscreen_glx->glxwin ? onscreen_glx->glxwin : onscreen_glx->xwin;
if (cogl_context_glx_get_current_drawable (context) == drawable)
return;
@ -469,8 +469,8 @@ _cogl_winsys_wait_for_vblank (CoglOnscreen *onscreen)
if (glx_renderer->glXWaitForMsc)
{
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
Drawable drawable = glx_onscreen->glxwin;
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
Drawable drawable = onscreen_glx->glxwin;
int64_t ust;
int64_t msc;
int64_t sbc;
@ -520,14 +520,14 @@ _cogl_winsys_onscreen_glx_get_buffer_age (CoglOnscreen *onscreen)
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglXlibRenderer *xlib_renderer = _cogl_xlib_renderer_get_data (context->display->renderer);
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
GLXDrawable drawable;
unsigned int age;
if (!_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE))
return 0;
drawable = glx_onscreen->glxwin ? glx_onscreen->glxwin : glx_onscreen->xwin;
drawable = onscreen_glx->glxwin ? onscreen_glx->glxwin : onscreen_glx->xwin;
glx_renderer->glXQueryDrawable (xlib_renderer->xdpy, drawable, GLX_BACK_BUFFER_AGE_EXT, &age);
return age;
@ -550,35 +550,35 @@ set_frame_info_output (CoglOnscreen *onscreen,
static void
cogl_onscreen_glx_flush_notification (CoglOnscreen *onscreen)
{
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
while (glx_onscreen->pending_sync_notify > 0 ||
glx_onscreen->pending_complete_notify > 0 ||
glx_onscreen->pending_resize_notify > 0)
while (onscreen_glx->pending_sync_notify > 0 ||
onscreen_glx->pending_complete_notify > 0 ||
onscreen_glx->pending_resize_notify > 0)
{
if (glx_onscreen->pending_sync_notify > 0)
if (onscreen_glx->pending_sync_notify > 0)
{
CoglFrameInfo *info;
info = cogl_onscreen_peek_head_frame_info (onscreen);
_cogl_onscreen_notify_frame_sync (onscreen, info);
glx_onscreen->pending_sync_notify--;
onscreen_glx->pending_sync_notify--;
}
if (glx_onscreen->pending_complete_notify > 0)
if (onscreen_glx->pending_complete_notify > 0)
{
CoglFrameInfo *info;
info = cogl_onscreen_pop_head_frame_info (onscreen);
_cogl_onscreen_notify_complete (onscreen, info);
cogl_object_unref (info);
glx_onscreen->pending_complete_notify--;
onscreen_glx->pending_complete_notify--;
}
if (glx_onscreen->pending_resize_notify > 0)
if (onscreen_glx->pending_resize_notify > 0)
{
_cogl_onscreen_notify_resize (onscreen);
glx_onscreen->pending_resize_notify--;
onscreen_glx->pending_resize_notify--;
}
}
}
@ -617,7 +617,7 @@ flush_pending_notifications_idle (void *user_data)
static void
set_sync_pending (CoglOnscreen *onscreen)
{
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglRenderer *renderer = context->display->renderer;
@ -635,13 +635,13 @@ set_sync_pending (CoglOnscreen *onscreen)
NULL);
}
glx_onscreen->pending_sync_notify++;
onscreen_glx->pending_sync_notify++;
}
static void
set_complete_pending (CoglOnscreen *onscreen)
{
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglRenderer *renderer = context->display->renderer;
@ -659,7 +659,7 @@ set_complete_pending (CoglOnscreen *onscreen)
NULL);
}
glx_onscreen->pending_complete_notify++;
onscreen_glx->pending_complete_notify++;
}
void
@ -675,7 +675,7 @@ _cogl_winsys_onscreen_glx_swap_region (CoglOnscreen *onscreen,
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglGLXDisplay *glx_display = context->display->winsys;
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
uint32_t end_frame_vsync_counter = 0;
gboolean have_counter;
gboolean can_wait;
@ -774,7 +774,7 @@ _cogl_winsys_onscreen_glx_swap_region (CoglOnscreen *onscreen,
* be a bit smarter about how we throttle blits by avoiding
* any waits if we can see that the video sync count has
* already progressed. */
if (glx_onscreen->last_swap_vsync_counter == end_frame_vsync_counter)
if (onscreen_glx->last_swap_vsync_counter == end_frame_vsync_counter)
_cogl_winsys_wait_for_vblank (onscreen);
}
else if (can_wait)
@ -786,7 +786,7 @@ _cogl_winsys_onscreen_glx_swap_region (CoglOnscreen *onscreen,
GLXDrawable drawable;
drawable =
glx_onscreen->glxwin ? glx_onscreen->glxwin : glx_onscreen->xwin;
onscreen_glx->glxwin ? onscreen_glx->glxwin : onscreen_glx->xwin;
int i;
for (i = 0; i < n_rectangles; i++)
{
@ -839,7 +839,7 @@ _cogl_winsys_onscreen_glx_swap_region (CoglOnscreen *onscreen,
* the varying costs of different swap methods.
*/
if (have_counter)
glx_onscreen->last_swap_vsync_counter = end_frame_vsync_counter;
onscreen_glx->last_swap_vsync_counter = end_frame_vsync_counter;
{
CoglOutput *output;
@ -851,8 +851,8 @@ _cogl_winsys_onscreen_glx_swap_region (CoglOnscreen *onscreen,
output =
_cogl_xlib_renderer_output_for_rectangle (context->display->renderer,
glx_onscreen->x + x_min,
glx_onscreen->y + y_min,
onscreen_glx->x + x_min,
onscreen_glx->y + y_min,
x_max - x_min,
y_max - y_min);
@ -884,7 +884,7 @@ _cogl_winsys_onscreen_glx_swap_buffers_with_damage (CoglOnscreen *onscreen,
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglGLXDisplay *glx_display = context->display->winsys;
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
gboolean have_counter;
GLXDrawable drawable;
@ -896,7 +896,7 @@ _cogl_winsys_onscreen_glx_swap_buffers_with_damage (CoglOnscreen *onscreen,
framebuffer,
COGL_FRAMEBUFFER_STATE_BIND);
drawable = glx_onscreen->glxwin ? glx_onscreen->glxwin : glx_onscreen->xwin;
drawable = onscreen_glx->glxwin ? onscreen_glx->glxwin : onscreen_glx->xwin;
have_counter = glx_display->have_vblank_counter;
@ -932,7 +932,7 @@ _cogl_winsys_onscreen_glx_swap_buffers_with_damage (CoglOnscreen *onscreen,
if (have_counter && can_wait)
{
if (glx_onscreen->last_swap_vsync_counter ==
if (onscreen_glx->last_swap_vsync_counter ==
end_frame_vsync_counter)
_cogl_winsys_wait_for_vblank (onscreen);
}
@ -943,18 +943,18 @@ _cogl_winsys_onscreen_glx_swap_buffers_with_damage (CoglOnscreen *onscreen,
glx_renderer->glXSwapBuffers (xlib_renderer->xdpy, drawable);
if (have_counter)
glx_onscreen->last_swap_vsync_counter =
onscreen_glx->last_swap_vsync_counter =
_cogl_winsys_get_vsync_counter (context);
set_frame_info_output (onscreen, glx_onscreen->output);
set_frame_info_output (onscreen, onscreen_glx->output);
}
uint32_t
_cogl_winsys_onscreen_glx_get_window_xid (CoglOnscreen *onscreen)
{
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
return glx_onscreen->xwin;
return onscreen_glx->xwin;
}
void
@ -965,12 +965,12 @@ _cogl_winsys_onscreen_glx_set_visibility (CoglOnscreen *onscreen,
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
if (visibility)
XMapWindow (xlib_renderer->xdpy, glx_onscreen->xwin);
XMapWindow (xlib_renderer->xdpy, onscreen_glx->xwin);
else
XUnmapWindow (xlib_renderer->xdpy, glx_onscreen->xwin);
XUnmapWindow (xlib_renderer->xdpy, onscreen_glx->xwin);
}
void
@ -981,7 +981,7 @@ _cogl_winsys_onscreen_glx_set_resizable (CoglOnscreen *onscreen,
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
XSizeHints *size_hints = XAllocSizeHints ();
@ -1006,7 +1006,7 @@ _cogl_winsys_onscreen_glx_set_resizable (CoglOnscreen *onscreen,
size_hints->max_height = height;
}
XSetWMNormalHints (xlib_renderer->xdpy, glx_onscreen->xwin, size_hints);
XSetWMNormalHints (xlib_renderer->xdpy, onscreen_glx->xwin, size_hints);
XFree (size_hints);
}
@ -1015,9 +1015,9 @@ void
cogl_onscreen_glx_notify_swap_buffers (CoglOnscreen *onscreen,
GLXBufferSwapComplete *swap_event)
{
CoglOnscreenGLX *glx_onscreen;
CoglOnscreenGlx *onscreen_glx;
glx_onscreen = cogl_onscreen_get_winsys (onscreen);
onscreen_glx = cogl_onscreen_get_winsys (onscreen);
/* We only want to notify that the swap is complete when the
application calls cogl_context_dispatch so instead of immediately
@ -1033,7 +1033,7 @@ cogl_onscreen_glx_notify_swap_buffers (CoglOnscreen *onscreen,
info = cogl_onscreen_peek_head_frame_info (onscreen);
info->presentation_time =
ust_to_nanoseconds (context->display->renderer,
glx_onscreen->glxwin,
onscreen_glx->glxwin,
swap_event->ust);
}
@ -1043,7 +1043,7 @@ cogl_onscreen_glx_notify_swap_buffers (CoglOnscreen *onscreen,
void
cogl_onscreen_glx_update_output (CoglOnscreen *onscreen)
{
CoglOnscreenGLX *glx_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglDisplay *display = context->display;
@ -1053,18 +1053,18 @@ cogl_onscreen_glx_update_output (CoglOnscreen *onscreen)
width = cogl_framebuffer_get_width (framebuffer);
height = cogl_framebuffer_get_height (framebuffer);
output = _cogl_xlib_renderer_output_for_rectangle (display->renderer,
glx_onscreen->x,
glx_onscreen->y,
onscreen_glx->x,
onscreen_glx->y,
width, height);
if (glx_onscreen->output != output)
if (onscreen_glx->output != output)
{
if (glx_onscreen->output)
cogl_object_unref (glx_onscreen->output);
if (onscreen_glx->output)
cogl_object_unref (onscreen_glx->output);
glx_onscreen->output = output;
onscreen_glx->output = output;
if (output)
cogl_object_ref (glx_onscreen->output);
cogl_object_ref (onscreen_glx->output);
}
}
@ -1076,10 +1076,10 @@ cogl_onscreen_glx_resize (CoglOnscreen *onscreen,
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglRenderer *renderer = context->display->renderer;
CoglGLXRenderer *glx_renderer = renderer->winsys;
CoglOnscreenGLX *glx_onscreen;
CoglOnscreenGlx *onscreen_glx;
int x, y;
glx_onscreen = cogl_onscreen_get_winsys (onscreen);
onscreen_glx = cogl_onscreen_get_winsys (onscreen);
_cogl_framebuffer_winsys_update_size (framebuffer,
configure_event->width,
@ -1097,7 +1097,7 @@ cogl_onscreen_glx_resize (CoglOnscreen *onscreen,
NULL);
}
glx_onscreen->pending_resize_notify++;
onscreen_glx->pending_resize_notify++;
if (configure_event->send_event)
{
@ -1113,8 +1113,8 @@ cogl_onscreen_glx_resize (CoglOnscreen *onscreen,
0, 0, &x, &y, &child);
}
glx_onscreen->x = x;
glx_onscreen->y = y;
onscreen_glx->x = x;
onscreen_glx->y = y;
cogl_onscreen_glx_update_output (onscreen);
}
@ -1123,7 +1123,7 @@ gboolean
cogl_onscreen_glx_is_for_window (CoglOnscreen *onscreen,
Window window)
{
CoglOnscreenGLX *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenGlx *onscreen_glx = cogl_onscreen_get_winsys (onscreen);
return onscreen_glx->xwin == window;
}

View File

@ -55,8 +55,8 @@ _cogl_winsys_egl_onscreen_xlib_init (CoglOnscreen *onscreen,
CoglRendererEGL *egl_renderer = renderer->winsys;
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (renderer);
CoglOnscreenXlib *xlib_onscreen;
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *onscreen_xlib;
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
Window xwin;
EGLSurface egl_surface;
@ -132,17 +132,17 @@ _cogl_winsys_egl_onscreen_xlib_init (CoglOnscreen *onscreen,
}
}
xlib_onscreen = g_slice_new (CoglOnscreenXlib);
cogl_onscreen_egl_set_platform (egl_onscreen, xlib_onscreen);
onscreen_xlib = g_slice_new (CoglOnscreenXlib);
cogl_onscreen_egl_set_platform (onscreen_egl, onscreen_xlib);
xlib_onscreen->xwin = xwin;
onscreen_xlib->xwin = xwin;
egl_surface =
eglCreateWindowSurface (egl_renderer->edpy,
egl_config,
(EGLNativeWindowType) xlib_onscreen->xwin,
(EGLNativeWindowType) onscreen_xlib->xwin,
NULL);
cogl_onscreen_egl_set_egl_surface (egl_onscreen,
cogl_onscreen_egl_set_egl_surface (onscreen_egl,
egl_surface);
return TRUE;
@ -157,19 +157,19 @@ _cogl_winsys_egl_onscreen_xlib_deinit (CoglOnscreen *onscreen)
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (renderer);
CoglXlibTrapState old_state;
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *xlib_onscreen =
cogl_onscreen_egl_get_platform (egl_onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *onscreen_xlib =
cogl_onscreen_egl_get_platform (onscreen_egl);
_cogl_xlib_renderer_trap_errors (renderer, &old_state);
if (xlib_onscreen->xwin != None)
if (onscreen_xlib->xwin != None)
{
XDestroyWindow (xlib_renderer->xdpy, xlib_onscreen->xwin);
xlib_onscreen->xwin = None;
XDestroyWindow (xlib_renderer->xdpy, onscreen_xlib->xwin);
onscreen_xlib->xwin = None;
}
else
xlib_onscreen->xwin = None;
onscreen_xlib->xwin = None;
XSync (xlib_renderer->xdpy, False);
@ -177,7 +177,7 @@ _cogl_winsys_egl_onscreen_xlib_deinit (CoglOnscreen *onscreen)
&old_state) != Success)
g_warning ("X Error while destroying X window");
g_slice_free (CoglOnscreenXlib, xlib_onscreen);
g_slice_free (CoglOnscreenXlib, onscreen_xlib);
}
void
@ -189,14 +189,14 @@ _cogl_winsys_onscreen_xlib_set_visibility (CoglOnscreen *onscreen,
CoglRenderer *renderer = context->display->renderer;
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (renderer);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *xlib_onscreen =
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *onscreen_xlib =
cogl_onscreen_egl_get_platform (onscreen_egl);
if (visibility)
XMapWindow (xlib_renderer->xdpy, xlib_onscreen->xwin);
XMapWindow (xlib_renderer->xdpy, onscreen_xlib->xwin);
else
XUnmapWindow (xlib_renderer->xdpy, xlib_onscreen->xwin);
XUnmapWindow (xlib_renderer->xdpy, onscreen_xlib->xwin);
}
void
@ -207,9 +207,9 @@ _cogl_winsys_onscreen_xlib_set_resizable (CoglOnscreen *onscreen,
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *xlib_onscreen =
cogl_onscreen_egl_get_platform (egl_onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *onscreen_xlib =
cogl_onscreen_egl_get_platform (onscreen_egl);
XSizeHints *size_hints = XAllocSizeHints ();
@ -234,7 +234,7 @@ _cogl_winsys_onscreen_xlib_set_resizable (CoglOnscreen *onscreen,
size_hints->max_height = height;
}
XSetWMNormalHints (xlib_renderer->xdpy, xlib_onscreen->xwin, size_hints);
XSetWMNormalHints (xlib_renderer->xdpy, onscreen_xlib->xwin, size_hints);
XFree (size_hints);
}
@ -242,22 +242,22 @@ _cogl_winsys_onscreen_xlib_set_resizable (CoglOnscreen *onscreen,
uint32_t
_cogl_winsys_onscreen_xlib_get_window_xid (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *xlib_onscreen =
cogl_onscreen_egl_get_platform (egl_onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *onscreen_xlib =
cogl_onscreen_egl_get_platform (onscreen_egl);
return xlib_onscreen->xwin;
return onscreen_xlib->xwin;
}
gboolean
cogl_onscreen_xlib_is_for_window (CoglOnscreen *onscreen,
Window window)
{
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *xlib_onscreen =
cogl_onscreen_egl_get_platform (egl_onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *onscreen_xlib =
cogl_onscreen_egl_get_platform (onscreen_egl);
return xlib_onscreen->xwin == window;
return onscreen_xlib->xwin == window;
}
static void
@ -269,14 +269,14 @@ flush_pending_resize_notifications_cb (void *data,
if (COGL_IS_ONSCREEN (framebuffer))
{
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
CoglOnscreenEGL *egl_onscreen = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *xlib_onscreen =
cogl_onscreen_egl_get_platform (egl_onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenXlib *onscreen_xlib =
cogl_onscreen_egl_get_platform (onscreen_egl);
if (xlib_onscreen->pending_resize_notify)
if (onscreen_xlib->pending_resize_notify)
{
_cogl_onscreen_notify_resize (onscreen);
xlib_onscreen->pending_resize_notify = FALSE;
onscreen_xlib->pending_resize_notify = FALSE;
}
}
}
@ -307,10 +307,10 @@ cogl_onscreen_xlib_resize (CoglOnscreen *onscreen,
CoglContext *context = cogl_framebuffer_get_context (framebuffer);
CoglRenderer *renderer = context->display->renderer;
CoglRendererEGL *egl_renderer = renderer->winsys;
CoglOnscreenEGL *egl_onscreen;
CoglOnscreenXlib *xlib_onscreen;
CoglOnscreenEgl *onscreen_egl;
CoglOnscreenXlib *onscreen_xlib;
egl_onscreen = cogl_onscreen_get_winsys (onscreen);
onscreen_egl = cogl_onscreen_get_winsys (onscreen);
_cogl_framebuffer_winsys_update_size (framebuffer, width, height);
@ -326,6 +326,6 @@ cogl_onscreen_xlib_resize (CoglOnscreen *onscreen,
NULL);
}
xlib_onscreen = cogl_onscreen_egl_get_platform (egl_onscreen);
xlib_onscreen->pending_resize_notify = TRUE;
onscreen_xlib = cogl_onscreen_egl_get_platform (onscreen_egl);
onscreen_xlib->pending_resize_notify = TRUE;
}

View File

@ -79,7 +79,7 @@
#define MAX_GLX_CONFIG_ATTRIBS 30
typedef struct _CoglOnscreenGLX CoglOnscreenGLX;
typedef struct _CoglOnscreenGlx CoglOnscreenGlx;
typedef struct _CoglContextGLX
{
@ -162,7 +162,7 @@ find_onscreen_for_xid (CoglContext *context, uint32_t xid)
{
CoglFramebuffer *framebuffer = l->data;
CoglOnscreen *onscreen;
CoglOnscreenGLX *onscreen_glx;
CoglOnscreenGlx *onscreen_glx;
if (!COGL_IS_ONSCREEN (framebuffer))
continue;

View File

@ -341,7 +341,7 @@ get_supported_egl_modifiers (CoglOnscreen *onscreen,
MetaCrtcKms *crtc_kms,
uint32_t format)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
@ -390,7 +390,7 @@ static GArray *
get_supported_modifiers (CoglOnscreen *onscreen,
uint32_t format)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaCrtcKms *crtc_kms = META_CRTC_KMS (onscreen_native->crtc);
@ -409,7 +409,7 @@ get_supported_modifiers (CoglOnscreen *onscreen,
static GArray *
get_supported_kms_formats (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaCrtcKms *crtc_kms = META_CRTC_KMS (onscreen_native->crtc);
@ -445,7 +445,7 @@ init_secondary_gpu_state_gpu_copy_mode (MetaRendererNative *renderer_nat
GError **error)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
@ -604,7 +604,7 @@ init_secondary_gpu_state_cpu_copy_mode (MetaRendererNative *renderer_nat
GError **error)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state;
@ -670,7 +670,7 @@ init_secondary_gpu_state (MetaRendererNative *renderer_native,
CoglOnscreen *onscreen,
GError **error)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaGpu *gpu = meta_crtc_get_gpu (onscreen_native->crtc);
@ -718,7 +718,7 @@ meta_renderer_native_disconnect (CoglRenderer *cogl_renderer)
static void
free_current_secondary_bo (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state;
@ -733,7 +733,7 @@ free_current_secondary_bo (CoglOnscreen *onscreen)
static void
free_current_bo (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
@ -1002,7 +1002,7 @@ meta_renderer_native_egl_cleanup_context (CoglDisplay *cogl_display)
static void
swap_secondary_drm_fb (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state;
@ -1019,7 +1019,7 @@ swap_secondary_drm_fb (CoglOnscreen *onscreen)
static void
meta_onscreen_native_swap_drm_fb (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
@ -1067,7 +1067,7 @@ notify_view_crtc_presented (MetaRendererView *view,
CoglFramebuffer *framebuffer =
clutter_stage_view_get_onscreen (stage_view);
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
@ -1267,7 +1267,7 @@ dummy_power_save_page_flip_cb (gpointer user_data)
static void
queue_dummy_power_save_page_flip (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
@ -1292,7 +1292,7 @@ meta_onscreen_native_flip_crtc (CoglOnscreen *onscreen,
MetaCrtc *crtc,
MetaKmsPageFlipListenerFlag flags)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
@ -1356,7 +1356,7 @@ static void
meta_onscreen_native_set_crtc_mode (CoglOnscreen *onscreen,
MetaRendererNativeGpuData *renderer_gpu_data)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaCrtcKms *crtc_kms = META_CRTC_KMS (onscreen_native->crtc);
@ -1395,7 +1395,7 @@ static gboolean
import_shared_framebuffer (CoglOnscreen *onscreen,
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaGpuKms *gpu_kms;
@ -1472,7 +1472,7 @@ copy_shared_framebuffer_gpu (CoglOnscreen *onscreen,
MetaRendererNativeGpuData *renderer_gpu_data,
gboolean *egl_context_changed)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = renderer_gpu_data->renderer_native;
@ -1647,7 +1647,7 @@ copy_shared_framebuffer_primary_gpu (CoglOnscreen *onscre
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
@ -1788,7 +1788,7 @@ copy_shared_framebuffer_cpu (CoglOnscreen *onscreen,
static void
update_secondary_gpu_state_pre_swap_buffers (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state;
@ -1844,7 +1844,7 @@ static void
update_secondary_gpu_state_post_swap_buffers (CoglOnscreen *onscreen,
gboolean *egl_context_changed)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
@ -1885,7 +1885,7 @@ retry:
static void
ensure_crtc_modes (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
@ -1918,7 +1918,7 @@ kms_device_from_view (MetaRendererView *view)
CoglFramebuffer *framebuffer =
clutter_stage_view_get_onscreen (CLUTTER_STAGE_VIEW (view));
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaCrtcKms *crtc_kms = META_CRTC_KMS (onscreen_native->crtc);
@ -1933,7 +1933,7 @@ gpu_from_view (MetaRendererView *view)
CoglFramebuffer *framebuffer =
clutter_stage_view_get_onscreen (CLUTTER_STAGE_VIEW (view));
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
@ -2086,7 +2086,7 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
MetaKms *kms = meta_backend_native_get_kms (backend_native);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaGpuKms *render_gpu = onscreen_native->render_gpu;
@ -2327,7 +2327,7 @@ meta_onscreen_native_is_buffer_scanout_compatible (CoglOnscreen *onscreen,
uint64_t drm_modifier,
uint32_t stride)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
const MetaCrtcConfig *crtc_config;
@ -2373,7 +2373,7 @@ meta_onscreen_native_direct_scanout (CoglOnscreen *onscreen,
gpointer user_data,
GError **error)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaGpuKms *render_gpu = onscreen_native->render_gpu;
@ -2493,7 +2493,7 @@ meta_renderer_native_init_egl_context (CoglContext *cogl_context,
static gboolean
should_surface_be_sharable (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
@ -2512,7 +2512,7 @@ meta_renderer_native_create_surface_gbm (CoglOnscreen *onscreen,
EGLSurface *egl_surface,
GError **error)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
@ -2604,7 +2604,7 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen *onscreen,
GError **error)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer);
@ -2695,7 +2695,7 @@ meta_renderer_native_init_onscreen (CoglOnscreen *onscreen,
CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer);
CoglDisplay *cogl_display = cogl_context->display;
CoglDisplayEGL *cogl_display_egl = cogl_display->winsys;
CoglOnscreenEGL *onscreen_egl;
CoglOnscreenEgl *onscreen_egl;
MetaOnscreenNative *onscreen_native;
g_return_val_if_fail (cogl_display_egl->egl_context, FALSE);
@ -2724,7 +2724,7 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
GError **error)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native =
cogl_onscreen_egl_get_platform (onscreen_egl);
MetaRendererNativeGpuData *renderer_gpu_data;
@ -2794,7 +2794,7 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
static void
destroy_egl_surface (CoglOnscreen *onscreen)
{
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
EGLSurface egl_surface;
egl_surface = cogl_onscreen_egl_get_egl_surface (onscreen_egl);
@ -2823,7 +2823,7 @@ meta_renderer_native_release_onscreen (CoglOnscreen *onscreen)
CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer);
CoglDisplay *cogl_display = cogl_context_get_display (cogl_context);
CoglDisplayEGL *cogl_display_egl = cogl_display->winsys;
CoglOnscreenEGL *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
CoglOnscreenEgl *onscreen_egl = cogl_onscreen_get_winsys (onscreen);
MetaOnscreenNative *onscreen_native;
MetaRendererNative *renderer_native;
MetaRendererNativeGpuData *renderer_gpu_data;
@ -2937,7 +2937,7 @@ meta_renderer_native_create_onscreen (MetaRendererNative *renderer_native,
GError **error)
{
CoglOnscreen *onscreen;
CoglOnscreenEGL *onscreen_egl;
CoglOnscreenEgl *onscreen_egl;
MetaOnscreenNative *onscreen_native;
onscreen = cogl_onscreen_new (context, width, height);
@ -3070,7 +3070,7 @@ static void
meta_onscreen_native_set_view (CoglOnscreen *onscreen,
MetaRendererView *view)
{
CoglOnscreenEGL *onscreen_egl;
CoglOnscreenEgl *onscreen_egl;
MetaOnscreenNative *onscreen_native;
onscreen_egl = cogl_onscreen_get_winsys (onscreen);
@ -3149,7 +3149,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
cogl_context_from_renderer_native (renderer_native);
CoglDisplay *cogl_display = cogl_context_get_display (cogl_context);
CoglDisplayEGL *cogl_display_egl;
CoglOnscreenEGL *onscreen_egl;
CoglOnscreenEgl *onscreen_egl;
const MetaCrtcConfig *crtc_config;
const MetaCrtcModeInfo *crtc_mode_info;
MetaMonitorTransform view_transform;