[renderer] map buffer lazily

This is to prevent screen clears on plugins that don't
use the renderers (text plugins)
This commit is contained in:
Ray Strode 2009-10-08 16:01:56 -04:00
parent bda90f63c1
commit 89f07b8f81

View file

@ -264,14 +264,6 @@ ply_renderer_open (ply_renderer_t *renderer)
continue;
}
if (!ply_renderer_map_to_device (renderer))
{
ply_trace ("could not map renderer to device for plugin %s",
plugin_path);
ply_renderer_close_device (renderer);
ply_renderer_unload_plugin (renderer);
continue;
}
return true;
}
@ -314,6 +306,9 @@ ply_renderer_flush_head (ply_renderer_t *renderer,
assert (renderer->plugin_interface != NULL);
assert (head != NULL);
if (!ply_renderer_map_to_device (renderer))
return;
renderer->plugin_interface->flush_head (renderer->backend, head);
}