[gegl] merge buffer's opencl cache in clone and crop
- From: Victor Matheus de Araujo Oliveira <vmaolive src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] merge buffer's opencl cache in clone and crop
- Date: Wed, 21 Mar 2012 19:04:57 +0000 (UTC)
commit c83fc82f3347c36fb504a2f0202b4a087b1a8a7c
Author: Victor Oliveira <victormatheus gmail com>
Date: Wed Mar 21 16:04:00 2012 -0300
merge buffer's opencl cache in clone and crop
operations/core/clone.c | 5 +++++
operations/core/crop.c | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/operations/core/clone.c b/operations/core/clone.c
index 7161251..c26b455 100644
--- a/operations/core/clone.c
+++ b/operations/core/clone.c
@@ -35,6 +35,7 @@ gegl_chant_string (ref, _("Reference"), "ID",
#include <math.h>
#include <string.h>
+#include "buffer/gegl-buffer-cl-cache.h"
static GeglNode *
detect (GeglOperation *operation,
@@ -88,6 +89,10 @@ process (GeglOperation *operation,
g_warning ("clone received NULL input");
return FALSE;
}
+
+ if (gegl_cl_is_accelerated ())
+ gegl_buffer_cl_cache_invalidate (input, NULL);
+
gegl_operation_context_take_object (context, "output", G_OBJECT (input));
return TRUE;
}
diff --git a/operations/core/crop.c b/operations/core/crop.c
index d5218aa..217d55c 100644
--- a/operations/core/crop.c
+++ b/operations/core/crop.c
@@ -136,6 +136,9 @@ gegl_crop_process (GeglOperation *operation,
{
GeglBuffer *output;
+ if (gegl_cl_is_accelerated ())
+ gegl_buffer_cl_cache_invalidate (input, &extent);
+
output = gegl_buffer_create_sub_buffer (input, &extent);
if (gegl_object_get_has_forked (input))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]