summaryrefslogtreecommitdiff
path: root/gegl
diff options
context:
space:
mode:
authorØyvind Kolås <pippin@gimp.org>2014-07-10 23:05:58 +0200
committerØyvind Kolås <pippin@gimp.org>2014-07-10 23:54:13 +0200
commit6671ed493ef7d23b5f4e12ca852e56dfab1a2a80 (patch)
tree483114b802658d2b0ebbb5aaa0cbe4e54de817da /gegl
parenta459312ff9281fc0314136cc7497f17413068923 (diff)
eval-manager: clamp mipmap level
Clamping mipmap-level to the highest cached level here; will satisfy also smaller scale factors.
Diffstat (limited to 'gegl')
-rw-r--r--gegl/process/gegl-eval-manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gegl/process/gegl-eval-manager.c b/gegl/process/gegl-eval-manager.c
index 9cd4afc8..f97ade51 100644
--- a/gegl/process/gegl-eval-manager.c
+++ b/gegl/process/gegl-eval-manager.c
@@ -122,6 +122,9 @@ gegl_eval_manager_apply (GeglEvalManager *self,
g_return_val_if_fail (GEGL_IS_EVAL_MANAGER (self), NULL);
g_return_val_if_fail (GEGL_IS_NODE (self->node), NULL);
+ if (level >= GEGL_CACHE_VALID_MIPMAPS)
+ level = GEGL_CACHE_VALID_MIPMAPS-1;
+
GEGL_INSTRUMENT_START();
gegl_eval_manager_prepare (self);
GEGL_INSTRUMENT_END ("gegl", "prepare-graph");