mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
a1e1527b69
Instead of just having an "EGL" renderer, there is now a separate winsys for each platform. Currently they just directly copy the vtable for the EGL platform so it is still only possible to have one EGL platform compiled into Cogl. However the intention is that the winsys-specific code for each platform will be moved into override functions in the corresponding platform winsys. Reviewed-by: Robert Bragg <robert@linux.intel.com>
56 lines
1.5 KiB
C
56 lines
1.5 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2011 Intel Corporation.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
*
|
|
* Authors:
|
|
* Robert Bragg <robert@linux.intel.com>
|
|
* Neil Roberts <neil@linux.intel.com>
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include "cogl-winsys-egl-android-private.h"
|
|
#include "cogl-winsys-egl-private.h"
|
|
|
|
const CoglWinsysVtable *
|
|
_cogl_winsys_egl_android_get_vtable (void)
|
|
{
|
|
static gboolean vtable_inited = FALSE;
|
|
static CoglWinsysVtable vtable;
|
|
|
|
if (!vtable_inited)
|
|
{
|
|
/* The EGL_ANDROID winsys is a subclass of the EGL winsys so we
|
|
start by copying its vtable */
|
|
|
|
vtable = *_cogl_winsys_egl_get_vtable ();
|
|
|
|
vtable.id = COGL_WINSYS_ID_EGL_ANDROID;
|
|
vtable.name = "EGL_ANDROID";
|
|
|
|
vtable_inited = TRUE;
|
|
}
|
|
|
|
return &vtable;
|
|
}
|