summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2015-06-18 10:37:01 +0100
committerRussell King <rmk@arm.linux.org.uk>2015-06-29 12:58:36 +0100
commitda87ac557bc7426aa7d65b215c892a92b54df723 (patch)
tree4cb0976cbbbce0a49b90d600f446f3f0ec936092
parent5ce4911feadbe24bddea3988aa9776a1f23ba8dc (diff)
etnaviv: provide etnaviv_drawable()
Provide a version of etnaviv_drawable_offset() which doesn't return the offsets. This is useful in a couple of places, and avoids us having to either supply a dummy offset argument, or open code this. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--etnaviv/etnaviv.c3
-rw-r--r--etnaviv/etnaviv_accel.c3
-rw-r--r--etnaviv/etnaviv_accel.h6
3 files changed, 8 insertions, 4 deletions
diff --git a/etnaviv/etnaviv.c b/etnaviv/etnaviv.c
index 9bea065..18b34a9 100644
--- a/etnaviv/etnaviv.c
+++ b/etnaviv/etnaviv.c
@@ -209,8 +209,7 @@ static struct etnaviv_pixmap *etnaviv_alloc_pixmap(PixmapPtr pixmap,
/* Determine whether this GC and target Drawable can be accelerated */
static Bool etnaviv_GC_can_accel(GCPtr pGC, DrawablePtr pDrawable)
{
- PixmapPtr pixmap = drawable_pixmap(pDrawable);
- if (!etnaviv_get_pixmap_priv(pixmap))
+ if (!etnaviv_drawable(pDrawable))
return FALSE;
/* Must be full-planes */
diff --git a/etnaviv/etnaviv_accel.c b/etnaviv/etnaviv_accel.c
index d1cea7c..cc6e241 100644
--- a/etnaviv/etnaviv_accel.c
+++ b/etnaviv/etnaviv_accel.c
@@ -1771,7 +1771,6 @@ int etnaviv_accel_Composite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
struct etnaviv_de_op final_op;
PixmapPtr pPixTemp = NULL;
RegionRec region;
- xPoint dst_offset;
int rc;
#ifdef DEBUG_BLEND
@@ -1790,7 +1789,7 @@ int etnaviv_accel_Composite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
return FALSE;
/* The destination pixmap must have a bo */
- vDst = etnaviv_drawable_offset(pDst->pDrawable, &dst_offset);
+ vDst = etnaviv_drawable(pDst->pDrawable);
if (!vDst)
return FALSE;
diff --git a/etnaviv/etnaviv_accel.h b/etnaviv/etnaviv_accel.h
index 442e7a8..a7e220c 100644
--- a/etnaviv/etnaviv_accel.h
+++ b/etnaviv/etnaviv_accel.h
@@ -324,6 +324,12 @@ static inline struct etnaviv_pixmap *etnaviv_drawable_offset(
return etnaviv_get_pixmap_priv(pix);
}
+static inline struct etnaviv_pixmap *etnaviv_drawable(DrawablePtr pDrawable)
+{
+ PixmapPtr pix = drawable_pixmap(pDrawable);
+ return etnaviv_get_pixmap_priv(pix);
+}
+
static inline struct etnaviv *etnaviv_get_screen_priv(ScreenPtr pScreen)
{
extern etnaviv_Key etnaviv_screen_index;