[gegl] buffer: short-circuit all samplers to be nearest when doing mipmap processing
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: short-circuit all samplers to be nearest when doing mipmap processing
- Date: Fri, 4 Jul 2014 18:00:02 +0000 (UTC)
commit d53e853e5b2eccc3de4cf09f31690e32358a31a0
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Jul 3 17:34:48 2014 +0200
buffer: short-circuit all samplers to be nearest when doing mipmap processing
gegl/buffer/gegl-sampler.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler.c b/gegl/buffer/gegl-sampler.c
index 5276c9e..0e02c0c 100644
--- a/gegl/buffer/gegl-sampler.c
+++ b/gegl/buffer/gegl-sampler.c
@@ -144,6 +144,14 @@ gegl_sampler_get (GeglSampler *self,
void *output,
GeglAbyssPolicy repeat_mode)
{
+ if (self->lvel)
+ {
+ double factor = 1.0 / (1 << self->lvel);
+ GeglRectangle rect={floorf (x * factor), floorf (y * factor),1,1};
+ gegl_buffer_get (self->buffer, &rect, factor, self->format, output, GEGL_AUTO_ROWSTRIDE, repeat_mode);
+ return;
+ }
+
if (gegl_cl_is_accelerated ())
{
GeglRectangle rect={x,y,1,1};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]