[mutter/wip/tower] remove texture tower
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tower] remove texture tower
- Date: Tue, 20 Aug 2013 22:14:25 +0000 (UTC)
commit 2b8e75ad489f712a5d1dd9513b9d9eb86c5519c1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 20 16:45:26 2013 -0400
remove texture tower
src/Makefile.am | 2 -
src/compositor/README | 10 -
src/compositor/compositor-private.h | 1 -
src/compositor/compositor.c | 3 -
src/compositor/meta-shaped-texture.c | 67 +----
src/compositor/meta-texture-tower.c | 624 ----------------------------------
src/compositor/meta-texture-tower.h | 69 ----
src/compositor/meta-window-actor.c | 4 -
src/meta/meta-shaped-texture.h | 3 -
9 files changed, 4 insertions(+), 779 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 638a3cd..eec0537 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -65,8 +65,6 @@ libmutter_la_SOURCES = \
compositor/meta-shaped-texture.c \
compositor/meta-texture-rectangle.c \
compositor/meta-texture-rectangle.h \
- compositor/meta-texture-tower.c \
- compositor/meta-texture-tower.h \
compositor/meta-window-actor.c \
compositor/meta-window-actor-private.h \
compositor/meta-window-group.c \
diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h
index 0ebf3a4..85045a2 100644
--- a/src/compositor/compositor-private.h
+++ b/src/compositor/compositor-private.h
@@ -31,7 +31,6 @@ struct _MetaCompositor
guint server_time_is_monotonic_time : 1;
guint show_redraw : 1;
guint debug : 1;
- guint no_mipmaps : 1;
};
struct _MetaCompScreen
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 9a86444..6484b2e 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -1532,9 +1532,6 @@ meta_compositor_new (MetaDisplay *display)
compositor->display = display;
- if (g_getenv("META_DISABLE_MIPMAPS"))
- compositor->no_mipmaps = TRUE;
-
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
XInternAtoms (xdisplay, atom_names, G_N_ELEMENTS (atom_names),
False, atoms);
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index c6239c9..ddd40cb 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -30,7 +30,6 @@
#include <config.h>
#include <meta/meta-shaped-texture.h>
-#include "meta-texture-tower.h"
#include <clutter/clutter.h>
#include <cogl/cogl.h>
@@ -64,7 +63,6 @@ G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
struct _MetaShapedTexturePrivate
{
- MetaTextureTower *paint_tower;
Pixmap pixmap;
CoglTexturePixmapX11 *texture;
CoglTexture *mask_texture;
@@ -74,8 +72,6 @@ struct _MetaShapedTexturePrivate
cairo_region_t *clip_region;
guint tex_width, tex_height;
-
- guint create_mipmaps : 1;
};
static void
@@ -102,10 +98,8 @@ meta_shaped_texture_init (MetaShapedTexture *self)
priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self);
- priv->paint_tower = meta_texture_tower_new ();
priv->texture = NULL;
priv->mask_texture = NULL;
- priv->create_mipmaps = TRUE;
}
static void
@@ -114,10 +108,6 @@ meta_shaped_texture_dispose (GObject *object)
MetaShapedTexture *self = (MetaShapedTexture *) object;
MetaShapedTexturePrivate *priv = self->priv;
- if (priv->paint_tower)
- meta_texture_tower_free (priv->paint_tower);
- priv->paint_tower = NULL;
-
g_clear_pointer (&priv->pipeline, cogl_object_unref);
g_clear_pointer (&priv->pipeline_unshaped, cogl_object_unref);
g_clear_pointer (&priv->texture, cogl_object_unref);
@@ -133,7 +123,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
{
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
MetaShapedTexturePrivate *priv = stex->priv;
- CoglTexture *paint_tex;
guint tex_width, tex_height;
ClutterActorBox alloc;
@@ -148,29 +137,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
clutter_actor_realize (CLUTTER_ACTOR (stex));
- /* The GL EXT_texture_from_pixmap extension does allow for it to be
- * used together with SGIS_generate_mipmap, however this is very
- * rarely supported. Also, even when it is supported there
- * are distinct performance implications from:
- *
- * - Updating mipmaps that we don't need
- * - Having to reallocate pixmaps on the server into larger buffers
- *
- * So, we just unconditionally use our mipmap emulation code. If we
- * wanted to use SGIS_generate_mipmap, we'd have to query COGL to
- * see if it was supported (no API currently), and then if and only
- * if that was the case, set the clutter texture quality to HIGH.
- * Setting the texture quality to high without SGIS_generate_mipmap
- * support for TFP textures will result in fallbacks to XGetImage.
- */
- if (priv->create_mipmaps)
- paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
- else
- paint_tex = COGL_TEXTURE (priv->texture);
-
- if (paint_tex == NULL)
- return;
-
tex_width = priv->tex_width;
tex_height = priv->tex_height;
@@ -212,7 +178,10 @@ meta_shaped_texture_paint (ClutterActor *actor)
cogl_pipeline_set_layer_texture (pipeline, 1, priv->mask_texture);
}
- cogl_pipeline_set_layer_texture (pipeline, 0, paint_tex);
+ cogl_pipeline_set_layer_filters (pipeline, 0,
+ COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR,
+ COGL_PIPELINE_FILTER_LINEAR);
+ cogl_pipeline_set_layer_texture (pipeline, 0, priv->texture);
{
CoglColor color;
@@ -374,28 +343,6 @@ meta_shaped_texture_new (void)
}
void
-meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
- gboolean create_mipmaps)
-{
- MetaShapedTexturePrivate *priv;
-
- g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
-
- priv = stex->priv;
-
- create_mipmaps = create_mipmaps != FALSE;
-
- if (create_mipmaps != priv->create_mipmaps)
- {
- CoglTexture *base_texture;
- priv->create_mipmaps = create_mipmaps;
- base_texture = create_mipmaps ?
- COGL_TEXTURE (priv->texture) : NULL;
- meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
- }
-}
-
-void
meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
CoglTexture *mask_texture)
{
@@ -434,8 +381,6 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
cogl_texture_pixmap_x11_update_area (priv->texture,
x, y, width, height);
- meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
-
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
}
@@ -514,10 +459,6 @@ meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
}
else
set_cogl_texture (stex, NULL);
-
- if (priv->create_mipmaps)
- meta_texture_tower_set_base_texture (priv->paint_tower,
- COGL_TEXTURE (priv->texture));
}
/**
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 5b123d6..89d04be 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1782,10 +1782,6 @@ check_needs_pixmap (MetaWindowActor *self)
goto out;
}
- if (compositor->no_mipmaps)
- meta_shaped_texture_set_create_mipmaps (META_SHAPED_TEXTURE (priv->actor),
- FALSE);
-
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
priv->back_pixmap);
diff --git a/src/meta/meta-shaped-texture.h b/src/meta/meta-shaped-texture.h
index 28fb5f6..df841d4 100644
--- a/src/meta/meta-shaped-texture.h
+++ b/src/meta/meta-shaped-texture.h
@@ -66,9 +66,6 @@ GType meta_shaped_texture_get_type (void) G_GNUC_CONST;
ClutterActor *meta_shaped_texture_new (void);
-void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
- gboolean create_mipmaps);
-
void meta_shaped_texture_update_area (MetaShapedTexture *stex,
int x,
int y,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]