summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-14 18:12:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-14 18:12:15 +0100
commita0f90a4c79799780592c004c846a963aad5f28e6 (patch)
treedb66cc3ee9264620d5ed4f1f778f1d10c959a7c5
parent2be9118e882f59591dc0fb9b98ec25494f020bb4 (diff)
sna: Rename sna_pixmap_get_bo()
Mark how dangerous this function is by giving it a __ prefix. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna.h2
-rw-r--r--src/sna/sna_accel.c20
-rw-r--r--src/sna/sna_display.c6
-rw-r--r--src/sna/sna_render.c8
-rw-r--r--src/sna/sna_trapezoids.c4
5 files changed, 20 insertions, 20 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h
index fe840749..b5613bd9 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -607,7 +607,7 @@ sna_drawable_is_clear(DrawablePtr d)
return priv && priv->clear && priv->clear_color == 0;
}
-static inline struct kgem_bo *sna_pixmap_get_bo(PixmapPtr pixmap)
+static inline struct kgem_bo *__sna_pixmap_get_bo(PixmapPtr pixmap)
{
return sna_pixmap(pixmap)->gpu_bo;
}
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 04b063c1..c54c2547 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4311,7 +4311,7 @@ sna_put_xybitmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
if (bo->tiling == I915_TILING_Y) {
DBG(("%s: converting bo from Y-tiling\n", __FUNCTION__));
- assert(bo == sna_pixmap_get_bo(pixmap));
+ assert(bo == __sna_pixmap_get_bo(pixmap));
bo = sna_pixmap_change_tiling(pixmap, I915_TILING_X);
if (bo == NULL) {
DBG(("%s: fallback -- unable to change tiling\n",
@@ -4435,7 +4435,7 @@ sna_put_xypixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
if (bo->tiling == I915_TILING_Y) {
DBG(("%s: converting bo from Y-tiling\n", __FUNCTION__));
- assert(bo == sna_pixmap_get_bo(pixmap));
+ assert(bo == __sna_pixmap_get_bo(pixmap));
bo = sna_pixmap_change_tiling(pixmap, I915_TILING_X);
if (bo == NULL) {
DBG(("%s: fallback -- unable to change tiling\n",
@@ -5340,7 +5340,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
if (tmp == NullPixmap)
return;
- src_bo = sna_pixmap_get_bo(tmp);
+ src_bo = __sna_pixmap_get_bo(tmp);
assert(src_bo != NULL);
dx = -region->extents.x1;
@@ -7266,7 +7266,7 @@ sna_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc,
&region.extents, &arg.damage);
if (arg.bo) {
if (arg.bo->tiling == I915_TILING_Y) {
- assert(arg.bo == sna_pixmap_get_bo(pixmap));
+ assert(arg.bo == __sna_pixmap_get_bo(pixmap));
arg.bo = sna_pixmap_change_tiling(pixmap, I915_TILING_X);
if (arg.bo == NULL) {
DBG(("%s: fallback -- unable to change tiling\n",
@@ -12567,7 +12567,7 @@ sna_poly_fill_rect_stippled_blt(DrawablePtr drawable,
DBG(("%s: converting bo from Y-tiling\n", __FUNCTION__));
/* This is cheating, but only the gpu_bo can be tiled */
- assert(bo == sna_pixmap_get_bo(pixmap));
+ assert(bo == __sna_pixmap_get_bo(pixmap));
bo = sna_pixmap_change_tiling(pixmap, I915_TILING_X);
if (bo == NULL) {
DBG(("%s: fallback -- unable to change tiling\n",
@@ -13103,7 +13103,7 @@ sna_glyph_blt(DrawablePtr drawable, GCPtr gc,
if (bo->tiling == I915_TILING_Y) {
DBG(("%s: converting bo from Y-tiling\n", __FUNCTION__));
- assert(bo == sna_pixmap_get_bo(pixmap));
+ assert(bo == __sna_pixmap_get_bo(pixmap));
bo = sna_pixmap_change_tiling(pixmap, I915_TILING_X);
if (bo == NULL) {
DBG(("%s: fallback -- unable to change tiling\n",
@@ -13762,7 +13762,7 @@ sna_reversed_glyph_blt(DrawablePtr drawable, GCPtr gc,
if (bo->tiling == I915_TILING_Y) {
DBG(("%s: converting bo from Y-tiling\n", __FUNCTION__));
- assert(bo == sna_pixmap_get_bo(pixmap));
+ assert(bo == __sna_pixmap_get_bo(pixmap));
bo = sna_pixmap_change_tiling(pixmap, I915_TILING_X);
if (bo == NULL) {
DBG(("%s: fallback -- unable to change tiling\n",
@@ -14156,7 +14156,7 @@ sna_push_pixels_solid_blt(GCPtr gc,
if (bo->tiling == I915_TILING_Y) {
DBG(("%s: converting bo from Y-tiling\n", __FUNCTION__));
- assert(bo == sna_pixmap_get_bo(pixmap));
+ assert(bo == __sna_pixmap_get_bo(pixmap));
bo = sna_pixmap_change_tiling(pixmap, I915_TILING_X);
if (bo == NULL) {
DBG(("%s: fallback -- unable to change tiling\n",
@@ -15089,8 +15089,8 @@ fallback:
goto fallback;
if (!sna->render.copy_boxes(sna, GXcopy,
- src, sna_pixmap_get_bo(src), dirty->x, dirty->y,
- dst, sna_pixmap_get_bo(dst),0, 0,
+ src, __sna_pixmap_get_bo(src), dirty->x, dirty->y,
+ dst, __sna_pixmap_get_bo(dst),0, 0,
box, n, COPY_LAST))
goto fallback;
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index c87693ac..2a5b4b4e 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1118,7 +1118,7 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
return true;
}
- bo = sna_pixmap_get_bo(sna->front);
+ bo = __sna_pixmap_get_bo(sna->front);
if (sna->kgem.gen == 071)
pitch_limit = bo->tiling ? 16 * 1024 : 32 * 1024;
else if ((sna->kgem.gen >> 3) > 4)
@@ -3857,7 +3857,7 @@ sna_crtc_redisplay(xf86CrtcPtr crtc, RegionPtr region)
*/
if (sna->render.copy_boxes(sna, GXcopy,
- sna->front, sna_pixmap_get_bo(sna->front), 0, 0,
+ sna->front, __sna_pixmap_get_bo(sna->front), 0, 0,
&tmp, sna_crtc->bo, -tx, -ty,
REGION_RECTS(region), REGION_NUM_RECTS(region), 0))
return;
@@ -3958,7 +3958,7 @@ void sna_mode_redisplay(struct sna *sna)
}
if (sna->mode.shadow_flip == 0) {
- struct kgem_bo *new = sna_pixmap_get_bo(sna->front);
+ struct kgem_bo *new = __sna_pixmap_get_bo(sna->front);
struct kgem_bo *old = sna->mode.shadow;
DBG(("%s: flipping tear-free outputs\n", __FUNCTION__));
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 1bf11ea6..6b883ddf 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -1336,7 +1336,7 @@ sna_render_picture_convolve(struct sna *sna,
ValidatePicture(tmp);
- bo = sna_pixmap_get_bo(pixmap);
+ bo = __sna_pixmap_get_bo(pixmap);
if (!sna->render.clear(sna, pixmap, bo)) {
FreePicture(tmp, 0);
return 0;
@@ -1450,7 +1450,7 @@ sna_render_picture_flatten(struct sna *sna,
channel->scale[1] = 1.f / h;
channel->offset[0] = -dst_x;
channel->offset[1] = -dst_y;
- channel->bo = kgem_bo_reference(sna_pixmap_get_bo(pixmap));
+ channel->bo = kgem_bo_reference(__sna_pixmap_get_bo(pixmap));
FreePicture(tmp, 0);
return 1;
@@ -1817,7 +1817,7 @@ sna_render_picture_convert(struct sna *sna,
FreePicture(dst, 0);
FreePicture(src, 0);
- channel->bo = sna_pixmap_get_bo(tmp);
+ channel->bo = __sna_pixmap_get_bo(tmp);
kgem_bo_reference(channel->bo);
screen->DestroyPixmap(tmp);
} else {
@@ -2112,7 +2112,7 @@ sna_render_copy_boxes__overlap(struct sna *sna, uint8_t alu,
if (tmp == NULL)
return false;
- bo = sna_pixmap_get_bo(tmp);
+ bo = __sna_pixmap_get_bo(tmp);
if (bo == NULL)
goto out;
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index e3b406eb..ce2c075c 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -6838,7 +6838,7 @@ trap_mask_converter(struct sna *sna,
get_drawable_deltas(picture->pDrawable, pixmap, &x, &y);
sna = to_sna_from_screen(screen);
sna->render.copy_boxes(sna, GXcopy,
- scratch, sna_pixmap_get_bo(scratch), -extents.x1, -extents.x1,
+ scratch, __sna_pixmap_get_bo(scratch), -extents.x1, -extents.x1,
pixmap, priv->gpu_bo, x, y,
&extents, 1, 0);
mark_damaged(pixmap, priv, &extents ,x, y);
@@ -6915,7 +6915,7 @@ trap_upload(PicturePtr picture,
/* XXX clip boxes */
get_drawable_deltas(picture->pDrawable, pixmap, &x, &y);
sna->render.copy_boxes(sna, GXcopy,
- scratch, sna_pixmap_get_bo(scratch), -extents.x1, -extents.x1,
+ scratch, __sna_pixmap_get_bo(scratch), -extents.x1, -extents.x1,
pixmap, priv->gpu_bo, x, y,
&extents, 1, 0);
mark_damaged(pixmap, priv, &extents, x, y);