diff --git a/src/compositor/meta-texture-mipmap.c b/src/compositor/meta-texture-mipmap.c index 63802aff6..54873ccb9 100644 --- a/src/compositor/meta-texture-mipmap.c +++ b/src/compositor/meta-texture-mipmap.c @@ -151,8 +151,8 @@ ensure_mipmap_texture (MetaTextureMipmap *mipmap) * then just use the original texture instead of mipmap texture, which is * faster anyway. */ - width = meta_multi_texture_get_width (mipmap->base_texture) / 2; - height = meta_multi_texture_get_height (mipmap->base_texture) / 2; + width = meta_multi_texture_get_width (mipmap->base_texture); + height = meta_multi_texture_get_height (mipmap->base_texture); if (!width || !height) { @@ -160,6 +160,9 @@ ensure_mipmap_texture (MetaTextureMipmap *mipmap) return; } + width = MAX (width / 2, 1); + height = MAX (height / 2, 1); + if (!mipmap->mipmap_texture || meta_multi_texture_get_width (mipmap->mipmap_texture) != width || meta_multi_texture_get_height (mipmap->mipmap_texture) != height)