mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
Tweaks to the eglnative backend.
This commit is contained in:
parent
87d163db5c
commit
69cc294cea
@ -1,3 +1,8 @@
|
|||||||
|
2007-07-09 Richard Purdie <rpurdie@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/eglnative/clutter-backend-egl.c:
|
||||||
|
Tweaks to the eglnative backend.
|
||||||
|
|
||||||
2007-07-09 Richard Purdie <rpurdie@openedhand.com>
|
2007-07-09 Richard Purdie <rpurdie@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-backend.c:
|
* clutter/clutter-backend.c:
|
||||||
|
@ -22,7 +22,10 @@ static gboolean
|
|||||||
clutter_backend_egl_post_parse (ClutterBackend *backend,
|
clutter_backend_egl_post_parse (ClutterBackend *backend,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
backend_egl->edpy = eglGetDisplay(backend_egl->xdpy);
|
ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL(backend);
|
||||||
|
EGLBoolean status;
|
||||||
|
|
||||||
|
backend_egl->edpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||||
|
|
||||||
status = eglInitialize(backend_egl->edpy,
|
status = eglInitialize(backend_egl->edpy,
|
||||||
&backend_egl->egl_version_major,
|
&backend_egl->egl_version_major,
|
||||||
@ -36,8 +39,6 @@ clutter_backend_egl_post_parse (ClutterBackend *backend,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
CLUTTER_NOTE (BACKEND, "EGL Reports version %i.%i",
|
CLUTTER_NOTE (BACKEND, "EGL Reports version %i.%i",
|
||||||
backend_egl->egl_version_major,
|
backend_egl->egl_version_major,
|
||||||
backend_egl->egl_version_minor);
|
backend_egl->egl_version_minor);
|
||||||
@ -53,7 +54,6 @@ clutter_backend_egl_init_stage (ClutterBackend *backend,
|
|||||||
|
|
||||||
if (!backend_egl->stage)
|
if (!backend_egl->stage)
|
||||||
{
|
{
|
||||||
ClutterStageEGL *stage_egl;
|
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
|
|
||||||
stage = g_object_new (CLUTTER_TYPE_STAGE_EGL, NULL);
|
stage = g_object_new (CLUTTER_TYPE_STAGE_EGL, NULL);
|
||||||
@ -100,17 +100,9 @@ clutter_backend_egl_redraw (ClutterBackend *backend)
|
|||||||
/* Why this paint is done in backend as likely GL windowing system
|
/* Why this paint is done in backend as likely GL windowing system
|
||||||
* specific calls, like swapping buffers.
|
* specific calls, like swapping buffers.
|
||||||
*/
|
*/
|
||||||
if (stage_egl->xwin)
|
|
||||||
{
|
|
||||||
/* clutter_feature_wait_for_vblank (); */
|
/* clutter_feature_wait_for_vblank (); */
|
||||||
eglSwapBuffers (backend_egl->edpy, stage_egl->egl_surface);
|
eglSwapBuffers (backend_egl->edpy, stage_egl->egl_surface);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
eglWaitGL ();
|
|
||||||
CLUTTER_GLERR ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static ClutterActor *
|
static ClutterActor *
|
||||||
clutter_backend_egl_get_stage (ClutterBackend *backend)
|
clutter_backend_egl_get_stage (ClutterBackend *backend)
|
||||||
@ -123,8 +115,6 @@ clutter_backend_egl_get_stage (ClutterBackend *backend)
|
|||||||
static void
|
static void
|
||||||
clutter_backend_egl_finalize (GObject *gobject)
|
clutter_backend_egl_finalize (GObject *gobject)
|
||||||
{
|
{
|
||||||
ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL (gobject);
|
|
||||||
|
|
||||||
if (backend_singleton)
|
if (backend_singleton)
|
||||||
backend_singleton = NULL;
|
backend_singleton = NULL;
|
||||||
|
|
||||||
@ -186,7 +176,6 @@ clutter_backend_egl_class_init (ClutterBackendEGLClass *klass)
|
|||||||
backend_class->init_stage = clutter_backend_egl_init_stage;
|
backend_class->init_stage = clutter_backend_egl_init_stage;
|
||||||
backend_class->init_events = clutter_backend_egl_init_events;
|
backend_class->init_events = clutter_backend_egl_init_events;
|
||||||
backend_class->get_stage = clutter_backend_egl_get_stage;
|
backend_class->get_stage = clutter_backend_egl_get_stage;
|
||||||
backend_class->add_options = clutter_backend_egl_add_options;
|
|
||||||
backend_class->redraw = clutter_backend_egl_redraw;
|
backend_class->redraw = clutter_backend_egl_redraw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,5 +197,5 @@ _clutter_backend_impl_get_type (void)
|
|||||||
EGLDisplay
|
EGLDisplay
|
||||||
clutter_egl_display (void)
|
clutter_egl_display (void)
|
||||||
{
|
{
|
||||||
return (EGLDisplay)clutter_egl_get_default_display ();
|
return backend_singleton->edpy;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user