backend: Invoke ClutterStageWindow::redraw by default

Instead of asking all backends to do that for us, we can call
ClutterStageWindow::redraw ourselves by default.

This changeset fixes all backends to actually do the right thing, and
move the stage implementation redraw inside the ClutterStageWindow
implementation itself.
This commit is contained in:
Emmanuele Bassi
2011-02-04 15:09:41 +00:00
parent 7da930fb75
commit 224280be22
11 changed files with 381 additions and 423 deletions

View File

@ -191,30 +191,6 @@ clutter_backend_osx_ensure_context (ClutterBackend *backend,
CLUTTER_OSX_POOL_RELEASE();
}
static void
clutter_backend_osx_redraw (ClutterBackend *backend,
ClutterStage *wrapper)
{
ClutterStageWindow *impl;
ClutterStageOSX *stage_osx;
if (CLUTTER_ACTOR_IN_DESTRUCTION (wrapper))
return;
impl = _clutter_stage_get_window (wrapper);
if (impl == NULL)
return;
stage_osx = CLUTTER_STAGE_OSX (impl);
CLUTTER_OSX_POOL_ALLOC();
if (stage_osx->view != NULL)
[stage_osx->view setNeedsDisplay: YES];
CLUTTER_OSX_POOL_RELEASE();
}
/*************************************************************************/
static void
@ -267,7 +243,6 @@ clutter_backend_osx_class_init (ClutterBackendOSXClass *klass)
backend_class->create_context = clutter_backend_osx_create_context;
backend_class->ensure_context = clutter_backend_osx_ensure_context;
backend_class->init_events = clutter_backend_osx_init_events;
backend_class->redraw = clutter_backend_osx_redraw;
backend_class->get_device_manager = clutter_backend_osx_get_device_manager;
}