summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor.c1
-rw-r--r--glamor/glamor_fbo.c3
-rw-r--r--glamor/glamor_priv.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index fc24b1bdd..d228e35ad 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -106,6 +106,7 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
ErrorF("XXX fail to create fbo.\n");
return;
}
+ fbo->external = TRUE;
glamor_pixmap_attach_fbo(pixmap, fbo);
}
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index 090dfd8e7..42738268c 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -153,7 +153,7 @@ glamor_pixmap_fbo_cache_put(glamor_pixmap_fbo *fbo)
#else
n_format = cache_format(fbo->format);
- if (fbo->fb == 0 || n_format == -1
+ if (fbo->fb == 0 || fbo->external || n_format == -1
|| fbo->glamor_priv->fbo_cache_watermark >= FBO_CACHE_THRESHOLD) {
fbo->glamor_priv->tick += GLAMOR_CACHE_EXPIRE_MAX;
glamor_fbo_expire(fbo->glamor_priv);
@@ -237,6 +237,7 @@ glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv,
fbo->tex = tex;
fbo->width = w;
fbo->height = h;
+ fbo->external = FALSE;
fbo->format = format;
fbo->glamor_priv = glamor_priv;
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index c089db895..885f12a6d 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -352,6 +352,7 @@ enum glamor_fbo_state {
* @pbo: attached pbo.
* @width: width of this fbo.
* @height: height of this fbo.
+ * @external set when the texture was not created by glamor
* @format: internal format of this fbo's texture.
* @type: internal type of this fbo's texture.
* @glamor_priv: point to glamor private data.
@@ -365,6 +366,7 @@ typedef struct glamor_pixmap_fbo {
GLuint pbo;
int width;
int height;
+ Bool external;
GLenum format;
GLenum type;
glamor_screen_private *glamor_priv;