Commit d0ae39f0 authored by Ell's avatar Ell

Issue #440 - libgimp/gimptilebackendplugin.c provides no pyramid

In GimpTileBackendPlugin, return NULL when fetching z>0 tiles,
instead of simply ignoring the z coordinate, so that the mipmapped
tile is rendered locally.  Likewise, avoid storing z>0 tiles.

Note that this is suboptimal, since all the necessary level-0 tiles
need to be sent to the buffer as a result.  Ideally, we should
extend the wire protocol to handle mipmapped tiles.
parent 2256ab22
......@@ -132,20 +132,31 @@ gimp_tile_backend_plugin_command (GeglTileSource *tile_store,
switch (command)
{
case GEGL_TILE_GET:
g_mutex_lock (&backend_plugin_mutex);
/* TODO: fetch mipmapped tiles directly from gimp, instead of returning
* NULL to render them locally
*/
if (z == 0)
{
g_mutex_lock (&backend_plugin_mutex);
result = gimp_tile_read_mul (backend_plugin, x, y);
result = gimp_tile_read_mul (backend_plugin, x, y);
g_mutex_unlock (&backend_plugin_mutex);
g_mutex_unlock (&backend_plugin_mutex);
}
break;
case GEGL_TILE_SET:
g_mutex_lock (&backend_plugin_mutex);
/* TODO: actually store mipmapped tiles */
if (z == 0)
{
g_mutex_lock (&backend_plugin_mutex);
gimp_tile_write_mul (backend_plugin, x, y, gegl_tile_get_data (data));
gegl_tile_mark_as_stored (data);
gimp_tile_write_mul (backend_plugin, x, y, gegl_tile_get_data (data));
g_mutex_unlock (&backend_plugin_mutex);
g_mutex_unlock (&backend_plugin_mutex);
}
gegl_tile_mark_as_stored (data);
break;
case GEGL_TILE_FLUSH:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment