summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-07-16 14:06:07 -0400
committerAdam Jackson <ajax@redhat.com>2013-08-02 07:27:28 -0400
commit137ad5c11c8e5548fc4d4df615d3dad33052263d (patch)
tree2cef4bfba89373e6ca571622b2b45ab1d0b35496
parentcf9ce6c2e876bf49e984117ea278f5eae00fb63a (diff)
Add hack to get the fbo for a pixmap
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--src/glamor.h2
-rw-r--r--src/glamor_fbo.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/glamor.h b/src/glamor.h
index a1579a7..c55c603 100644
--- a/src/glamor.h
+++ b/src/glamor.h
@@ -350,4 +350,6 @@ extern _X_EXPORT Bool glamor_poly_line_nf(DrawablePtr pDrawable, GCPtr pGC, int
extern _X_EXPORT Bool glamor_poly_lines_nf(DrawablePtr drawable, GCPtr gc, int mode, int n,
DDXPointPtr points);
+
+extern _X_EXPORT int glamor_pixmap_get_fbo(PixmapPtr pixmap);
#endif /* GLAMOR_H */
diff --git a/src/glamor_fbo.c b/src/glamor_fbo.c
index a46a740..edca052 100644
--- a/src/glamor_fbo.c
+++ b/src/glamor_fbo.c
@@ -576,3 +576,9 @@ glamor_pixmap_exchange_fbos(PixmapPtr front, PixmapPtr back)
front_priv->base.fbo = back_priv->base.fbo;
back_priv->base.fbo = temp_fbo;
}
+
+_X_EXPORT int
+glamor_pixmap_get_fbo(PixmapPtr pixmap)
+{
+ return glamor_get_pixmap_private(pixmap)->base.fbo->fb;
+}