[gtk/wip/otte/transform: 3/8] transform: Remove gsk_transform_identity()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/transform: 3/8] transform: Remove gsk_transform_identity()
- Date: Mon, 4 Mar 2019 22:44:35 +0000 (UTC)
commit 70b341139b48a7ee2bbb5bf6ba133fbe673fd2e5
Author: Benjamin Otte <otte redhat com>
Date: Sat Mar 2 11:46:07 2019 +0100
transform: Remove gsk_transform_identity()
This used to be a good idea back when GskTransform was intended to be
used for transitions, but without it, it's not anymore.
docs/reference/gsk/gsk4-sections.txt | 1 -
gsk/gsktransform.c | 27 +--------------------------
gsk/gsktransform.h | 2 --
3 files changed, 1 insertion(+), 29 deletions(-)
---
diff --git a/docs/reference/gsk/gsk4-sections.txt b/docs/reference/gsk/gsk4-sections.txt
index 3b544f6b45..f85ff189c4 100644
--- a/docs/reference/gsk/gsk4-sections.txt
+++ b/docs/reference/gsk/gsk4-sections.txt
@@ -162,7 +162,6 @@ gsk_transform_to_2d
gsk_transform_to_affine
gsk_transform_to_translate
<SUBSECTION>
-gsk_transform_identity
gsk_transform_transform
gsk_transform_matrix
gsk_transform_translate
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index f6c4b4a1ab..a1e6da676e 100644
--- a/gsk/gsktransform.c
+++ b/gsk/gsktransform.c
@@ -178,7 +178,7 @@ static GskTransform *
gsk_identity_transform_apply (GskTransform *transform,
GskTransform *apply_to)
{
- return gsk_transform_identity (apply_to);
+ return apply_to;
}
static gboolean
@@ -223,28 +223,6 @@ gsk_transform_is_identity (GskTransform *self)
(self->transform_class == &GSK_IDENTITY_TRANSFORM_CLASS && gsk_transform_is_identity (self->next));
}
-/**
- * gsk_transform_identity:
- * @next: (allow-none): the next transform operation or %NULL
- *
- * Adds an identity multiplication into the list of matrix operations.
- *
- * This operation is generally useless, but may be useful when interpolating
- * matrices, because the identity matrix can be interpolated to and from
- * everything, so an identity matrix can be used as a keyframe between two
- * different types of matrices.
- *
- * Returns: The new matrix
- **/
-GskTransform *
-gsk_transform_identity (GskTransform *next)
-{
- if (gsk_transform_is_identity (next))
- return next;
-
- return gsk_transform_alloc (&GSK_IDENTITY_TRANSFORM_CLASS, next);
-}
-
/*** MATRIX ***/
typedef struct _GskMatrixTransform GskMatrixTransform;
@@ -1470,9 +1448,6 @@ gsk_transform_get_category (GskTransform *self)
* Creates a new identity matrix. This function is meant to be used by language
* bindings. For C code, this equivalent to using %NULL.
*
- * See also gsk_transform_identity() for inserting identity matrix operations
- * when constructing matrices.
- *
* Returns: A new identity matrix
**/
GskTransform *
diff --git a/gsk/gsktransform.h b/gsk/gsktransform.h
index c38955fa26..3696f6fab2 100644
--- a/gsk/gsktransform.h
+++ b/gsk/gsktransform.h
@@ -76,8 +76,6 @@ gboolean gsk_transform_equal (GskTransform
GDK_AVAILABLE_IN_ALL
GskTransform * gsk_transform_new (void);
GDK_AVAILABLE_IN_ALL
-GskTransform * gsk_transform_identity (GskTransform *next);
-GDK_AVAILABLE_IN_ALL
GskTransform * gsk_transform_transform (GskTransform *next,
GskTransform *other);
GDK_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]