summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/thumbnail.c
diff options
context:
space:
mode:
authoronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-16 20:35:51 +0000
committeronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-16 20:35:51 +0000
commit59f290427cd6932eeb1160fdd68c931f7e27765b (patch)
tree692857b696cc02fba094386d3460f74f5a955159 /beryl-plugins/src/thumbnail.c
parent327f2740467cb4a2c64b3bb252244079e47c0a35 (diff)
downloadmarex-dev-59f290427cd6932eeb1160fdd68c931f7e27765b.tar.gz
marex-dev-59f290427cd6932eeb1160fdd68c931f7e27765b.tar.bz2
beryl-plugins: thumbnail: added mipmap support
git-svn-id: file:///beryl/trunk@2729 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/thumbnail.c')
-rw-r--r--beryl-plugins/src/thumbnail.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/beryl-plugins/src/thumbnail.c b/beryl-plugins/src/thumbnail.c
index e5e1eb6..adc769f 100644
--- a/beryl-plugins/src/thumbnail.c
+++ b/beryl-plugins/src/thumbnail.c
@@ -91,6 +91,7 @@
#define THUMB_CURRENT_VIEWPORT_DEFAULT TRUE
#define THUMB_ALLWAYS_TOP_DEFAULT FALSE
#define THUMB_WINDOW_LIKE_DEFAULT FALSE
+#define THUMB_MIPMAP_DEFAULT TRUE
#define THUMB_SCREEN_OPTION_SIZE 0
#define THUMB_SCREEN_OPTION_DELAY 1
@@ -100,7 +101,8 @@
#define THUMB_SCREEN_OPTION_CURRENT_VIEWPORT 5
#define THUMB_SCREEN_OPTION_ALLWAYS_TOP 6
#define THUMB_SCREEN_OPTION_WINDOW_LIKE 7
-#define THUMB_SCREEN_OPTION_NUM 8
+#define THUMB_SCREEN_OPTION_MIPMAP 8
+#define THUMB_SCREEN_OPTION_NUM 9
#define THUMB_MOUSE_UPDATE_SPEED 100
@@ -610,6 +612,18 @@ thumbScreenInitOptions (ThumbScreen *ts)
o->advanced = False;
o->displayHints = "";
+ o = &ts->opt[THUMB_SCREEN_OPTION_MIPMAP];
+ o->name = "mipmap";
+ o->shortDesc = N_("Generate Mipmaps");
+ o->longDesc = N_("Generate mipmaps when possible for higher quality "
+ "scaling");
+ o->type = CompOptionTypeBool;
+ o->value.b = THUMB_MIPMAP_DEFAULT;
+ o->group = N_("Settings");
+ o->subGroup = "";
+ o->advanced = TRUE;
+ o->displayHints = "";
+
}
@@ -674,6 +688,7 @@ thumbSetScreenOption (CompScreen *screen,
case THUMB_SCREEN_OPTION_ALLWAYS_TOP:
case THUMB_SCREEN_OPTION_CURRENT_VIEWPORT:
case THUMB_SCREEN_OPTION_WINDOW_LIKE:
+ case THUMB_SCREEN_OPTION_MIPMAP:
if (compSetBoolOption(o, value))
{
return TRUE;
@@ -888,8 +903,14 @@ thumbPaintThumb(CompScreen *s,Thumbnail *t)
wx - w->attrib.x + w->input.left * sAttrib.xScale;
sAttrib.yTranslate = wy - w->attrib.y + w->input.top * sAttrib.yScale;
+ GLenum filter = s->display->textureFilter;
+
+ if (ts->opt[THUMB_SCREEN_OPTION_MIPMAP].value.b)
+ s->display->textureFilter = GL_LINEAR_MIPMAP_LINEAR;
+
(w->screen->drawWindow) (w, &sAttrib, getInfiniteRegion(), mask);
+ s->display->textureFilter = filter;
}
w->screen->drawWindowGeometry = oldDrawWindowGeometry;