summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-06 20:41:53 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-06 21:10:35 +0000
commit1467a4ba1a327877026cc76b3eabeb51d1415509 (patch)
tree222fa048c10c0c4a305e378b6e845ffcb49ac8ed
parentef335a65a9d9f7eb96873201b546c25fd03d090c (diff)
sna: Use the proper sna_picture_is_solid() test
Rather than the specialised routines that assumed pDrawable was non-NULL, which was no longer true after f30be6f743. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen2_render.c10
-rw-r--r--src/sna/gen3_render.c10
-rw-r--r--src/sna/gen4_render.c10
-rw-r--r--src/sna/gen5_render.c10
-rw-r--r--src/sna/gen6_render.c10
-rw-r--r--src/sna/gen7_render.c10
6 files changed, 7 insertions, 53 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 606ecfe1..1e0c680e 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1486,14 +1486,6 @@ try_blt(struct sna *sna,
}
static bool
-is_solid(PicturePtr picture)
-{
- return picture->pDrawable->width == 1 &&
- picture->pDrawable->height == 1 &&
- picture->repeat;
-}
-
-static bool
is_unhandled_gradient(PicturePtr picture)
{
if (picture->pDrawable)
@@ -1523,7 +1515,7 @@ need_upload(PicturePtr p)
static bool
source_fallback(PicturePtr p)
{
- if (is_solid(p))
+ if (sna_picture_is_solid(p, NULL))
return false;
return (has_alphamap(p) ||
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index de6a3adf..b9afdb9a 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2413,14 +2413,6 @@ static inline bool is_constant_ps(uint32_t type)
}
static bool
-is_solid(PicturePtr picture)
-{
- return picture->pDrawable->width == 1 &&
- picture->pDrawable->height == 1 &&
- picture->repeat;
-}
-
-static bool
has_alphamap(PicturePtr p)
{
return p->alphaMap != NULL;
@@ -2435,7 +2427,7 @@ need_upload(PicturePtr p)
static bool
source_fallback(PicturePtr p)
{
- if (is_solid(p))
+ if (sna_picture_is_solid(p, NULL))
return false;
return (has_alphamap(p) ||
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index 3cb0fbb5..530251c7 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -2001,14 +2001,6 @@ try_blt(struct sna *sna,
}
static bool
-is_solid(PicturePtr picture)
-{
- return picture->pDrawable->width == 1 &&
- picture->pDrawable->height == 1 &&
- picture->repeat;
-}
-
-static bool
is_gradient(PicturePtr picture)
{
if (picture->pDrawable)
@@ -2032,7 +2024,7 @@ need_upload(PicturePtr p)
static bool
source_fallback(PicturePtr p)
{
- if (is_solid(p))
+ if (sna_picture_is_solid(p, NULL))
return false;
return (has_alphamap(p) ||
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index f15342d8..487d903e 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -2029,14 +2029,6 @@ try_blt(struct sna *sna,
}
static bool
-is_solid(PicturePtr picture)
-{
- return picture->pDrawable->width == 1 &&
- picture->pDrawable->height == 1 &&
- picture->repeat;
-}
-
-static bool
is_gradient(PicturePtr picture)
{
if (picture->pDrawable)
@@ -2060,7 +2052,7 @@ need_upload(PicturePtr p)
static bool
source_fallback(PicturePtr p)
{
- if (is_solid(p))
+ if (sna_picture_is_solid(p, NULL))
return false;
return (has_alphamap(p) ||
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 06c33c46..c4d23010 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2270,12 +2270,6 @@ static bool can_switch_rings(struct sna *sna)
return sna->kgem.has_semaphores && !NO_RING_SWITCH;
}
-static bool
-is_solid(PicturePtr picture)
-{
- return sna_picture_is_solid(picture, NULL);
-}
-
static Bool
try_blt(struct sna *sna,
PicturePtr dst, PicturePtr src,
@@ -2308,7 +2302,7 @@ try_blt(struct sna *sna,
}
if (can_switch_rings(sna)) {
- if (is_solid(src))
+ if (sna_picture_is_solid(src, NULL))
return TRUE;
}
@@ -2339,7 +2333,7 @@ need_upload(PicturePtr p)
static bool
source_fallback(PicturePtr p)
{
- if (is_solid(p))
+ if (sna_picture_is_solid(p, NULL))
return false;
return (has_alphamap(p) ||
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 5a867b19..2e9948d7 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2314,14 +2314,6 @@ try_blt(struct sna *sna,
}
static bool
-is_solid(PicturePtr picture)
-{
- return picture->pDrawable->width == 1 &&
- picture->pDrawable->height == 1 &&
- picture->repeat;
-}
-
-static bool
is_gradient(PicturePtr picture)
{
if (picture->pDrawable)
@@ -2345,7 +2337,7 @@ need_upload(PicturePtr p)
static bool
source_fallback(PicturePtr p)
{
- if (is_solid(p))
+ if (sna_picture_is_solid(p, NULL))
return false;
return (has_alphamap(p) ||