[gegl] sampler.c/h: tile size and offset more friendly to resize without too much slow down for bad rotatio
- From: Nicolas Robidoux <nrobidoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] sampler.c/h: tile size and offset more friendly to resize without too much slow down for bad rotatio
- Date: Sun, 30 Dec 2012 00:35:25 +0000 (UTC)
commit f31b7e999b8a4615a77136b73d13df05b7393fa0
Author: Nicolas Robidoux <nrobidoux git gnome org>
Date: Sat Dec 29 19:35:25 2012 -0500
sampler.c/h: tile size and offset more friendly to resize without too much slow down for bad rotations
gegl/buffer/gegl-sampler.c | 12 ++++++------
gegl/buffer/gegl-sampler.h | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler.c b/gegl/buffer/gegl-sampler.c
index 515ea93..fa5b468 100644
--- a/gegl/buffer/gegl-sampler.c
+++ b/gegl/buffer/gegl-sampler.c
@@ -274,10 +274,10 @@ gegl_sampler_get_ptr (GeglSampler *const sampler,
fetch_rectangle.height = maximum_height;
fetch_rectangle.x =
x + sampler->context_rect[0].x -
- (maximum_width - sampler->context_rect[0].width ) / (gint) 3;
+ (maximum_width - sampler->context_rect[0].width ) / (gint) 4;
fetch_rectangle.y =
y + sampler->context_rect[0].y -
- (maximum_height - sampler->context_rect[0].height) / (gint) 3;
+ (maximum_height - sampler->context_rect[0].height) / (gint) 4;
gegl_buffer_get (sampler->buffer,
&fetch_rectangle,
@@ -347,9 +347,9 @@ gegl_sampler_get_from_buffer (GeglSampler *const sampler,
fetch_rectangle.width = maximum_width;
fetch_rectangle.height = maximum_height;
fetch_rectangle.x = x -
- (maximum_width - sampler->context_rect[0].width ) / (gint) 3;
+ (maximum_width - sampler->context_rect[0].width ) / (gint) 4;
fetch_rectangle.y = y -
- (maximum_height - sampler->context_rect[0].height) / (gint) 3;
+ (maximum_height - sampler->context_rect[0].height) / (gint) 4;
gegl_buffer_get (sampler->buffer,
&fetch_rectangle,
@@ -428,10 +428,10 @@ gegl_sampler_get_from_mipmap (GeglSampler *const sampler,
fetch_rectangle.height = maximum_height;
fetch_rectangle.x =
x + sampler->context_rect[level].x -
- (maximum_width - sampler->context_rect[level].width ) / (gint) 3;
+ (maximum_width - sampler->context_rect[level].width ) / (gint) 4;
fetch_rectangle.y =
y + sampler->context_rect[level].y -
- (maximum_height - sampler->context_rect[level].height) / (gint) 3;
+ (maximum_height - sampler->context_rect[level].height) / (gint) 4;
gegl_buffer_get (sampler->buffer,
&fetch_rectangle,
diff --git a/gegl/buffer/gegl-sampler.h b/gegl/buffer/gegl-sampler.h
index 999d32d..96c14b4 100644
--- a/gegl/buffer/gegl-sampler.h
+++ b/gegl/buffer/gegl-sampler.h
@@ -41,7 +41,7 @@ G_BEGIN_DECLS
* Best thing to do seems to use rectangular buffer tiles that are
* twice as wide as they are tall.
*/
-#define GEGL_SAMPLER_MAXIMUM_HEIGHT (32)
+#define GEGL_SAMPLER_MAXIMUM_HEIGHT (64)
#define GEGL_SAMPLER_MAXIMUM_WIDTH (GEGL_SAMPLER_MAXIMUM_HEIGHT)
typedef struct _GeglSamplerClass GeglSamplerClass;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]