summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/gen2_render.c8
-rw-r--r--src/sna/gen3_render.c8
-rw-r--r--src/sna/gen4_render.c8
-rw-r--r--src/sna/gen5_render.c8
-rw-r--r--src/sna/gen6_render.c8
-rw-r--r--src/sna/gen7_render.c8
6 files changed, 42 insertions, 6 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index ed48ce6d..64b4e7c1 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1507,9 +1507,15 @@ has_alphamap(PicturePtr p)
}
static bool
+untransformed(PicturePtr p)
+{
+ return !p->transform || pixman_transform_is_int_translate(p->transform);
+}
+
+static bool
need_upload(PicturePtr p)
{
- return p->pDrawable && unattached(p->pDrawable);
+ return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
}
static bool
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index fc006ac4..97e5839d 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2419,9 +2419,15 @@ has_alphamap(PicturePtr p)
}
static bool
+untransformed(PicturePtr p)
+{
+ return !p->transform || pixman_transform_is_int_translate(p->transform);
+}
+
+static bool
need_upload(PicturePtr p)
{
- return p->pDrawable && unattached(p->pDrawable);
+ return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
}
static bool
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index 62465383..6e7d4be6 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -2016,9 +2016,15 @@ has_alphamap(PicturePtr p)
}
static bool
+untransformed(PicturePtr p)
+{
+ return !p->transform || pixman_transform_is_int_translate(p->transform);
+}
+
+static bool
need_upload(PicturePtr p)
{
- return p->pDrawable && unattached(p->pDrawable);
+ return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
}
static bool
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index b9c7a92a..7ac993cd 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -2044,9 +2044,15 @@ has_alphamap(PicturePtr p)
}
static bool
+untransformed(PicturePtr p)
+{
+ return !p->transform || pixman_transform_is_int_translate(p->transform);
+}
+
+static bool
need_upload(PicturePtr p)
{
- return p->pDrawable && unattached(p->pDrawable);
+ return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
}
static bool
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 17789e96..1476ff7f 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2325,9 +2325,15 @@ has_alphamap(PicturePtr p)
}
static bool
+untransformed(PicturePtr p)
+{
+ return !p->transform || pixman_transform_is_int_translate(p->transform);
+}
+
+static bool
need_upload(PicturePtr p)
{
- return p->pDrawable && unattached(p->pDrawable);
+ return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
}
static bool
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 97574054..5740a421 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2329,9 +2329,15 @@ has_alphamap(PicturePtr p)
}
static bool
+untransformed(PicturePtr p)
+{
+ return !p->transform || pixman_transform_is_int_translate(p->transform);
+}
+
+static bool
need_upload(PicturePtr p)
{
- return p->pDrawable && unattached(p->pDrawable);
+ return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
}
static bool