[PATCH 6/7] glamor: Drop a dead flag to glamor_create_fbo_array().
Eric Anholt
eric at anholt.net
Tue Mar 24 13:25:55 PDT 2015
Signed-off-by: Eric Anholt <eric at anholt.net>
---
glamor/glamor_fbo.c | 35 +++++++++++------------------------
1 file changed, 11 insertions(+), 24 deletions(-)
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index 5d59913..ffe8ef9 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -355,11 +355,15 @@ glamor_create_fbo(glamor_screen_private *glamor_priv,
return fbo;
}
-static glamor_pixmap_fbo *
-_glamor_create_fbo_array(glamor_screen_private *glamor_priv,
+/**
+ * Create storage for the w * h region, using FBOs of the GL's maximum
+ * supported size.
+ */
+glamor_pixmap_fbo *
+glamor_create_fbo_array(glamor_screen_private *glamor_priv,
int w, int h, GLenum format, int flag,
int block_w, int block_h,
- glamor_pixmap_private *pixmap_priv, int has_fbo)
+ glamor_pixmap_private *pixmap_priv)
{
int block_wcnt;
int block_hcnt;
@@ -399,13 +403,10 @@ _glamor_create_fbo_array(glamor_screen_private *glamor_priv,
fbo_w =
box_array[i * block_wcnt + j].x2 - box_array[i * block_wcnt +
j].x1;
- if (!has_fbo)
- fbo_array[i * block_wcnt + j] = glamor_create_fbo(glamor_priv,
- fbo_w, fbo_h,
- format,
- GLAMOR_CREATE_PIXMAP_FIXUP);
- else
- fbo_array[i * block_wcnt + j] = priv->fbo;
+ fbo_array[i * block_wcnt + j] = glamor_create_fbo(glamor_priv,
+ fbo_w, fbo_h,
+ format,
+ GLAMOR_CREATE_PIXMAP_FIXUP);
if (fbo_array[i * block_wcnt + j] == NULL)
goto cleanup;
}
@@ -427,20 +428,6 @@ _glamor_create_fbo_array(glamor_screen_private *glamor_priv,
return NULL;
}
-/* Create a fbo array to cover the w*h region, by using block_w*block_h
- * block.*/
-glamor_pixmap_fbo *
-glamor_create_fbo_array(glamor_screen_private *glamor_priv,
- int w, int h, GLenum format, int flag,
- int block_w, int block_h,
- glamor_pixmap_private *pixmap_priv)
-{
- pixmap_priv->block_w = block_w;
- pixmap_priv->block_h = block_h;
- return _glamor_create_fbo_array(glamor_priv, w, h, format, flag,
- block_w, block_h, pixmap_priv, 0);
-}
-
glamor_pixmap_fbo *
glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv)
{
--
2.1.4
More information about the xorg-devel
mailing list