[gegl] operations/common-gpl3+/tile-paper: Remove redundant code
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations/common-gpl3+/tile-paper: Remove redundant code
- Date: Sun, 24 Dec 2017 12:12:06 +0000 (UTC)
commit ea4f1072996e906fb2bd6d07549dffc87151da5d
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Dec 19 08:06:18 2017 +0100
operations/common-gpl3+/tile-paper: Remove redundant code
GeglOperationFilter::get_bounding_box already forwards its source
bounding box. There is no need to provide an implementation that does
the same.
operations/common-gpl3+/tile-paper.c | 18 ++----------------
1 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/operations/common-gpl3+/tile-paper.c b/operations/common-gpl3+/tile-paper.c
index 49bee86..662ed74 100644
--- a/operations/common-gpl3+/tile-paper.c
+++ b/operations/common-gpl3+/tile-paper.c
@@ -398,19 +398,6 @@ process (GeglOperation *operation,
return TRUE;
}
-static GeglRectangle
-get_bounding_box (GeglOperation *operation)
-{
- GeglRectangle result = { 0, 0, 0, 0 };
- GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (operation,
- "input");
-
- if (! in_rect)
- return result;
-
- return *in_rect;
-}
-
/* Compute the input rectangle required to compute the specified
* region of interest (roi).
*/
@@ -419,14 +406,14 @@ get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
{
- return get_bounding_box (operation);
+ return gegl_operation_get_bounding_box (operation);
}
static GeglRectangle
get_cached_region (GeglOperation *operation,
const GeglRectangle *roi)
{
- return get_bounding_box (operation);
+ return gegl_operation_get_bounding_box (operation);
}
static void
@@ -440,7 +427,6 @@ gegl_op_class_init (GeglOpClass *klass)
operation_class->threaded = FALSE;
operation_class->prepare = prepare;
- operation_class->get_bounding_box = get_bounding_box;
operation_class->get_required_for_output = get_required_for_output;
operation_class->get_cached_region = get_cached_region;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]