[gtk/wip/baedert/gl-rework: 2/9] gl renderer: Remove unused translation handling
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/gl-rework: 2/9] gl renderer: Remove unused translation handling
- Date: Tue, 17 Dec 2019 10:15:58 +0000 (UTC)
commit 660a07337bff88235b9cc2f9a2e82a119e0d562d
Author: Timm Bäder <mail baedert org>
Date: Mon Dec 16 06:41:07 2019 +0100
gl renderer: Remove unused translation handling
gsk/gl/gskglrenderops.c | 12 +++---------
gsk/gl/gskglrenderopsprivate.h | 4 ----
2 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/gsk/gl/gskglrenderops.c b/gsk/gl/gskglrenderops.c
index df65da3b0c..9795e249b9 100644
--- a/gsk/gl/gskglrenderops.c
+++ b/gsk/gl/gskglrenderops.c
@@ -127,15 +127,12 @@ static void
extract_matrix_metadata (GskTransform *transform,
OpsMatrixMetadata *md)
{
+ float dummy;
+
switch (gsk_transform_get_category (transform))
{
case GSK_TRANSFORM_CATEGORY_IDENTITY:
- md->scale_x = 1;
- md->scale_y = 1;
- break;
-
case GSK_TRANSFORM_CATEGORY_2D_TRANSLATE:
- gsk_transform_to_translate (transform, &md->translate_x, &md->translate_y);
md->scale_x = 1;
md->scale_y = 1;
break;
@@ -143,7 +140,7 @@ extract_matrix_metadata (GskTransform *transform,
case GSK_TRANSFORM_CATEGORY_2D_AFFINE:
gsk_transform_to_affine (transform,
&md->scale_x, &md->scale_y,
- &md->translate_x, &md->translate_y);
+ &dummy, &dummy);
break;
case GSK_TRANSFORM_CATEGORY_UNKNOWN:
@@ -159,9 +156,6 @@ extract_matrix_metadata (GskTransform *transform,
/* TODO: 90% sure this is incorrect. But we should never hit this code
* path anyway. */
- md->translate_x = graphene_matrix_get_value (&m, 3, 0);
- md->translate_y = graphene_matrix_get_value (&m, 3, 1);
-
graphene_vec3_init (&col1,
graphene_matrix_get_value (&m, 0, 0),
graphene_matrix_get_value (&m, 1, 0),
diff --git a/gsk/gl/gskglrenderopsprivate.h b/gsk/gl/gskglrenderopsprivate.h
index b4933aa6b4..bd26f9b98f 100644
--- a/gsk/gl/gskglrenderopsprivate.h
+++ b/gsk/gl/gskglrenderopsprivate.h
@@ -15,12 +15,8 @@
#define GL_N_VERTICES 6
#define GL_N_PROGRAMS 13
-
-
typedef struct
{
- float translate_x;
- float translate_y;
float scale_x;
float scale_y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]